bc876ebf34672f841f172fff81a46c62c46d0c3a
[vuplus_openembedded] / packages / linux / linux-dht-walnut_2.6.20.bb
1 # Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
2 # Released under the MIT license (see packages/COPYING)
3 SECTION = "kernel"
4 DESCRIPTION = "Linux kernel for DHT-Walnut (ppc)  machine"
5 LICENSE = "GPL"
6 PR = "r3"
7 DEPENDS = "u-boot"
8
9 COMPATIBLE_MACHINE = "dht-walnut"
10
11 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
12            file://dht-walnut_defconfig"
13
14
15 S = "${WORKDIR}/linux-${PV}"
16
17 inherit kernel
18
19
20 FILES_kernel-image = "/boot/zImage.elf"
21
22 export OS = "Linux"
23 ARCH = "ppc"
24 KERNEL_IMAGETYPE = "zImage"
25 KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
26
27
28
29
30 do_configure_prepend() {
31         install -m 0644 ${WORKDIR}/dht-walnut_defconfig ${S}/.config
32 }
33
34
35 do_stage_append () {
36 #need ppc platforms includes + friends in order for external kernel modules to compile as headers as still split
37
38        install -d ${STAGING_KERNEL_DIR}/arch/
39        cp -a arch/ppc ${STAGING_KERNEL_DIR}/arch/
40        cp -a arch/powerpc ${STAGING_KERNEL_DIR}/arch/
41
42        cp -a include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
43        cp -a include/asm-ppc ${STAGING_KERNEL_DIR}/include/
44 }
45
46
47
48
49
50 do_install_append () {
51         install -d  ${DEPLOY_DIR_IMAGE}
52         install -m 0755 arch/ppc/boot/images/zImage.elf \ 
53                 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.elf
54         install -m 0755 vmlinux ${DEPLOY_DIR_IMAGE}/
55         powerpc${TARGET_VENDOR}-${TARGET_OS}-objcopy -O binary -R .note -R .comment -S \ 
56                ${DEPLOY_DIR_IMAGE}/vmlinux ${DEPLOY_DIR_IMAGE}/linux.bin
57         gzip -f -9 ${DEPLOY_DIR_IMAGE}/linux.bin
58         mkimage -A ppc -O linux -T kernel -C gzip -a 0 -e 0 -n "ppc405"+${PV} -d ${DEPLOY_DIR_IMAGE}/linux.bin.gz \ 
59                 ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${MACHINE}-${DATETIME}.bin        
60         rm ${DEPLOY_DIR_IMAGE}/vmlinux
61         rm ${DEPLOY_DIR_IMAGE}/linux.bin.gz
62
63
64 }
65
66
67 pkg_postinst_kernel () {
68         true
69 }
70
71 pkg_postrm_kernel () {
72         true
73 }
74
75
76
77