Merge commit 'origin/opendreambox-1.6' into vuplus-1.6
[vuplus_openembedded] / recipes / linux / linux_2.6.23.bb
1 require linux.inc
2
3 # Mark archs/machines that this kernel supports
4 DEFAULT_PREFERENCE = "-1"
5 DEFAULT_PREFERENCE_mpc8313e-rdb = "1"
6 DEFAULT_PREFERENCE_mpc8323e-rdb = "1"
7 DEFAULT_PREFERENCE_avr32 = "1"
8
9 PR = "r13"
10
11 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
12            file://binutils-buildid-arm.patch;patch=1 \
13            file://kallsyms-missing-include.patch;patch=1 \
14            file://defconfig \
15            "
16
17 # Bug fixes on the 2.6.23.x stable branch
18 SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-2.6.23.17.bz2;patch=1"
19 # Real-time preemption (includes CFS). This is experimental and requires a different defconfig.
20 #SRC_URI += "file://patch-2.6.23.12-rt14;patch=1"
21 # Only the Completely Fair Scheduler (CFS), the official backport from 2.6.24 (adapted for 2.6.23.17)
22 SRC_URI += "file://sched-cfs-v2.6.23.12-v24.1.patch;patch=1"
23 # Add support for squashfs-lzma (a highly compressed read-only filesystem)
24 SRC_URI += "http://kamikaze.waninkoko.info/patches/2.6.23/klight1/broken-out/squashfs-lzma-2.6.23.patch;patch=1"
25
26 SRC_URI += "file://time.h.patch;patch=1"
27
28 # The Atmel patch doesn't apply against 2.6.23.12  :( 
29 SRC_URI_avr32 = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
30                  file://defconfig \
31                  http://avr32linux.org/twiki/pub/Main/LinuxPatches/linux-2.6.23.atmel.3.patch.bz2;patch=1 \
32                 "
33 SRC_URI_append_em-x270 = "\
34         file://em-x270.patch;patch=1 "
35
36 SRC_URI_append_cm-x270 = "\
37         file://0001-cm-x270-base2.patch;patch=1 \
38         file://0002-cm-x270-match-type.patch;patch=1 \
39         file://0003-cm-x270-ide.patch;patch=1 \
40         file://0004-cm-x270-it8152.patch;patch=1 \
41         file://0005-cm-x270-pcmcia.patch;patch=1 \
42         file://0006-ramdisk_load.patch;patch=1 \
43         file://0007-mmcsd_large_cards-r0.patch;patch=1 \
44         file://0008-cm-x270-nand-simplify-name.patch;patch=1"
45
46 SRC_URI_append_mpc8313e-rdb = "\
47         file://mpc831x-nand.patch;patch=1 \
48         file://mpc8313e-rdb-leds.patch;patch=1 \
49         file://mpc8313e-rdb-rtc.patch;patch=1"
50
51 SRC_URI_append_mpc8323e-rdb = "\
52         file://mpc832x-leds.patch;patch=1" 
53
54 CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=8 bpp=16 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"
55
56 FILES_kernel-image_cm-x270 = ""
57
58 python do_compulab_image() {
59         import os
60         import os.path
61         import struct
62
63         machine = bb.data.getVar('MACHINE', d, 1)
64         if machine == "cm-x270":
65             deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
66             kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
67             img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
68
69             fo = open(img_file, 'wb')
70
71             image_data = open(kernel_file, 'rb').read()
72
73             # first write size into first 4 bytes
74             size_s = struct.pack('i', len(image_data))
75
76             # truncate size if we are running on a 64-bit host
77             size_s = size_s[:4]
78
79             fo.write(size_s)
80             fo.write(image_data)
81             fo.close()
82
83             os.chdir(deploy_dir)
84             link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
85             img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
86             try:
87                 os.unlink(link_file)
88             except:
89                 pass
90             os.symlink(img_file, link_file)
91 }
92
93
94 addtask compulab_image after do_package before do_build
95