diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-yocto.inc')
-rw-r--r-- | meta/recipes-kernel/linux/linux-yocto.inc | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index f191946f2a..0132fcffb3 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -1,12 +1,13 @@ SUMMARY = "Linux kernel" SECTION = "kernel" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" +HOMEPAGE = "https://www.yoctoproject.org/" LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)" -INC_PR = "r4" +RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process" # Skip processing of this recipe if it is not explicitly specified as the # PREFERRED_PROVIDER for virtual/kernel. This avoids network access required @@ -18,43 +19,29 @@ python () { } DEPENDS += "xz-native bc-native" -DEPENDS_append_aarch64 = " libgcc" -KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" +DEPENDS:append:aarch64 = " libgcc" +KERNEL_CC:append:aarch64 = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD:append:aarch64 = " ${TOOLCHAIN_OPTIONS}" -DEPENDS_append_nios2 = " libgcc" -KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}" +DEPENDS:append:nios2 = " libgcc" +KERNEL_CC:append:nios2 = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD:append:nios2 = " ${TOOLCHAIN_OPTIONS}" -DEPENDS_append_arc = " libgcc" -KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}" +DEPENDS:append:arc = " libgcc" +KERNEL_CC:append:arc = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD:append:arc = " ${TOOLCHAIN_OPTIONS}" -KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc" +KERNEL_FEATURES:append:qemuall=" features/debug/printk.scc features/taskstats/taskstats.scc" -KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'cfg/efi.scc', '', d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}" # A KMACHINE is the mapping of a yocto $MACHINE to what is built # by the kernel. This is typically the branch that should be built, # and it can be specific to the machine or shared # KMACHINE = "UNDEFINED" -# The distro or local.conf should set this, but if nobody cares... -LINUX_KERNEL_TYPE ??= "standard" - -# KMETA ?= "" -KBRANCH ?= "master" -KMACHINE ?= "${MACHINE}" -SRCREV_FORMAT ?= "meta_machine" - -# LEVELS: -# 0: no reporting -# 1: report options that are specified, but not in the final config -# 2: report options that are not hardware related, but set by a BSP -KCONF_AUDIT_LEVEL ?= "1" -KCONF_BSP_AUDIT_LEVEL ?= "0" -KMETA_AUDIT ?= "yes" - LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}" # Pick up shared functions @@ -63,16 +50,32 @@ inherit kernel-yocto B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" -do_install_append(){ +do_install:append(){ if [ -n "${KMETA}" ]; then rm -rf ${STAGING_KERNEL_DIR}/${KMETA} fi } -# extra tasks -addtask kernel_version_sanity_check after do_kernel_metadata do_kernel_checkout before do_compile -addtask validate_branches before do_patch after do_kernel_checkout -addtask kernel_configcheck after do_configure before do_compile - # enable kernel-sample for oeqa/runtime/cases's ksample.py test -KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc" +KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc" + +KERNEL_DEBUG ?= "" +# These used to be version specific, but are now common dependencies. New +# tools / dependencies will continue to be added in version specific recipes. +DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64", "powerpc" ], "elfutils-native", "", d)}' +DEPENDS += "openssl-native util-linux-native" +DEPENDS += "gmp-native libmpc-native" + +# Some options depend on CONFIG_PAHOLE_VERSION, so need to make pahole-native available before do_kernel_configme +do_kernel_configme[depends] += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native:do_populate_sysroot", "", d)}' + +EXTRA_OEMAKE += '${@bb.utils.contains("KERNEL_DEBUG", "True", "", "PAHOLE=false", d)}' + +do_devshell:prepend() { + # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native) + d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig") + d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig") + d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}") + d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1") + d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") +} |