summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-yocto.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/linux-yocto.inc')
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc51
1 files changed, 37 insertions, 14 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index a85280990b..0132fcffb3 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -1,6 +1,6 @@
1SUMMARY = "Linux kernel" 1SUMMARY = "Linux kernel"
2SECTION = "kernel" 2SECTION = "kernel"
3LICENSE = "GPLv2" 3LICENSE = "GPL-2.0-only"
4HOMEPAGE = "https://www.yoctoproject.org/" 4HOMEPAGE = "https://www.yoctoproject.org/"
5 5
6LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" 6LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
@@ -19,21 +19,23 @@ python () {
19} 19}
20 20
21DEPENDS += "xz-native bc-native" 21DEPENDS += "xz-native bc-native"
22DEPENDS_append_aarch64 = " libgcc" 22DEPENDS:append:aarch64 = " libgcc"
23KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" 23KERNEL_CC:append:aarch64 = " ${TOOLCHAIN_OPTIONS}"
24KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" 24KERNEL_LD:append:aarch64 = " ${TOOLCHAIN_OPTIONS}"
25 25
26DEPENDS_append_nios2 = " libgcc" 26DEPENDS:append:nios2 = " libgcc"
27KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}" 27KERNEL_CC:append:nios2 = " ${TOOLCHAIN_OPTIONS}"
28KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}" 28KERNEL_LD:append:nios2 = " ${TOOLCHAIN_OPTIONS}"
29 29
30DEPENDS_append_arc = " libgcc" 30DEPENDS:append:arc = " libgcc"
31KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}" 31KERNEL_CC:append:arc = " ${TOOLCHAIN_OPTIONS}"
32KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}" 32KERNEL_LD:append:arc = " ${TOOLCHAIN_OPTIONS}"
33 33
34KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc" 34KERNEL_FEATURES:append:qemuall=" features/debug/printk.scc features/taskstats/taskstats.scc"
35 35
36KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" 36KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'cfg/efi.scc', '', d)}"
37KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
38KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}"
37 39
38# A KMACHINE is the mapping of a yocto $MACHINE to what is built 40# A KMACHINE is the mapping of a yocto $MACHINE to what is built
39# by the kernel. This is typically the branch that should be built, 41# by the kernel. This is typically the branch that should be built,
@@ -48,11 +50,32 @@ inherit kernel-yocto
48 50
49B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" 51B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
50 52
51do_install_append(){ 53do_install:append(){
52 if [ -n "${KMETA}" ]; then 54 if [ -n "${KMETA}" ]; then
53 rm -rf ${STAGING_KERNEL_DIR}/${KMETA} 55 rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
54 fi 56 fi
55} 57}
56 58
57# enable kernel-sample for oeqa/runtime/cases's ksample.py test 59# enable kernel-sample for oeqa/runtime/cases's ksample.py test
58KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc" 60KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc"
61
62KERNEL_DEBUG ?= ""
63# These used to be version specific, but are now common dependencies. New
64# tools / dependencies will continue to be added in version specific recipes.
65DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64", "powerpc" ], "elfutils-native", "", d)}'
66DEPENDS += "openssl-native util-linux-native"
67DEPENDS += "gmp-native libmpc-native"
68
69# Some options depend on CONFIG_PAHOLE_VERSION, so need to make pahole-native available before do_kernel_configme
70do_kernel_configme[depends] += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native:do_populate_sysroot", "", d)}'
71
72EXTRA_OEMAKE += '${@bb.utils.contains("KERNEL_DEBUG", "True", "", "PAHOLE=false", d)}'
73
74do_devshell:prepend() {
75 # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native)
76 d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig")
77 d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig")
78 d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}")
79 d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1")
80 d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
81}