aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-qoriq_4.1.bb
blob: 1d3bcd5c8fda1dd17629baad7061706e85478bef (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
inherit kernel kernel-arch qoriq_build_64bit_kernel
require recipes-kernel/linux/linux-dtb.inc

DESCRIPTION = "Linux kernel for Freescale platforms"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"

SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \
    file://modify-defconfig-t1040-nr-cpus.patch \
    file://fix-the-compile-issue-under-gcc6.patch \
    file://only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch \
"
SRCREV = "bd51baffc04ecc73f933aee1c3a37c8b44b889a7"

KSRC ?= ""
S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}'

DEPENDS_append = " libgcc"
# not put Images into /boot of rootfs, install kernel-image if needed
RDEPENDS_kernel-base = ""

KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"

SCMVERSION ?= "y"
DELTA_KERNEL_DEFCONFIG ?= ""
do_configure_prepend() {
    # copy desired defconfig so we pick it up for the real kernel_do_configure
    cp ${KERNEL_DEFCONFIG} ${B}/.config
    
    # add config fragments
    for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
        if [ -f "${deltacfg}" ]; then
            ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
        elif [ -f "${WORKDIR}/${deltacfg}" ]; then
            ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
        elif [ -f "${S}/arch/${ARCH}/configs/${deltacfg}" ]; then
            ${S}/scripts/kconfig/merge_config.sh -m .config \
                ${S}/arch/${ARCH}/configs/${deltacfg}
        fi
    done
    
    #add git revision to the local version
    if [ "${SCMVERSION}" = "y" ]; then
        # append sdk version if SDK_VERSION is defined
        sdkversion=''
        if [ -n "${SDK_VERSION}" ]; then
            sdkversion="-${SDK_VERSION}"
        fi
        head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
        printf "%s%s%s" $sdkversion +g $head > ${B}/.scmversion
    fi
}

# make everything compatible for the time being
COMPATIBLE_MACHINE_$MACHINE = "$MACHINE"