iscsi-target: Add package iscsi-target
[vuplus_openembedded] / packages / linux / linux-ml403-slab-2.6.x_git.bb
1 #Kernel for the xilinx-ml403 board using SecretLabs git tree
2 # Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
3 # Released under the MIT license (see packages/COPYING)
4 SECTION = "kernel"
5 DESCRIPTION = "Linux kernel for Xilinx ML403 Virtex 4 fpga board"
6 LICENSE = "GPL"
7 PR = "r2"
8 PV = "2.6+git${SRCDATE}"
9
10 COMPATIBLE_MACHINE = "xilinx-ml403"
11
12 SRC_URI = "file://xilinx-ml403_defconfig "
13
14 inherit kernel xilinx-bsp
15
16 S = "${WORKDIR}/linux-2.6"
17
18
19 FILES_kernel-image = "/boot/zImage.elf"
20
21 export OS = "Linux"
22 ARCH = "ppc"
23 KERNEL_IMAGETYPE = "zImage"
24 KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
25
26 #make sure git-native gets build before as
27 python __anonymous () {
28
29     import bb
30
31
32     depends = bb.data.getVarFlag('do_fetch', 'depends', d) or ""
33     depends = depends + " git-native:do_populate_staging"
34     bb.data.setVarFlag('do_fetch', 'depends', depends, d)
35
36 }
37
38
39 do_fetch () { 
40
41         cd ${WORKDIR} 
42         ${STAGING_BINDIR_NATIVE}/git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 
43         cd linux-2.6                
44         ${STAGING_BINDIR_NATIVE}/git clone git://git.secretlab.ca/git/linux-2.6-virtex.git  master 
45
46
47
48
49 do_configure() {
50
51                 install -m 644 ${WORKDIR}/xilinx-ml403_defconfig ${S}/.config
52                 make ARCH=${ARCH} oldconfig
53 }
54
55 do_stage_append () {
56 #need ppc platforms includes + friends in order for external kernel modules to compile as headers a$
57
58        install -d ${STAGING_KERNEL_DIR}/arch/
59        cp -pPR arch/ppc ${STAGING_KERNEL_DIR}/arch/
60        cp -pPR arch/powerpc ${STAGING_KERNEL_DIR}/arch/
61
62        install -d ${STAGING_KERNEL_DIR}/include/asm
63        cp -pPR include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
64        cp -pPR include/asm-ppc ${STAGING_KERNEL_DIR}/include/
65 }
66
67
68
69 do_deploy() {
70         install -d ${DEPLOY_DIR_IMAGE}
71         install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
72                  ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
73 }
74
75 #seems like 2.6.21 kernel images have moved (or is this only for the Denx kernel ?)
76 #so we need to copy the kernel image where kernel.bbclass expects it to be
77 do_install_prepend() {
78         install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
79                         arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
80 }