blob: 637506a2a885af9df70e76db8fcbac36bbfb5499 [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
5LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
6
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 Bishop6e60e8b2018-02-01 10:27:11 -050015 if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016 d.delVar("BB_DONT_CACHE")
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017 raise bb.parse.SkipPackage("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
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031# A KMACHINE is the mapping of a yocto $MACHINE to what is built
32# by the kernel. This is typically the branch that should be built,
33# and it can be specific to the machine or shared
34# KMACHINE = "UNDEFINED"
35
36LINUX_KERNEL_TYPE ?= "standard"
37
38# KMETA ?= ""
39KBRANCH ?= "master"
40KMACHINE ?= "${MACHINE}"
41SRCREV_FORMAT ?= "meta_machine"
42
43# LEVELS:
44# 0: no reporting
45# 1: report options that are specified, but not in the final config
46# 2: report options that are not hardware related, but set by a BSP
47KCONF_AUDIT_LEVEL ?= "1"
48KCONF_BSP_AUDIT_LEVEL ?= "0"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060049KMETA_AUDIT ?= "yes"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050
51LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
52
53# Pick up shared functions
54inherit kernel
55inherit kernel-yocto
56require linux-dtb.inc
57
58B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
59
60do_install_append(){
61 if [ -n "${KMETA}" ]; then
62 rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
63 fi
64}
65
66# extra tasks
Patrick Williamsc0f7c042017-02-23 20:41:17 -060067addtask kernel_version_sanity_check after do_kernel_metadata do_kernel_checkout before do_compile
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068addtask validate_branches before do_patch after do_kernel_checkout
69addtask kernel_configcheck after do_configure before do_compile