2 DESCRIPTION = "Linux kernel for the Linksys NSLU2 device"
4 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
7 KERNEL_SUFFIX = "openslug"
9 SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.2.tar.bz2 \
10 file://nslu2_2.6.11.patch;patch=1 \
11 file://usbnet.patch;patch=1 \
12 file://ixp4xx_copy_from.patch;patch=1 \
13 file://anonymiser.patch;patch=1 \
14 file://xscale-reset.patch;patch=1 \
15 file://mtd-shutdown.patch;patch=1 \
19 file://nslu2-setup.c \
23 S = "${WORKDIR}/linux-2.6.11.2"
25 COMPATIBLE_HOST = 'arm.*-linux'
30 KERNEL_IMAGETYPE = "zImage"
31 CMDLINE_CONSOLE ?= "ttyS0,115200n8"
32 CMDLINE_ROOT ?= "root=/dev/mtdblock4 rw rootfstype=jffs2 mem=32M@0x00000000 init=/linuxrc reboot=s"
33 #CMDLINE_ROOT ?= "root=/dev/ram0 rw rootfstype=ext2,jffs2 initrd=0x01000000,10M init=/linuxrc mem=32M@0x00000000"
34 CMDLINE = "${CMDLINE_ROOT} ${CMDLINE_CONSOLE}"
36 do_configure_prepend() {
37 install -m 0644 ${WORKDIR}/defconfig ${S}/.config
38 install -m 0644 ${WORKDIR}/x1205-rtc.c ${S}/drivers/i2c/chips/x1205-rtc.c
39 install -m 0644 ${WORKDIR}/nslu2-io.c ${S}/arch/arm/mach-ixp4xx/nslu2-io.c
40 install -m 0644 ${WORKDIR}/nslu2-setup.c ${S}/arch/arm/mach-ixp4xx/nslu2-setup.c
41 install -m 0644 ${WORKDIR}/nslu2-pci.c ${S}/arch/arm/mach-ixp4xx/nslu2-pci.c
42 install -m 0644 ${WORKDIR}/nslu2-part.c ${S}/arch/arm/mach-ixp4xx/nslu2-part.c
43 install -m 0644 ${WORKDIR}/nslu2.h ${S}/include/asm-arm/arch-ixp4xx/nslu2.h
44 echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
45 rm -rf ${S}/include/asm-arm/arch ${S}/include/asm-arm/proc \
46 ${S}/include/asm-arm/.proc ${S}/include/asm-arm/.arch
50 install -d ${DEPLOY_DIR}/images
51 install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}
54 do_deploy[dirs] = "${S}"
56 addtask deploy before do_build after do_compile
59 # Don't build openslug kernel unless we're targeting an nslu2
60 mach = bb.data.getVar("MACHINE", d, 1)
61 dist = bb.data.getVar("DISTRO", d, 1)
62 if mach != 'nslu2' or dist != 'openslug':
63 raise bb.parse.SkipPackage("OpenSlug only builds for the Linksys NSLU2")