blob: f560dec58997ab7fef450d8b5959abda0431e930 [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 Williamsc0f7c042017-02-23 20:41:17 -06009# Skip processing of this recipe if it is not explicitly specified as the
10# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
11# by the use of AUTOREV SRCREVs, which are the default for this recipe.
12python () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040013 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
Patrick Williamsc0f7c042017-02-23 20:41:17 -060014 d.delVar("BB_DONT_CACHE")
Brad Bishop316dfdd2018-06-25 12:45:53 -040015 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016}
17
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018DEPENDS += "xz-native bc-native"
19DEPENDS_append_aarch64 = " libgcc"
20KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
21KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
22
Patrick Williamsf1e5d692016-03-30 15:21:19 -050023DEPENDS_append_nios2 = " libgcc"
24KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
25KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
26
Brad Bishop19323692019-04-05 15:28:33 -040027DEPENDS_append_arc = " libgcc"
28KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}"
29KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}"
30
Patrick Williamsc0f7c042017-02-23 20:41:17 -060031KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
32
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
34
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035# A KMACHINE is the mapping of a yocto $MACHINE to what is built
36# by the kernel. This is typically the branch that should be built,
37# and it can be specific to the machine or shared
38# KMACHINE = "UNDEFINED"
39
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041
42# Pick up shared functions
43inherit kernel
44inherit kernel-yocto
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045
46B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
47
48do_install_append(){
49 if [ -n "${KMETA}" ]; then
50 rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
51 fi
52}
53
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080054# enable kernel-sample for oeqa/runtime/cases's ksample.py test
55KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc"