diff --git a/build/config/arm.cfg b/build/config/arm.cfg index e3f879f20..99e71f078 100644 --- a/build/config/arm.cfg +++ b/build/config/arm.cfg @@ -1,4 +1,4 @@ -SUBARCH_SUPPORTED = netwinder bast lart riscpc riscstation ads +SUBARCH_SUPPORTED = netwinder bast lart riscpc riscstation ads # nslu2 KERNELMAJOR = 2.4 KERNELMINOR = 27 diff --git a/build/config/arm/nslu2.cfg b/build/config/arm/nslu2.cfg new file mode 100644 index 000000000..163bd1463 --- /dev/null +++ b/build/config/arm/nslu2.cfg @@ -0,0 +1,7 @@ +MEDIUM_SUPPORTED = netboot + +KERNELVERSION := $(KERNELVERSION_2.6)-nslu2 +KERNELMAJOR = 2.6 + +INITRD_FS = cramfs + diff --git a/build/config/arm/nslu2/netboot.cfg b/build/config/arm/nslu2/netboot.cfg new file mode 100644 index 000000000..7a5b100d3 --- /dev/null +++ b/build/config/arm/nslu2/netboot.cfg @@ -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' + diff --git a/build/pkg-lists/netboot/arm/nslu2.cfg b/build/pkg-lists/netboot/arm/nslu2.cfg new file mode 100644 index 000000000..90887a45a --- /dev/null +++ b/build/pkg-lists/netboot/arm/nslu2.cfg @@ -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} diff --git a/build/util/arm/nslu2/pad-initrd b/build/util/arm/nslu2/pad-initrd new file mode 100755 index 000000000..c3b0978c2 --- /dev/null +++ b/build/util/arm/nslu2/pad-initrd @@ -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 + diff --git a/debian/changelog b/debian/changelog index cd66be1bc..629382d46 100644 --- a/debian/changelog +++ b/debian/changelog @@ -57,6 +57,7 @@ debian-installer (20051116) UNRELEASED; urgency=low [ Martin Michlmayr ] * Add initial support for BCM947xx mipsel devices but don't activate it. * Add support for 2.6 Netwinder images but don't active it yet. + * Add support for NSLU2 devices on arm but don't activate it yet. [ Joey Hess ] * Switch i386 to the 2.6.15-1 kernel. diff --git a/debian/control b/debian/control index 5118bddf6..cb52a5ba7 100644 --- a/debian/control +++ b/debian/control @@ -65,7 +65,7 @@ Build-Depends: debhelper (>= 4), apt, gnupg, dpkg (>= 1.13.9), grep-dctrl, bc, d # Used by cdebconf. Should be a udeb, but isn't. # # Filesystem tools: -# - cramfsprogs [powerpc ia64 mips mipsel] +# - cramfsprogs [powerpc ia64 mips mipsel arm] # For arches that use cramfs initrds. # - genext2fs (>= 1.3-7.1) # For creating ext2 filesystems without being root. @@ -91,6 +91,9 @@ Build-Depends: debhelper (>= 4), apt, gnupg, dpkg (>= 1.13.9), grep-dctrl, bc, d # m68k uses it for atari floppies # - cpio # For creating initramfs images. +# - devio [arm] +# Tool to read and write from block devices, used to byteswap +# kernels. # # Boot loaders: # On many arches boot loaders are copied onto or ran on the boot