2 DESCRIPTION = "Linux kernel for the Linksys NSLU2 device"
4 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
7 SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.bz2 \
8 http://nslu.sf.net/downloads/xfs-2.4.22-all-i386.bz2;patch=1 \
9 http://nslu.sf.net/downloads/2.4.22-xfs-nslu2.patch.bz2;patch=1 \
10 file://config-fixes.patch;patch=1 \
11 file://nofpu.patch;patch=1 \
12 file://short_loadbytes.patch;patch=1 \
13 file://gcc3-userfuncs.patch;patch=1 \
14 file://gcc-registerparanoia.patch;patch=1 \
15 file://linux-2.4.24-attribute-used.patch;patch=1 \
16 file://double_cpdo.patch;patch=1 \
18 S = "${WORKDIR}/linux-2.4.22"
21 # Don't build unless we're targeting an nslu2
22 if bb.data.getVar("MACHINE", d, 1) != "nslu2":
23 raise bb.parse.SkipPackage("NSLU2 kernel only builds for the Linksys NSLU2")
26 COMPATIBLE_HOST = 'arm.*-linux'
31 KERNEL_IMAGETYPE = "zImage"
32 KERNEL_SUFFIX ?= "nslu2-linksys"
33 CMDLINE_CONSOLE ?= "ttyS0,115200"
34 CMDLINE_ROOT = "root=/dev/ram0 initrd=0x01000000,10M mem=32M@0x00000000"
35 CMDLINE = "${CMDLINE_CONSOLE} ${CMDLINE_ROOT}"
37 do_configure_prepend() {
38 install -m 0644 ${WORKDIR}/defconfig ${S}/.config
39 echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
40 rm -rf ${S}/include/asm-arm/arch ${S}/include/asm-arm/proc \
41 ${S}/include/asm-arm/.proc ${S}/include/asm-arm/.arch
45 install -d ${DEPLOY_DIR_IMAGE}
46 install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}
49 do_deploy[dirs] = "${S}"
51 addtask deploy before do_build after do_compile