]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/LAB-kernel_cvs.bb
Add a .bb file to build LAB for h2200 from 2.6.16-hh0 circa 20060421.
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / LAB-kernel_cvs.bb
1 SECTION = "kernel"
2 DESCRIPTION = "Liux As Bootloader kernelm"
3 MAINTAINER = "Koen Kooi <koen@linuxtogo.org>"
4 LICENSE = "GPL"
5 PV = "${K_MAJOR}.${K_MINOR}.${K_MICRO}-hh${HHV}+cvs${CVSDATE}"
6
7 #!BIG FAT WARNING:
8 #build this *before* building your real kernel, otherwise external modules will pickup the wrong headers
9
10 DEFAULT_PREFERENCE = "-1"
11
12 COMPATIBLE_HOST = "arm.*-linux"
13
14 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/handhelds-pxa-${PV}"
15
16 SRC_URI = "${HANDHELDS_CVS};module=linux/kernel26  \
17            file://initramfs_list \
18            file://defconfig \
19            file://greatwall_header \
20            file://greatwall_trailer"
21
22 S = "${WORKDIR}/kernel26"
23
24 inherit kernel
25
26 FILES_kernel-image_h2200 = ""
27 ALLOW_EMPTY_kernel-image_h2200 = 1
28
29 K_MAJOR = "2"
30 K_MINOR = "6"
31 K_MICRO = "16"
32 HHV     = "0"
33 #
34
35 KERNEL_PRIORITY = "${@'%d' % (int(bb.data.getVar('K_MAJOR',d,1)) * 100000000 + int(bb.data.getVar('K_MINOR',d,1)) * 1000000 + int(bb.data.getVar('K_MICRO',d,1)) * 10000 + float(bb.data.getVar('HHV',d,1)))}"
36 do_configure() {
37         # Substitute our uid/gid so the initramfs gets the right ownership.
38         MY_UID=`id -u`
39         MY_GID=`id -g`
40         sed -e "s/^CONFIG_INITRAMFS_ROOT_UID.*$/CONFIG_INITRAMFS_ROOT_UID=$MY_UID/" \
41             -e "s/^CONFIG_INITRAMFS_ROOT_GID.*$/CONFIG_INITRAMFS_ROOT_GID=$MY_GID/" \
42              ${WORKDIR}/defconfig > ${S}/.config
43
44         install -m 0644 ${WORKDIR}/initramfs_list ${S}/initramfs_list
45
46         yes '' | oe_runmake oldconfig
47 }
48
49 do_deploy() {
50         install -d ${DEPLOY_DIR}/images
51         install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR}/images/LAB-image-${MACHINE}
52
53         # Generate the HTC flavor, which must be a multiple of 512 bytes long.
54         cat ${WORKDIR}/greatwall_header arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${WORKDIR}/greatwall_trailer | dd conv=sync of=${DEPLOY_DIR}/images/LAB-image-${MACHINE}.htc
55 }
56
57 do_deploy[dirs] = "${S}"
58
59 addtask deploy before do_build after do_compile
60