diff options
-rw-r--r-- | recipes-kernel/linux/linux-qoriq_4.14.bb | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-qoriq_4.14.bb b/recipes-kernel/linux/linux-qoriq_4.14.bb new file mode 100644 index 00000000..0a708fe1 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq_4.14.bb | |||
@@ -0,0 +1,63 @@ | |||
1 | inherit kernel qoriq_build_64bit_kernel | ||
2 | inherit fsl-kernel-localversion | ||
3 | |||
4 | SUMMARY = "Linux Kernel for NXP QorIQ platforms" | ||
5 | SECTION = "kernel" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
8 | |||
9 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \ | ||
10 | " | ||
11 | SRCREV = "dfe1b1320d85c5eea99af54dfbf5e9923c3392cc" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | DEPENDS_append = " libgcc" | ||
16 | # not put Images into /boot of rootfs, install kernel-image if needed | ||
17 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" | ||
18 | |||
19 | KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" | ||
20 | KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" | ||
21 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" | ||
22 | |||
23 | ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" | ||
24 | ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME" | ||
25 | |||
26 | SCMVERSION ?= "y" | ||
27 | LOCALVERSION = "" | ||
28 | DELTA_KERNEL_DEFCONFIG ?= "" | ||
29 | DELTA_KERNEL_DEFCONFIG_prepend_qoriq-arm64 = "lsdk.config " | ||
30 | DELTA_KERNEL_DEFCONFIG_prepend_fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " | ||
31 | DELTA_KERNEL_DEFCONFIG_prepend_ls102xa = "multi_v7_lpae.config lsdk.config " | ||
32 | |||
33 | do_merge_delta_config[dirs] = "${B}" | ||
34 | |||
35 | do_merge_delta_config() { | ||
36 | # create config with make config | ||
37 | oe_runmake -C ${S} O=${B} ${KERNEL_DEFCONFIG} | ||
38 | |||
39 | # add config fragments | ||
40 | for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do | ||
41 | if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then | ||
42 | oe_runmake -C ${S} O=${B} ${deltacfg} | ||
43 | elif [ -f "${WORKDIR}/${deltacfg}" ]; then | ||
44 | ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} | ||
45 | elif [ -f "${deltacfg}" ]; then | ||
46 | ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} | ||
47 | fi | ||
48 | done | ||
49 | cp .config ${WORKDIR}/defconfig | ||
50 | } | ||
51 | addtask merge_delta_config before do_preconfigure after do_patch | ||
52 | |||
53 | # The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b) | ||
54 | do_compile_prepend_fsl-lsch2-32b() { | ||
55 | ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale | ||
56 | } | ||
57 | |||
58 | do_install_prepend_fsl-lsch2-32b() { | ||
59 | rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale | ||
60 | } | ||
61 | |||
62 | FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" | ||
63 | COMPATIBLE_MACHINE = "(qoriq)" | ||