linux-omap 2.6.39: initial add with beagleboard support
[openembedded.git] / recipes / linux / compulab-pxa270_2.6.16.bb
blob3f46f36e9e8461d42b9e764a65eb29ba9d96bd7f
1 SECTION = "kernel"
2 DESCRIPTION = "Linux kernel for the Compulab PXA270 system"
3 LICENSE = "GPLv2"
4 PR = "r6"
5 do_unpack[depends] += "unzip-native:do_populate_sysroot"
7 # Note, the compulab package contains a binary NAND driver that is not
8 # EABI compatible
9 # if you get a md5 sum error on x270-linux-drv.zip, compulab has probably
10 # changed the binary. Remove it and the md5 file from your tmp directory,
11 # and rebuild the kernel. If you still get md5 failures, contact cbrake
12 # on the #oe IRC channel -- this recipe probably needs updated.
14 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2;name=kernel \
15 file://linux-2.6.16.patch \
16 file://defconfig \
17 http://www.compulab.co.il/x270/download/x270-linux-drv.zip;name=x270patch"
19 S = "${WORKDIR}/linux-2.6.16"
21 COMPATIBLE_HOST = 'arm.*-linux'
23 inherit kernel
24 inherit package
26 ARCH = "arm"
28 FILES_kernel-image = ""
30 do_configure_prepend() {
31 install -m 0644 ${WORKDIR}/defconfig ${S}/.config
32 install -m 0644 ${WORKDIR}/2.6.16/CL_FlashDrv ${S}/drivers/block/cl_flash
35 python do_compulab_image() {
36 import os
37 import os.path
38 import struct
40 deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
41 kernel_name = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGETYPE}-${MACHINE}.bin', d))
43 img_file = os.path.join(deploy_dir, 'zImage-compulab-pxa270.img')
45 fo = open(img_file, 'wb')
47 image_data = open(kernel_name, 'rb').read()
49 # first write size into first 4 bytes
50 size_s = struct.pack('i', len(image_data))
52 # truncate size if we are running on a 64-bit host
53 size_s = size_s[:4]
55 fo.write(size_s)
56 fo.write(image_data)
57 fo.close()
60 addtask compulab_image before do_build after do_deploy
62 COMPATIBLE_MACHINE = "cm-x270"
65 SRC_URI[kernel.md5sum] = "9a91b2719949ff0856b40bc467fd47be"
66 SRC_URI[kernel.sha256sum] = "1200dcc7e60fcdaf68618dba991917a47e41e67099e8b22143976ec972e2cad7"
67 SRC_URI[x270patch.md5sum] = "951fc1494f03eb9d40e1ae66f462cbe6"
68 SRC_URI[x270patch.sha256sum] = "51b4526a5670a071a6bde749620e188bc417c9632548164522ca55be07d7813b"