Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "Linux kernel" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | SECTION = "kernel" |
| 3 | LICENSE = "GPLv2" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 4 | HOMEPAGE = "https://www.yoctoproject.org/" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)" |
| 9 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 10 | RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process" |
| 11 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 12 | # Skip processing of this recipe if it is not explicitly specified as the |
| 13 | # PREFERRED_PROVIDER for virtual/kernel. This avoids network access required |
| 14 | # by the use of AUTOREV SRCREVs, which are the default for this recipe. |
| 15 | python () { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 16 | if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"): |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | d.delVar("BB_DONT_CACHE") |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN"))) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 19 | } |
| 20 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | DEPENDS += "xz-native bc-native" |
| 22 | DEPENDS_append_aarch64 = " libgcc" |
| 23 | KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" |
| 24 | KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" |
| 25 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 26 | DEPENDS_append_nios2 = " libgcc" |
| 27 | KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}" |
| 28 | KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}" |
| 29 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | DEPENDS_append_arc = " libgcc" |
| 31 | KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}" |
| 32 | KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}" |
| 33 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 34 | KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc" |
| 35 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | KERNEL_FEATURES_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" |
| 37 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | # 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, |
| 40 | # and it can be specific to the machine or shared |
| 41 | # KMACHINE = "UNDEFINED" |
| 42 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 43 | LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | |
| 45 | # Pick up shared functions |
| 46 | inherit kernel |
| 47 | inherit kernel-yocto |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | |
| 49 | B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" |
| 50 | |
| 51 | do_install_append(){ |
| 52 | if [ -n "${KMETA}" ]; then |
| 53 | rm -rf ${STAGING_KERNEL_DIR}/${KMETA} |
| 54 | fi |
| 55 | } |
| 56 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 57 | # enable kernel-sample for oeqa/runtime/cases's ksample.py test |
| 58 | KERNEL_FEATURES_append_qemuall=" features/kernel-sample/kernel-sample.scc" |