2 DESCRIPTION = "Linux kernel for the Compulab PXA270 system"
6 # Note, the compulab package contains a binary NAND driver that is not
8 # if you get a md5 sum error on x270-linux-drv.zip, compulab has probably
9 # changed the binary. Remove it and the md5 file from your tmp directory,
10 # and rebuild the kernel. If you still get md5 failures, contact cbrake
11 # on the #oe IRC channel -- this recipe probably needs updated.
13 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2 \
14 file://linux-2.6.16.patch;patch=1 \
16 http://www.compulab.co.il/x270/download/x270-linux-drv.zip;md5sum=05989295a5f99055c2f60f8b6f7abb6b"
18 S = "${WORKDIR}/linux-2.6.16"
20 COMPATIBLE_HOST = 'arm.*-linux'
26 KERNEL_IMAGETYPE = "zImage"
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
36 KNAME=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin
37 install -d ${DEPLOY_DIR_IMAGE}
38 install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${KNAME}
41 python do_compulab_image() {
46 deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
47 kernel_name = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGETYPE}-${MACHINE}.bin', d))
49 img_file = os.path.join(deploy_dir, 'zImage-compulab-pxa270.img')
51 fo = open(img_file, 'wb')
53 image_data = open(kernel_name, 'rb').read()
55 # first write size into first 4 bytes
56 size_s = struct.pack('i', len(image_data))
58 # truncate size if we are running on a 64-bit host
67 do_deploy[dirs] = "${S}"
69 addtask deploy before do_install after do_compile
70 addtask compulab_image before do_install after do_deploy
72 COMPATIBLE_MACHINE = "compulab-pxa270"