blob: 1ebfb606da9be8cd9143d0fa719380a013a08a32 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "Linux kernel"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002SECTION = "kernel"
3LICENSE = "GPLv2"
4
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
8
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009INC_PR = "r4"
10
Patrick Williamsc0f7c042017-02-23 20:41:17 -060011# Skip processing of this recipe if it is not explicitly specified as the
12# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
13# by the use of AUTOREV SRCREVs, which are the default for this recipe.
14python () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040015 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016 d.delVar("BB_DONT_CACHE")
Brad Bishop316dfdd2018-06-25 12:45:53 -040017 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
Patrick Williamsc0f7c042017-02-23 20:41:17 -060018}
19
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020DEPENDS += "xz-native bc-native"
21DEPENDS_append_aarch64 = " libgcc"
22KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
23KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
24
Patrick Williamsf1e5d692016-03-30 15:21:19 -050025DEPENDS_append_nios2 = " libgcc"
26KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
27KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
28
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
30
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
32
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033# A KMACHINE is the mapping of a yocto $MACHINE to what is built
34# by the kernel. This is typically the branch that should be built,
35# and it can be specific to the machine or shared
36# KMACHINE = "UNDEFINED"
37
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038# The distro or local.conf should set this, but if nobody cares...
39LINUX_KERNEL_TYPE ??= "standard"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040
41# KMETA ?= ""
42KBRANCH ?= "master"
43KMACHINE ?= "${MACHINE}"
44SRCREV_FORMAT ?= "meta_machine"
45
46# LEVELS:
47# 0: no reporting
48# 1: report options that are specified, but not in the final config
49# 2: report options that are not hardware related, but set by a BSP
50KCONF_AUDIT_LEVEL ?= "1"
51KCONF_BSP_AUDIT_LEVEL ?= "0"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060052KMETA_AUDIT ?= "yes"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053
Brad Bishopd7bf8c12018-02-25 22:55:05 -050054LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055
56# Pick up shared functions
57inherit kernel
58inherit kernel-yocto
Patrick Williamsc124f4f2015-09-15 14:41:29 -050059
60B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
61
62do_install_append(){
63 if [ -n "${KMETA}" ]; then
64 rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
65 fi
66}
67
68# extra tasks
Patrick Williamsc0f7c042017-02-23 20:41:17 -060069addtask kernel_version_sanity_check after do_kernel_metadata do_kernel_checkout before do_compile
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070addtask validate_branches before do_patch after do_kernel_checkout
71addtask kernel_configcheck after do_configure before do_compile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072
73# enable kernel-sample for oeqa/runtime/cases's ksample.py test
74KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc"