linux-2.6.25: add cm-x270 support
[openembedded.git] / packages / linux / linux_2.6.25.bb
blob0b16209b5e31689232045f0c7e47f6d4eda63818
1 require linux.inc
3 # Mark archs/machines that this kernel supports
4 DEFAULT_PREFERENCE = "-1"
5 DEFAULT_PREFERENCE_mpc8313e-rdb = "1"
6 DEFAULT_PREFERENCE_kilauea = "1"
7 DEFAULT_PREFERENCE_sequoia = "1"
8 DEFAULT_PREFERENCE_cm-x270 = "1"
10 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2 \
11 file://defconfig"
13 SRC_URI_append_mpc8313e-rdb = "\
14 file://mpc831x-nand.patch;patch=1 \
15 file://mpc8313e-rdb-leds.patch;patch=1 \
16 file://mpc8313e-rdb-cardbus.patch;patch=1 \
19 SRC_URI_append_cm-x270 = " \
20 file://0001-cm-x270-match-type.patch;patch=1 \
21 file://0002-ramdisk_load.patch;patch=1 \
22 file://0003-mmcsd_large_cards-r0.patch;patch=1 \
23 file://0004-cm-x270-nand-simplify-name.patch;patch=1 \
24 file://0005-add-display-set-default-16bpp.patch;patch=1 \
27 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"
29 python do_compulab_image() {
30 import os
31 import os.path
32 import struct
34 machine = bb.data.getVar('MACHINE', d, 1)
35 if machine == "cm-x270":
36 deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
37 kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
38 img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
40 fo = open(img_file, 'wb')
42 image_data = open(kernel_file, 'rb').read()
44 # first write size into first 4 bytes
45 size_s = struct.pack('i', len(image_data))
47 # truncate size if we are running on a 64-bit host
48 size_s = size_s[:4]
50 fo.write(size_s)
51 fo.write(image_data)
52 fo.close()
54 os.chdir(deploy_dir)
55 link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
56 img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
57 try:
58 os.unlink(link_file)
59 except:
60 pass
61 os.symlink(img_file, link_file)
65 addtask compulab_image after do_deploy before do_package