Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / recipes / linux / linux-ml403-mvista-2.6.x_git.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 Xilinx ML403 Virtex 4 fpga board"
5 LICENSE = "GPL"
6 DEPENDS = "git-native"
7 PR = "r1"
8 DEFAULT_PREFERENCE = "-1"
9 COMPATIBLE_MACHINE = "xilinx-ml403"
10 SRC_URI = "git://source.mvista.com/git/linux-xilinx-26;protocol=git \
11            file://xilinx-ml403_defconfig "
12
13 inherit kernel xilinx-bsp
14
15 S = "${WORKDIR}/git"
16
17
18 FILES_kernel-image = "/boot/zImage.elf"
19
20 export OS = "Linux"
21 ARCH = "ppc"
22 KERNEL_IMAGETYPE = "zImage"
23 KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
24
25
26 do_configure() {
27                
28                 install -m 644 ${WORKDIR}/xilinx-ml403_defconfig ${S}/.config
29                 make ARCH=${ARCH} oldconfig
30 }
31
32 do_stage_append () {
33 #need ppc platforms includes + friends in order for external kernel modules to compile as headers a$
34
35        install -d ${STAGING_KERNEL_DIR}/arch/
36        cp -pPR arch/ppc ${STAGING_KERNEL_DIR}/arch/
37        cp -pPR arch/powerpc ${STAGING_KERNEL_DIR}/arch/
38
39        install -d ${STAGING_KERNEL_DIR}/include/asm
40        cp -pPR include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
41        cp -pPR include/asm-ppc ${STAGING_KERNEL_DIR}/include/
42 }
43
44
45
46 do_deploy() {
47         install -d ${DEPLOY_DIR_IMAGE}
48         install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
49                  ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
50 }
51
52 #seems like 2.6.21 kernel images have moved (or is this only for the Denx kernel ?)
53 #so we need to copy the kernel image where kernel.bbclass expects it to be
54 do_install_prepend() {
55         install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
56                         arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
57 }