3 include nslu2-linksys-kernel_2.4.22.bb
5 DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device"
6 MAINTAINER = "NSLU2 Linux <www.nlsu2-linux.org>"
9 KERNEL_SUFFIX = "unslung"
11 CMDLINE_ROOT = "root=/dev/mtdblock4 rootfstype=jffs2 rw init=/linuxrc mem=32M@0x00000000"
13 UNSLUNG_KERNEL_EXTRA_SRC_URI ?=
15 SRC_URI += "file://limit1gb.patch;patch=1 \
16 file://gl811e.patch;patch=1 \
17 file://ext3flash-on-disk1.patch;patch=1 \
18 file://usbnet.patch;patch=1 \
19 file://missing-usb-ioctls.patch;patch=1 \
20 file://anonymiser.patch;patch=1 \
21 file://ppp_mppe.patch;patch=1 \
22 file://nfs-blocksize.patch;patch=1 \
23 file://pl2303.patch;patch=1 \
24 file://linux-kernel-R25_to_R29.patch;patch=1 \
25 ${UNSLUNG_KERNEL_EXTRA_SRC_URI}"
27 FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/unslung-kernel', '${FILE_DIRNAME}/nslu2-linksys-kernel-2.4.22', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
30 # Don't build unslung kernel unless we're targeting an nslu2
31 mach = bb.data.getVar("MACHINE", d, 1)
33 raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
36 DEPENDS += "nslu2-linksys-firmware"
39 cp ${STAGING_LIBDIR}/nslu2-binaries/vmlinuz ${WORKDIR}/vmlinuz
40 dd if=${WORKDIR}/vmlinuz bs=1 count=11732 > ${WORKDIR}/vmlinuh
41 dd if=${WORKDIR}/vmlinuz bs=1 skip=11732 count=975109 | gzip -dc > ${WORKDIR}/vmlinux
42 dd if=${WORKDIR}/vmlinuz bs=1 skip=986841 > ${WORKDIR}/vmlinut
43 cat ${WORKDIR}/vmlinux | sed \
45 -e 's/\x01\x31\x2c\xff/\x00\x1e\x84\x7f/' \
46 | gzip -9 -c > ${WORKDIR}/vmlinux.gz
47 # -e 's/flash_sda\x00/hdd_sda\x00\x00\x00/' \
48 # -e 's/flash_\x00/hdd_\x00\x00\x00/' \
49 # -e 's/flash_sd%c\x00/hdd_sd%c\x00\x00\x00/' \
50 cat ${WORKDIR}/vmlinuh ${WORKDIR}/vmlinux.gz ${WORKDIR}/vmlinut > ${WORKDIR}/vmlinuz
51 # dd if=/dev/zero of=${WORKDIR}/padding bs=1 count=9
52 # cat ${WORKDIR}/vmlinuh ${WORKDIR}/vmlinux.gz ${WORKDIR}/padding ${WORKDIR}/vmlinut > ${WORKDIR}/vmlinuz
53 install -d ${DEPLOY_DIR}/images
54 install -m 0644 ${WORKDIR}/vmlinuz ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}