surpport seeking the recorded video
[vuplus_openembedded] / recipes / linux / LAB-kernel_cvs.bb
1 SECTION = "kernel"
2 DESCRIPTION = "Liux As Bootloader kernelm"
3 LICENSE = "GPL"
4 PV = "${K_MAJOR}.${K_MINOR}.${K_MICRO}-hh${HHV}+cvs${SRCDATE}"
5
6 #!BIG FAT WARNING:
7 #build this *before* building your real kernel, otherwise external modules will pickup the wrong headers
8
9 DEFAULT_PREFERENCE = "-1"
10
11 COMPATIBLE_HOST = "arm.*-linux"
12 COMPATIBLE_MACHINE = "h2200"
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 = "21"
32 HHV     = "8"
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
37 do_configure() {
38         if [ `grep EXTRAVERSION Makefile | grep hh | awk '{print $3}' | sed s/-hh//` != ${HHV} ]; then
39                 die "-hh version mismatch"
40         fi
41
42         # Substitute our uid/gid so the initramfs gets the right ownership.
43         MY_UID=`id -u`
44         MY_GID=`id -g`
45         sed -e "s/^CONFIG_INITRAMFS_ROOT_UID.*$/CONFIG_INITRAMFS_ROOT_UID=$MY_UID/" \
46             -e "s/^CONFIG_INITRAMFS_ROOT_GID.*$/CONFIG_INITRAMFS_ROOT_GID=$MY_GID/" \
47              ${WORKDIR}/defconfig > ${S}/.config
48
49         install -m 0644 ${WORKDIR}/initramfs_list ${S}/initramfs_list
50
51         yes '' | oe_runmake oldconfig
52 }
53
54 KERNEL_IMAGE_BASE_NAME = "LAB-image-${MACHINE}-${DATETIME}.bin"
55 KERNEL_IMAGE_SYMLINK_NAME =  "LAB-image-${MACHINE}^"
56
57 do_deploy_append() {
58         # Generate the HTC flavor, which must be a multiple of 512 bytes long.
59         cat ${WORKDIR}/greatwall_header arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${WORKDIR}/greatwall_trailer | dd conv=sync of=${DEPLOY_DIR_IMAGE}/LAB-image-${MACHINE}.htc
60 }
61
62 do_stage() {
63 }