Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / 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 FILE_PR = "r12"
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.12.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
22 SRC_URI += "http://people.redhat.com/mingo/cfs-scheduler/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 # The Atmel patch doesn't apply against 2.6.23.12  :( 
27 SRC_URI_avr32 = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
28                  file://defconfig \
29                  http://avr32linux.org/twiki/pub/Main/LinuxPatches/linux-2.6.23.atmel.3.patch.bz2;patch=1 \
30                 "
31
32 SRC_URI_append_cm-x270 = "\
33         file://0001-cm-x270-base2.patch;patch=1 \
34         file://0002-cm-x270-match-type.patch;patch=1 \
35         file://0003-cm-x270-ide.patch;patch=1 \
36         file://0004-cm-x270-it8152.patch;patch=1 \
37         file://0005-cm-x270-pcmcia.patch;patch=1 \
38         file://0006-ramdisk_load.patch;patch=1 \
39         file://0007-mmcsd_large_cards-r0.patch;patch=1 \
40         file://0008-cm-x270-nand-simplify-name.patch;patch=1"
41
42 SRC_URI_append_mpc8313e-rdb = "\
43         file://mpc831x-nand.patch;patch=1 \
44         file://mpc8313e-rdb-leds.patch;patch=1 \
45         file://mpc8313e-rdb-rtc.patch;patch=1"
46
47 SRC_URI_append_mpc8323e-rdb = "\
48         file://mpc832x-leds.patch;patch=1" 
49
50 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"
51
52 FILES_kernel-image_cm-x270 = ""
53
54 python do_compulab_image() {
55         import os
56         import os.path
57         import struct
58
59         machine = bb.data.getVar('MACHINE', d, 1)
60         if machine == "cm-x270":
61             deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
62             kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
63             img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
64
65             fo = open(img_file, 'wb')
66
67             image_data = open(kernel_file, 'rb').read()
68
69             # first write size into first 4 bytes
70             size_s = struct.pack('i', len(image_data))
71
72             # truncate size if we are running on a 64-bit host
73             size_s = size_s[:4]
74
75             fo.write(size_s)
76             fo.write(image_data)
77             fo.close()
78
79             os.chdir(deploy_dir)
80             link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
81             img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
82             try:
83                 os.unlink(link_file)
84             except:
85                 pass
86             os.symlink(img_file, link_file)
87 }
88
89
90 addtask compulab_image after do_deploy before do_package
91