summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2005-08-11 10:14:41 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-11 10:14:41 +0000
commit0654a007425b7b7b4d7646bd5cc2edeb1375d622 (patch)
treef476d1a9f4097abcdf7145e46136d3e500d5dfe9 /packages/linux
parent5db530540a094f96b52245c5896ef40009e6db6b (diff)
Added unslung-binary-kernel.conf distro for NSLU2 Linksys V2.3R63 firmware with NTFS read/write support.
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/unslung-kernel_2.4.22.l2.3r63.bb46
1 files changed, 46 insertions, 0 deletions
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 <www.nlsu2-linux.org>"
+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