]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/openslug-kernel_2.6.11.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / openslug-kernel_2.6.11.bb
1 SECTION = "kernel"
2 DESCRIPTION = "Linux kernel for the Linksys NSLU2 device"
3 LICENSE = "GPL"
4 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
5 PR = "r7"
6
7 KERNEL_SUFFIX = "openslug"
8
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://defconfig \
14            file://x1205-rtc.c \
15            file://nslu2-io.c \
16            file://nslu2-setup.c \
17            file://nslu2-pci.c \
18            file://nslu2-part.c \
19            file://nslu2.h" 
20 S = "${WORKDIR}/linux-2.6.11.2"
21
22 COMPATIBLE_HOST = 'arm.*-linux'
23
24 inherit kernel
25
26 ARCH = "arm"
27 KERNEL_IMAGETYPE = "zImage"
28 CMDLINE_CONSOLE ?= "ttyS0,115200n8"
29 #CMDLINE_ROOT ?= "root=/dev/mtdblock4 rootfstype=jffs2 mem=32M@0x00000000"
30 CMDLINE_ROOT ?= "root=/dev/ram0 rw rootfstype=ext2,jffs2 initrd=0x01000000,10M init=/linuxrc mem=32M@0x00000000"
31 CMDLINE = "${CMDLINE_ROOT} ${CMDLINE_CONSOLE}"
32
33 do_configure_prepend() {
34         install -m 0644 ${WORKDIR}/defconfig ${S}/.config
35         install -m 0644 ${WORKDIR}/x1205-rtc.c ${S}/drivers/i2c/chips/x1205-rtc.c
36         install -m 0644 ${WORKDIR}/nslu2-io.c ${S}/arch/arm/mach-ixp4xx/nslu2-io.c
37         install -m 0644 ${WORKDIR}/nslu2-setup.c ${S}/arch/arm/mach-ixp4xx/nslu2-setup.c
38         install -m 0644 ${WORKDIR}/nslu2-pci.c ${S}/arch/arm/mach-ixp4xx/nslu2-pci.c
39         install -m 0644 ${WORKDIR}/nslu2-part.c ${S}/arch/arm/mach-ixp4xx/nslu2-part.c
40         install -m 0644 ${WORKDIR}/nslu2.h ${S}/include/asm-arm/arch-ixp4xx/nslu2.h
41         echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
42         rm -rf ${S}/include/asm-arm/arch ${S}/include/asm-arm/proc \
43                ${S}/include/asm-arm/.proc ${S}/include/asm-arm/.arch
44 }
45
46 do_deploy() {
47         install -d ${DEPLOY_DIR}/images
48         install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR}/images/${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}
49 }
50
51 do_deploy[dirs] = "${S}"
52
53 addtask deploy before do_build after do_compile
54
55 python () {
56         # Don't build openslug kernel unless we're targeting an nslu2
57         mach = bb.data.getVar("MACHINE", d, 1)
58         dist = bb.data.getVar("DISTRO", d, 1)
59         if mach != 'nslu2' or dist != 'openslug':
60                 raise bb.parse.SkipPackage("OpenSlug only builds for the Linksys NSLU2")
61 }