summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-08-14 18:00:44 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-14 18:00:44 +0000
commit116dddad4ec038b7d4322f8201556e6cf420fb96 (patch)
tree6b63fde6284678a936958ac42f0743a8e1869e70 /packages/linux
parentaa37baae309e595282a53af6cdfe7a5a77eb530a (diff)
parent856f8e9dbe8ab445ecde0e10c86bcc9b0bda00f8 (diff)
merge of a43a3081d043237ce284af591c69b35171e746be
and b91f743ce475bca1b138c7fd63260e83a34f53c2
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/unslung-kernel_2.4.22.l2.3r63.bb42
1 files changed, 42 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..2a61d61307
--- /dev/null
+++ b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb
@@ -0,0 +1,42 @@
+SECTION = "kernel"
+DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device"
+LICENSE = "GPL"
+MAINTAINER = "NSLU2 Linux <www.nlsu2-linux.org>"
+PR = "r1"
+
+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)
+ 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
+ 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/' \
+ | gzip -9 -c > 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
+ 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