summaryrefslogtreecommitdiff
path: root/packages/linux/linux-ml403-slab-2.6.x_git.bb
blob: ad823c2aa6f167606dd0e74ecc644cc2fed24b36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#Kernel for the xilinx-ml403 board using SecretLabs git tree
# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SECTION = "kernel"
DESCRIPTION = "Linux kernel for Xilinx ML403 Virtex 4 fpga board"
LICENSE = "GPL"
PR = "r2"
PV = "2.6+git${SRCDATE}"

COMPATIBLE_MACHINE = "xilinx-ml403"

SRC_URI = "file://xilinx-ml403_defconfig "

inherit kernel xilinx-bsp

S = "${WORKDIR}/linux-2.6"


FILES_kernel-image = "/boot/zImage.elf"

export OS = "Linux"
ARCH = "ppc"
KERNEL_IMAGETYPE = "zImage"
KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"

#make sure git-native gets build before as
python __anonymous () {

    import bb


    depends = bb.data.getVarFlag('do_fetch', 'depends', d) or ""
    depends = depends + " git-native:do_populate_staging"
    bb.data.setVarFlag('do_fetch', 'depends', depends, d)

}


do_fetch () { 

        cd ${WORKDIR} 
        ${STAGING_BINDIR_NATIVE}/git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 
        cd linux-2.6                
        ${STAGING_BINDIR_NATIVE}/git clone git://git.secretlab.ca/git/linux-2.6-virtex.git  master 
} 



do_configure() {

                install -m 644 ${WORKDIR}/xilinx-ml403_defconfig ${S}/.config
                make ARCH=${ARCH} oldconfig
}

do_stage_append () {
#need ppc platforms includes + friends in order for external kernel modules to compile as headers a$

       install -d ${STAGING_KERNEL_DIR}/arch/
       cp -pPR arch/ppc ${STAGING_KERNEL_DIR}/arch/
       cp -pPR arch/powerpc ${STAGING_KERNEL_DIR}/arch/

       install -d ${STAGING_KERNEL_DIR}/include/asm
       cp -pPR include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
       cp -pPR include/asm-ppc ${STAGING_KERNEL_DIR}/include/
}



do_deploy() {
        install -d ${DEPLOY_DIR_IMAGE}
        install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
                 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
}

#seems like 2.6.21 kernel images have moved (or is this only for the Denx kernel ?)
#so we need to copy the kernel image where kernel.bbclass expects it to be
do_install_prepend() {
        install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
                        arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
}