Qtopia/X11: Install the right Qtopia XSession start script as well
[vuplus_openembedded] / packages / linux / linux_2.6.24.bb
1 require linux.inc
2
3 # Mark archs/machines that this kernel supports
4 DEFAULT_PREFERENCE = "-1"
5 DEFAULT_PREFERENCE_gesbc-9302 = "1"
6 DEFAULT_PREFERENCE_cm-x270 = "1"
7 DEFAULT_PREFERENCE_mpc8313e-rdb = "1"
8 DEFAULT_PREFERENCE_simpad = "1"
9
10 DEPENDS_append_mpc8313e-rdb = " dtc-native"
11
12 PR = "r7"
13
14 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
15            http://kamikaze.waninkoko.info/patches/2.6.24/kamikaze1/broken-out/squashfs-lzma-2.6.24.patch;patch=1 \
16            file://powerpc-clockres.patch;patch=1 \
17            file://leds-cpu-activity.patch;patch=1 \
18            file://leds-cpu-activity-powerpc.patch;patch=1 \
19            file://defconfig"
20
21 # Real-time preemption. This is experimental and requires a different defconfig.
22 #SRC_URI += " http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.24-rt1.bz2;patch=1"
23
24 SRC_URI_append_simpad = "\
25            file://linux-2.6.24-SIMpad-GPIO-MMC-mod.patch;patch=1 \
26            file://linux-2.6.24-SIMpad-battery-old-way-but-also-with-sysfs.patch;patch=1 \
27            file://linux-2.6.24-SIMpad-cs3-simpad.patch;patch=1 \
28            file://linux-2.6.24-SIMpad-mq200.patch;patch=1 \
29            file://linux-2.6.24-SIMpad-pcmcia.patch;patch=1 \
30            file://linux-2.6.24-SIMpad-serial-gpio_keys-and-cs3-ro.patch;patch=1 \
31            file://linux-2.6.24-SIMpad-ucb1x00-switches.patch;patch=1 \
32            file://linux-2.6.24-SIMpad-ucb1x00-ts-supend-and-accuracy.patch;patch=1 \
33            file://linux-2.6.24-SIMpad-hostap_cs-shared-irq.patch;patch=1 \
34            file://linux-2.6.24-SIMpad-orinoco_cs-shared-irq.patch;patch=1 \ 
35            file://collie-kexec.patch;patch=1 \
36            file://export_atags-r2.patch;patch=1 \
37            "       
38
39 SRC_URI_append_gesbc-9302 = " \
40         file://0001-gesbc-nand.patch;patch=1 \
41         file://0002-gesbc-eth-platform.patch;patch=1 \
42         file://0005-ep93xx-reboot.patch;patch=1 \
43         "
44
45 SRC_URI_append_mpc8313e-rdb = "\
46         file://mpc831x-nand.patch;patch=1 \
47         file://mpc8313e-rdb-leds.patch;patch=1 \
48         file://mpc8313e-rdb-rtc.patch;patch=1"
49
50 CMDLINE_gesbc-9302 = "console=ttyAM0 root=mtd5 rootfstype=jffs2 mtdparts=GESBC-NAND:64m(app),-(data)"
51
52 SRC_URI_append_cm-x270 = " \
53         file://0001-cm-x270-match-type.patch;patch=1 \
54         file://0002-ramdisk_load.patch;patch=1 \
55         file://0003-mmcsd_large_cards-r0.patch;patch=1 \
56         file://0004-cm-x270-nand-simplify-name.patch;patch=1 \
57         file://0005-add-display-set-default-16bpp.patch;patch=1 \
58         "
59
60 CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=1 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2"
61
62 FILES_kernel-image_gesbc-9302 = ""
63
64 DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts"
65 DEVICETREE_FLAGS_mpc8313e-rdb = "-R 8 -S 0x3000"
66 python do_compulab_image() {
67         import os
68         import os.path
69         import struct
70
71         machine = bb.data.getVar('MACHINE', d, 1)
72         if machine == "cm-x270":
73             deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
74             kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
75             img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
76
77             fo = open(img_file, 'wb')
78
79             image_data = open(kernel_file, 'rb').read()
80
81             # first write size into first 4 bytes
82             size_s = struct.pack('i', len(image_data))
83
84             # truncate size if we are running on a 64-bit host
85             size_s = size_s[:4]
86
87             fo.write(size_s)
88             fo.write(image_data)
89             fo.close()
90
91             os.chdir(deploy_dir)
92             link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
93             img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
94             try:
95                 os.unlink(link_file)
96             except:
97                 pass
98             os.symlink(img_file, link_file)
99 }
100
101
102 do_devicetree_image() {
103         if test -n "${DEVICETREE}" ; then
104             dtc -I dts -O dtb ${DEVICETREE_FLAGS} -o ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb ${DEVICETREE}
105
106             cd ${DEPLOY_DIR_IMAGE}
107             rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
108             ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
109         fi
110 }
111
112 addtask compulab_image after do_deploy before do_package
113 addtask devicetree_image after do_deploy before do_package
114