enigma2 : change vfd font (skin_user.xml)
[vuplus_openembedded] / recipes / linux / linux_2.6.22.bb
1 require linux.inc
2
3 # Mark archs/machines that this kernel supports
4 DEFAULT_PREFERENCE = "-1"
5 DEFAULT_PREFERENCE_cm-x270 = "-1"
6 DEFAULT_PREFERENCE_bd-neon = "0"
7 DEFAULT_PREFERENCE_mx31moboard = "1"
8
9 PR = "r6"
10
11 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 \
12            ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.19.bz2;patch=1 \
13            file://defconfig \
14            "
15
16 SRC_URI_append_cm-x270 = "\
17         file://0001-cm-x270-base2.patch;patch=1 \
18         file://0002-cm-x270-match-type.patch;patch=1 \
19         file://0003-cm-x270-ide.patch;patch=1 \
20         file://0004-cm-x270-it8152.patch;patch=1 \
21         file://0005-cm-x270-pcmcia.patch;patch=1 \
22         file://0006-ramdisk_load.patch;patch=1 \
23         file://0007-mmcsd_large_cards-r0.patch;patch=1 \
24         file://0008-cm-x270-nand-simplify-name.patch;patch=1"
25
26 SRC_URI_append_mx31moboard = "http://mobots.epfl.ch/mx31moboard/linux-2.6.22-moboard.patch.bz2;patch=1"
27
28 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"
29
30 FILES_kernel-image_cm-x270 = ""
31
32 SRC_URI_append_bd-neon =  " http://www.boundarydevices.com/boundary-2.6.22-2007-07-22.patch.bz2;patch=1"
33
34 python do_compulab_image() {
35         import os
36         import os.path
37         import struct
38
39         machine = bb.data.getVar('MACHINE', d, 1)
40         if machine == "cm-x270":
41             deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
42             kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
43             img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
44
45             fo = open(img_file, 'wb')
46
47             image_data = open(kernel_file, 'rb').read()
48
49             # first write size into first 4 bytes
50             size_s = struct.pack('i', len(image_data))
51
52             # truncate size if we are running on a 64-bit host
53             size_s = size_s[:4]
54
55             fo.write(size_s)
56             fo.write(image_data)
57             fo.close()
58
59             os.chdir(deploy_dir)
60             link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
61             img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
62             try:
63                 os.unlink(link_file)
64             except:
65                 pass
66             os.symlink(img_file, link_file)
67 }
68
69 addtask compulab_image after do_deploy before do_package