parent
d48397c55f
commit
3c697b97f2
@ -0,0 +1,7 @@ |
|||||||
|
MEDIUM_SUPPORTED = netboot |
||||||
|
|
||||||
|
KERNELVERSION := $(KERNELVERSION_2.6)-nslu2 |
||||||
|
KERNELMAJOR = 2.6 |
||||||
|
|
||||||
|
INITRD_FS = cramfs |
||||||
|
|
@ -0,0 +1,23 @@ |
|||||||
|
MEDIA_TYPE = netboot image |
||||||
|
|
||||||
|
TARGET = swap_initrd fix_swap_kernel |
||||||
|
EXTRANAME = $(MEDIUM)/ |
||||||
|
|
||||||
|
MANIFEST-INITRD = "netboot initrd" |
||||||
|
MANIFEST-KERNEL = "kernel image to netboot" |
||||||
|
|
||||||
|
# byteswap the initrd |
||||||
|
swap_initrd: $(INITRD) |
||||||
|
util/arm/nslu2/pad-initrd $(TEMP) |
||||||
|
devio "<<"$(TEMP)/initrd.gz > $(SOME_DEST)/$(EXTRANAME)initrd.gz \ |
||||||
|
'xp $$,4' |
||||||
|
|
||||||
|
# fix the system id and byteswap the kernel |
||||||
|
fix_swap_kernel: $(KERNEL) |
||||||
|
devio "<<"$(TEMP)/$(KERNELNAME) > $(SOME_DEST)/$(EXTRANAME)$(KERNELNAME) \ |
||||||
|
'wb 0xe3a01c02,4' 'wb 0xe3811055,4' \ |
||||||
|
'wb 0xee110f10,4' \ |
||||||
|
'wb 0xe3c00080,4' \ |
||||||
|
'wb 0xee010f10,4' \ |
||||||
|
'xp $$,4' |
||||||
|
|
@ -0,0 +1,5 @@ |
|||||||
|
#oldsys-preseed |
||||||
|
# In case people want to use a USB NIC instead of the proprietary |
||||||
|
# IXP400 ethernet driver. |
||||||
|
usb-modules-${kernel:Version} |
||||||
|
nic-usb-modules-${kernel:Version} |
@ -0,0 +1,22 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
TEMP=$1 |
||||||
|
|
||||||
|
if [ -z "$TEMP" ]; then |
||||||
|
echo "Usage: "pad-initrd PATH"" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -e $TEMP/initrd.gz ]; then |
||||||
|
echo "initrd.gz does not exist at $TEMP" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
size=$(wc -c $TEMP/initrd.gz | cut -d " " -f 1) |
||||||
|
mod=$(($size % 4)) |
||||||
|
pad=$((4 - $mod)) |
||||||
|
if [ $pad -gt 0 ]; then |
||||||
|
tmp=$TEMP/initrd.padding |
||||||
|
dd if=/dev/zero of=$tmp bs=1 count=$pad |
||||||
|
cat $tmp >> $TEMP/initrd.gz |
||||||
|
fi |
||||||
|
|
Loading…
Reference in new issue