summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-qoriq.inc
diff options
context:
space:
mode:
authorJens Rehsack <sno@netbsd.org>2020-04-07 12:32:47 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2020-04-07 16:09:42 -0300
commit6f63fe25adb4935a71255823891749fed0fbdeb9 (patch)
tree119bfd012a0bd58c89d6a6985ef16dd7bb334569 /recipes-kernel/linux/linux-qoriq.inc
parent69652b4462808810ac189af030d9fc13a89e3b27 (diff)
downloadmeta-freescale-6f63fe25adb4935a71255823891749fed0fbdeb9.tar.gz
linux-qoriq: harmonize kernel recipes
Move everything which is common used of linux-qoriq kernels into linux-qoriq.inc and require it from both existing kernel recipes. This should avoid copy'n'waste even for future kernels. Signed-off-by: Jens Rehsack <sno@netbsd.org>
Diffstat (limited to 'recipes-kernel/linux/linux-qoriq.inc')
-rw-r--r--recipes-kernel/linux/linux-qoriq.inc65
1 files changed, 65 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc
new file mode 100644
index 00000000..7f70260a
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq.inc
@@ -0,0 +1,65 @@
1inherit kernel qoriq_build_64bit_kernel siteinfo
2inherit fsl-kernel-localversion
3
4SUMMARY = "Linux Kernel for NXP QorIQ platforms"
5SECTION = "kernel"
6LICENSE = "GPLv2"
7
8S = "${WORKDIR}/git"
9
10DEPENDS_append = " libgcc"
11# not put Images into /boot of rootfs, install kernel-image if needed
12RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
13
14KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
15KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
16KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
17
18ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
19ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
20
21SCMVERSION ?= "y"
22LOCALVERSION = ""
23DELTA_KERNEL_DEFCONFIG ?= ""
24DELTA_KERNEL_DEFCONFIG_prepend_qoriq-arm64 = "lsdk.config "
25DELTA_KERNEL_DEFCONFIG_prepend_fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config "
26DELTA_KERNEL_DEFCONFIG_prepend_ls102xa = "multi_v7_lpae.config lsdk.config "
27
28do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot"
29do_merge_delta_config[dirs] = "${B}"
30
31do_merge_delta_config() {
32 # create config with make config
33 oe_runmake -C ${S} O=${B} ${KERNEL_DEFCONFIG}
34
35 # check if bigendian is enabled
36 if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
37 echo "CONFIG_CPU_BIG_ENDIAN=y" >> .config
38 echo "CONFIG_MTD_CFI_BE_BYTE_SWAP=y" >> .config
39 fi
40
41 # add config fragments
42 for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
43 if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then
44 oe_runmake -C ${S} O=${B} ${deltacfg}
45 elif [ -f "${WORKDIR}/${deltacfg}" ]; then
46 ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
47 elif [ -f "${deltacfg}" ]; then
48 ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
49 fi
50 done
51 cp .config ${WORKDIR}/defconfig
52}
53addtask merge_delta_config before do_preconfigure after do_patch
54
55# The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b)
56do_compile_prepend_fsl-lsch2-32b() {
57 ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale
58}
59
60do_install_prepend_fsl-lsch2-32b() {
61 rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale
62}
63
64FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*"
65COMPATIBLE_MACHINE = "(qoriq)"