From 0654a007425b7b7b4d7646bd5cc2edeb1375d622 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Thu, 11 Aug 2005 10:14:41 +0000 Subject: Added unslung-binary-kernel.conf distro for NSLU2 Linksys V2.3R63 firmware with NTFS read/write support. --- packages/linux/unslung-kernel_2.4.22.l2.3r63.bb | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 packages/linux/unslung-kernel_2.4.22.l2.3r63.bb (limited to 'packages/linux/unslung-kernel_2.4.22.l2.3r63.bb') diff --git a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb new file mode 100644 index 0000000000..858af69eb0 --- /dev/null +++ b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb @@ -0,0 +1,46 @@ +DEFAULT_PREFERENCE_unslung = "-1" + +SECTION = "kernel" +DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device" +LICENSE = "GPL" +MAINTAINER = "NSLU2 Linux " +PR = "r0" + +S = "${WORKDIR}/linux-2.4.22" + +KERNEL_IMAGETYPE = "zImage" +KERNEL_SUFFIX = "unslung" + +DEPENDS += "nslu2-linksys-firmware" + +python () { + # Don't build unslung kernel unless we're targeting an nslu2 + mach = bb.data.getVar("MACHINE", d, 1) + dist = bb.data.getVar("DISTRO", d, 1) + if mach != 'nslu2' or dist != 'unslung': + raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2") +} + + +do_deploy() { + cp ${STAGING_LIBDIR}/nslu2-binaries/vmlinuz vmlinuz + dd if=vmlinuz bs=1 count=11732 > vmlinuh + dd if=vmlinuz bs=1 skip=11732 count=975109 | gzip -dc > vmlinux + dd if=vmlinuz bs=1 skip=986841 > vmlinut + cat vmlinux | sed \ + -e 's/ram0/slug/' \ + -e 's/\x01\x31\x2c\xff/\x00\x1e\x84\x7f/' \ + -e 's/flash_sda\x00/hdd_sda\x00\x00\x00/' \ + -e 's/flash_\x00/hdd_\x00\x00\x00/' \ + -e 's/flash_sd%c\x00/hdd_sd%c\x00\x00\x00/' \ + | gzip -9 -c > vmlinux.gz +# cat vmlinuh vmlinux.gz vmlinut > vmlinuz + dd if=/dev/zero of=padding bs=1 count=9 + cat vmlinuh vmlinux.gz padding vmlinut > vmlinuz + install -d ${DEPLOY_DIR}/images + install -m 0644 vmlinuz ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX} +} + +do_deploy[dirs] = "${S}" + +addtask deploy before do_build after do_compile -- cgit v1.2.3 From 1a8447cc2198d81d71b1758a18da50dd6e823f28 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Thu, 11 Aug 2005 11:26:15 +0000 Subject: Added the unslung OVERRIDE for unslung-binary-kernel distro --- packages/linux/unslung-kernel_2.4.22.l2.3r63.bb | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'packages/linux/unslung-kernel_2.4.22.l2.3r63.bb') diff --git a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb index 858af69eb0..2a61d61307 100644 --- a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb +++ b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb @@ -1,10 +1,8 @@ -DEFAULT_PREFERENCE_unslung = "-1" - SECTION = "kernel" DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device" LICENSE = "GPL" MAINTAINER = "NSLU2 Linux " -PR = "r0" +PR = "r1" S = "${WORKDIR}/linux-2.4.22" @@ -16,12 +14,10 @@ DEPENDS += "nslu2-linksys-firmware" python () { # Don't build unslung kernel unless we're targeting an nslu2 mach = bb.data.getVar("MACHINE", d, 1) - dist = bb.data.getVar("DISTRO", d, 1) - if mach != 'nslu2' or dist != 'unslung': + if mach != 'nslu2': raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2") } - do_deploy() { cp ${STAGING_LIBDIR}/nslu2-binaries/vmlinuz vmlinuz dd if=vmlinuz bs=1 count=11732 > vmlinuh @@ -30,13 +26,13 @@ do_deploy() { cat vmlinux | sed \ -e 's/ram0/slug/' \ -e 's/\x01\x31\x2c\xff/\x00\x1e\x84\x7f/' \ - -e 's/flash_sda\x00/hdd_sda\x00\x00\x00/' \ - -e 's/flash_\x00/hdd_\x00\x00\x00/' \ - -e 's/flash_sd%c\x00/hdd_sd%c\x00\x00\x00/' \ | gzip -9 -c > vmlinux.gz -# cat vmlinuh vmlinux.gz vmlinut > vmlinuz - dd if=/dev/zero of=padding bs=1 count=9 - cat vmlinuh vmlinux.gz padding vmlinut > vmlinuz +# -e 's/flash_sda\x00/hdd_sda\x00\x00\x00/' \ +# -e 's/flash_\x00/hdd_\x00\x00\x00/' \ +# -e 's/flash_sd%c\x00/hdd_sd%c\x00\x00\x00/' \ + cat vmlinuh vmlinux.gz vmlinut > vmlinuz +# dd if=/dev/zero of=padding bs=1 count=9 +# cat vmlinuh vmlinux.gz padding vmlinut > vmlinuz install -d ${DEPLOY_DIR}/images install -m 0644 vmlinuz ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX} } -- cgit v1.2.3 From 9dc45ad0f61abfd589855757860a815deccaaeed Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Sat, 13 Aug 2005 17:12:43 +0000 Subject: Fixed the unslung binary kernel to build from source as well as using the binary (so that our additional kernel modules make it into the rootfs). --- packages/linux/unslung-kernel_2.4.22.l2.3r63.bb | 55 +++++++++++++++---------- 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'packages/linux/unslung-kernel_2.4.22.l2.3r63.bb') diff --git a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb index 2a61d61307..0a7a8f3dd2 100644 --- a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb +++ b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb @@ -1,15 +1,30 @@ SECTION = "kernel" + +include nslu2-linksys-kernel_2.4.22.bb + DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device" -LICENSE = "GPL" MAINTAINER = "NSLU2 Linux " -PR = "r1" - -S = "${WORKDIR}/linux-2.4.22" +PR = "r2" -KERNEL_IMAGETYPE = "zImage" KERNEL_SUFFIX = "unslung" -DEPENDS += "nslu2-linksys-firmware" +CMDLINE_ROOT = "root=/dev/mtdblock4 rootfstype=jffs2 rw init=/linuxrc mem=32M@0x00000000" + +UNSLUNG_KERNEL_EXTRA_SRC_URI ?= + +SRC_URI += "file://limit1gb.patch;patch=1 \ + file://gl811e.patch;patch=1 \ + file://ext3flash-on-disk1.patch;patch=1 \ + file://usbnet.patch;patch=1 \ + file://missing-usb-ioctls.patch;patch=1 \ + file://anonymiser.patch;patch=1 \ + file://ppp_mppe.patch;patch=1 \ + file://nfs-blocksize.patch;patch=1 \ + file://pl2303.patch;patch=1 \ + file://linux-kernel-R25_to_R29.patch;patch=1 \ + ${UNSLUNG_KERNEL_EXTRA_SRC_URI}" + +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/unslung-kernel', '${FILE_DIRNAME}/nslu2-linksys-kernel-2.4.22', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" python () { # Don't build unslung kernel unless we're targeting an nslu2 @@ -18,25 +33,23 @@ python () { raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2") } -do_deploy() { - cp ${STAGING_LIBDIR}/nslu2-binaries/vmlinuz vmlinuz - dd if=vmlinuz bs=1 count=11732 > vmlinuh - dd if=vmlinuz bs=1 skip=11732 count=975109 | gzip -dc > vmlinux - dd if=vmlinuz bs=1 skip=986841 > vmlinut - cat vmlinux | sed \ +DEPENDS += "nslu2-linksys-firmware" + +do_deploy_append() { + cp ${STAGING_LIBDIR}/nslu2-binaries/vmlinuz ${WORKDIR}/vmlinuz + dd if=${WORKDIR}/vmlinuz bs=1 count=11732 > ${WORKDIR}/vmlinuh + dd if=${WORKDIR}/vmlinuz bs=1 skip=11732 count=975109 | gzip -dc > ${WORKDIR}/vmlinux + dd if=${WORKDIR}/vmlinuz bs=1 skip=986841 > ${WORKDIR}/vmlinut + cat ${WORKDIR}/vmlinux | sed \ -e 's/ram0/slug/' \ -e 's/\x01\x31\x2c\xff/\x00\x1e\x84\x7f/' \ - | gzip -9 -c > vmlinux.gz + | gzip -9 -c > ${WORKDIR}/vmlinux.gz # -e 's/flash_sda\x00/hdd_sda\x00\x00\x00/' \ # -e 's/flash_\x00/hdd_\x00\x00\x00/' \ # -e 's/flash_sd%c\x00/hdd_sd%c\x00\x00\x00/' \ - cat vmlinuh vmlinux.gz vmlinut > vmlinuz -# dd if=/dev/zero of=padding bs=1 count=9 -# cat vmlinuh vmlinux.gz padding vmlinut > vmlinuz + cat ${WORKDIR}/vmlinuh ${WORKDIR}/vmlinux.gz ${WORKDIR}/vmlinut > ${WORKDIR}/vmlinuz +# dd if=/dev/zero of=${WORKDIR}/padding bs=1 count=9 +# cat ${WORKDIR}/vmlinuh ${WORKDIR}/vmlinux.gz ${WORKDIR}/padding ${WORKDIR}/vmlinut > ${WORKDIR}/vmlinuz install -d ${DEPLOY_DIR}/images - install -m 0644 vmlinuz ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX} + install -m 0644 ${WORKDIR}/vmlinuz ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX} } - -do_deploy[dirs] = "${S}" - -addtask deploy before do_build after do_compile -- cgit v1.2.3