diff options
Diffstat (limited to 'meta/recipes-kernel/linux')
24 files changed, 698 insertions, 312 deletions
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb new file mode 100644 index 0000000000..7004261ce5 --- /dev/null +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb @@ -0,0 +1,79 @@ +SUMMARY = "Linux kernel Development Source" +DESCRIPTION = "Development source linux kernel. When built, this recipe packages the \ +source of the preferred virtual/kernel provider and makes it available for full kernel \ +development or external module builds" + +SECTION = "kernel" + +LICENSE = "GPLv2" + +inherit linux-kernel-base + +# Whilst not a module, this ensures we don't get multilib extended (which would make no sense) +inherit module-base + +# We need the kernel to be staged (unpacked, patched and configured) before +# we can grab the source and make the source package. We also need the bits from +# ${B} not to change while we install, so virtual/kernel must finish do_compile. +do_install[depends] += "virtual/kernel:do_shared_workdir" +# Need the source, not just the output of populate_sysroot +do_install[depends] += "virtual/kernel:do_install" + +# There's nothing to do here, except install the source where we can package it +do_fetch[noexec] = "1" +do_unpack[noexec] = "1" +do_patch[noexec] = "1" +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_populate_sysroot[noexec] = "1" + +S = "${STAGING_KERNEL_DIR}" +B = "${STAGING_KERNEL_BUILDDIR}" + +KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install() { + kerneldir=${D}${KERNEL_SRC_PATH} + install -d $kerneldir + + # + # Copy the staging dir source (and module build support) into the devsrc structure. + # We can keep this copy simple and take everything, since a we'll clean up any build + # artifacts afterwards, and the extra i/o is not significant + # + cd ${B} + find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir + cd ${S} + find . -type d -name '.git*' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir + + # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not + # The main build artifacts. We clean the directory to avoid QA errors on mismatched + # architecture (since scripts and helpers are native format). + KBUILD_OUTPUT="$kerneldir" + oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts + # make clean generates an absolute path symlink called "source" + # in $kerneldir points to $kerneldir, which doesn't make any + # sense, so remove it. + if [ -L $kerneldir/source ]; then + bbnote "Removing $kerneldir/source symlink" + rm -f $kerneldir/source + fi + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build external modules. + if [ ${ARCH} = "powerpc" ]; then + mkdir -p $kerneldir/arch/powerpc/lib/ + cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o + fi + + chown -R root:root ${D} +} +# Ensure we don't race against "make scripts" during cpio +do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock" + +PACKAGES = "kernel-devsrc" +FILES_${PN} = "${KERNEL_SRC_PATH}" +RDEPENDS_${PN} = "bc" diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc index 7ec75848dd..0174c80d85 100644 --- a/meta/recipes-kernel/linux/linux-dtb.inc +++ b/meta/recipes-kernel/linux/linux-dtb.inc @@ -1,27 +1,91 @@ # Support for device tree generation -FILES_kernel-devicetree = "/boot/devicetree*" -KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000" +FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*" + +PACKAGE_WRITE_DEPS += "virtual/update-alternatives-native" python __anonymous () { - import bb + d.appendVar("PACKAGES", " kernel-devicetree") +} + +normalize_dtb () { + DTB="$1" + if echo ${DTB} | grep -q '/dts/'; then + bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." + DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` + fi + echo "${DTB}" +} + +get_real_dtb_path_in_kernel () { + DTB="$1" + DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}" + if [ ! -e "${DTB_PATH}" ]; then + DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}" + fi + echo "${DTB_PATH}" +} - devicetree = d.getVar("KERNEL_DEVICETREE", 1) or '' - if devicetree: - depends = d.getVar("DEPENDS", 1) - d.setVar("DEPENDS", "%s dtc-native" % depends) - packages = d.getVar("PACKAGES", 1) - d.setVar("PACKAGES", "%s kernel-devicetree" % packages) +do_compile_append() { + for DTB in ${KERNEL_DEVICETREE}; do + DTB=`normalize_dtb "${DTB}"` + oe_runmake ${DTB} + done } do_install_append() { - if test -n "${KERNEL_DEVICETREE}"; then - dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} - install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb - cd ${DEPLOY_DIR_IMAGE} - rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb - ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb - fi + for DTB in ${KERNEL_DEVICETREE}; do + DTB=`normalize_dtb "${DTB}"` + DTB_EXT=${DTB##*.} + DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} + DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` + install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} + done + done } +do_deploy_append() { + for DTB in ${KERNEL_DEVICETREE}; do + DTB=`normalize_dtb "${DTB}"` + DTB_EXT=${DTB##*.} + DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME} + symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} + DTB_NAME=`echo ${base_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` + install -d ${DEPLOYDIR} + install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT} + ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT} + done + done +} + +pkg_postinst_kernel-devicetree () { + cd /${KERNEL_IMAGEDEST} + for DTB in ${KERNEL_DEVICETREE}; do + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} + DTB_EXT=${DTB##*.} + DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` + DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true + done + done +} + +pkg_postrm_kernel-devicetree () { + cd /${KERNEL_IMAGEDEST} + for DTB in ${KERNEL_DEVICETREE}; do + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} + DTB_EXT=${DTB##*.} + DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` + DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` + update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true + done + done +} diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb index 518c74b317..994ac7459f 100644 --- a/meta/recipes-kernel/linux/linux-dummy.bb +++ b/meta/recipes-kernel/linux/linux-dummy.bb @@ -1,13 +1,24 @@ +SUMMARY = "Dummy Linux kernel" +DESCRIPTION = "Dummy Linux kernel, to be selected as the preferred \ +provider for virtual/kernel to satisfy dependencies for situations \ +where you wish to build the kernel externally from the build system." SECTION = "kernel" -DESCRIPTION = "Dummy Linux kernel" -LICENSE = "GPL" +LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" PROVIDES += "virtual/kernel" -PACKAGES_DYNAMIC += "kernel-module-*" -PACKAGES_DYNAMIC += "kernel-image-*" +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +PACKAGES += "kernel-modules" +FILES_kernel-modules = "" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +INHIBIT_DEFAULT_DEPS = "1" #COMPATIBLE_MACHINE = "your_machine" @@ -17,13 +28,29 @@ SRC_URI = "file://COPYING.GPL" S = "${WORKDIR}" do_configure() { - : + : } do_compile () { - : + : +} + +do_shared_workdir () { + : } do_install() { - : + : } + +do_bundle_initramfs() { + : +} + +do_deploy() { + : +} + +addtask bundle_initramfs after do_install before do_deploy +addtask deploy after do_install +addtask shared_workdir after do_compile before do_install diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc deleted file mode 100644 index 950f1975c1..0000000000 --- a/meta/recipes-kernel/linux/linux-tools.inc +++ /dev/null @@ -1,30 +0,0 @@ -# included by kernel recipes if they want to build/provide -# perf functionality from their tree. -do_compile_perf_libc-uclibc () { - : -} -do_install_perf_libc-uclibc () { - : -} -do_compile_perf() { - oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1 -} - -fakeroot do_install_perf() { - oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} DESTDIR=${D} install NO_NEWT=1 NO_DWARF=1 -} - - -# perf tasks -addtask compile_perf after do_compile before do_install -addtask install_perf after do_install before do_package - -do_compile_perf[umask] = 022 -do_install_perf[umask] = 022 - -PERFDEPENDS = "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:do_populate_sysroot" -PERFDEPENDS_libc-uclibc = "" -PERFRDEPENDS = "python perl elfutils" -PERFRDEPENDS_libc-uclibc = "" -do_compile_perf[depends] = "${PERFDEPENDS}" -RDEPENDS_perf += "${PERFRDEPENDS}" diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb new file mode 100644 index 0000000000..bf67f81f07 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb @@ -0,0 +1,47 @@ +# This recipe tracks the linux-yocto-dev repository as its upstream source. +# Since this tree is frequently updated, and periodically rebuilt, AUTOREV is +# used to track its contents. +# +# This recipe is just like other linux-yocto variants, with the only difference +# being that to avoid network access during initial parsing, static SRCREVs are +# provided and overridden if the preferred kernel provider is linux-yocto-dev. +# +# To enable this recipe, set PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev" + +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# provide this .inc to set specific revisions +include recipes-kernel/linux/linux-yocto-dev-revisions.inc + +KBRANCH = "standard/base" +KMETA = "kernel-meta" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=master;destsuffix=${KMETA}" + +# Set default SRCREVs. Both the machine and meta SRCREVs are statically set +# to the korg v3.7 tag, and hence prevent network access during parsing. If +# linux-yocto-dev is the preferred provider, they will be overridden to +# AUTOREV in following anonymous python routine and resolved when the +# variables are finalized. +SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' +SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' + +LINUX_VERSION ?= "4.11-rc+" +LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" +PV = "${LINUX_VERSION}+git${SRCPV}" + +COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" + +KERNEL_VERSION_SANITY_SKIP = "1" diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_2.6.34.bb b/meta/recipes-kernel/linux/linux-yocto-rt_2.6.34.bb deleted file mode 100644 index 26423255c7..0000000000 --- a/meta/recipes-kernel/linux/linux-yocto-rt_2.6.34.bb +++ /dev/null @@ -1,38 +0,0 @@ -inherit kernel -require recipes-kernel/linux/linux-yocto.inc - -KMACHINE = "common-pc" -KMACHINE_qemux86 = "common_pc" -KMACHINE_qemux86-64 = "common_pc_64" - -LINUX_VERSION ?= "2.6.34" -LINUX_KERNEL_TYPE = "preempt_rt" -LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}" - -KMETA = wrs_meta -KBRANCH = ${KMACHINE}-${LINUX_KERNEL_TYPE} - -SRCREV_machine_qemux86 = "439602eb6acd53d9beb8493710310214fc7bd749" -SRCREV_machine_qemux86-64 = "3c84c45ad3c3592f9c7ff4076de9bee417cd322e" -SRCREV_machine = "439602eb6acd53d9beb8493710310214fc7bd749" -SRCREV_meta = "e1f85a470934a0cf6abde5d95533e74501822c6b" - -PR = "r3" -PV = "${LINUX_VERSION}+git${SRCPV}" - -COMPATIBLE_MACHINE = "(qemux86|qemux86-64)" - -# this performs a fixup on the SRCREV for new/undefined BSPs -python __anonymous () { - import bb, re, string - - kerntype = string.replace(bb.data.expand("${LINUX_KERNEL_TYPE}", d), "_", "-") - d.setVar("LINUX_KERNEL_TYPE_EXTENSION", kerntype) -} - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.34.git;protocol=git;nocheckout=1;branch=${KBRANCH},wrs_meta;name=machine,meta" - -# Functionality flags -KERNEL_FEATURES=features/netfilter - -require recipes-kernel/linux/linux-tools.inc diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb deleted file mode 100644 index 615209b53f..0000000000 --- a/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -inherit kernel -require recipes-kernel/linux/linux-yocto.inc - -KMACHINE = "common-pc" -KMACHINE_qemux86 = "common-pc" -KMACHINE_qemux86-64 = "common-pc-64" -KMACHINE_qemuarm = "arm-versatile-926ejs" -KMACHINE_qemuppc = "qemu-ppc32" -KMACHINE_qemumips = "mti-malta32-be" - -KBRANCH = "yocto/standard/preempt-rt/base" -KBRANCH_qemuppc = "yocto/standard/preempt-rt/qemu-ppc32" - -LINUX_VERSION ?= "3.0.4" -LINUX_KERNEL_TYPE = "preempt-rt" - -SRCREV_machine ?= "0936e13cc65d816f1759e2322c5e3fc82a5037f3" -SRCREV_machine_qemuppc ?= "0936e13cc65d816f1759e2322c5e3fc82a5037f3" -SRCREV_meta ?= "4095bb597a7bcd647856aa35b5fb8637ed7ff975" - -PR = "r1" -PV = "${LINUX_VERSION}+git${SRCPV}" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0.git;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta" - -# Omit broken machines from COMPATIBLE_MACHINE -# qemuppc hangs at boot -# qemumips panics at boot -COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm)" - -# Functionality flags -KERNEL_FEATURES=features/netfilter -KERNEL_FEATURES_append=" features/taskstats" -KERNEL_FEATURES_append_qemux86=" cfg/sound" -KERNEL_FEATURES_append_qemux86-64=" cfg/sound" - -require recipes-kernel/linux/linux-tools.inc diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb new file mode 100644 index 0000000000..21cc635bf4 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb @@ -0,0 +1,36 @@ +KBRANCH ?= "standard/preempt-rt/base" + +require recipes-kernel/linux/linux-yocto.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") +} + +SRCREV_machine ?= "f793c71d51277bdb14d6854c8cbcc09b4f5936b4" +SRCREV_meta ?= "7140ddb86e4b01529185e6d4a606001ad152b8f3" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.1.38" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb new file mode 100644 index 0000000000..ed811fb21e --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb @@ -0,0 +1,38 @@ +KBRANCH ?= "standard/preempt-rt/base" + +require recipes-kernel/linux/linux-yocto.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") +} + +SRCREV_machine ?= "fe0fb8da3d633d802776081e7ff2df73ff2983f2" +SRCREV_meta ?= "ad2e885015c5bf8adeef5cb789b535fc3c0dd396" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.10.9" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb new file mode 100644 index 0000000000..660ad8a07e --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb @@ -0,0 +1,36 @@ +KBRANCH ?= "standard/preempt-rt/base" + +require recipes-kernel/linux/linux-yocto.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") +} + +SRCREV_machine ?= "1af95315c6ab3672c8c7191873ef041a6c29ad70" +SRCREV_meta ?= "d6733af2080f8c0775569adc0826eb0c8954fc5e" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.4.60" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb new file mode 100644 index 0000000000..4ca7883122 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb @@ -0,0 +1,38 @@ +KBRANCH ?= "standard/preempt-rt/base" + +require recipes-kernel/linux/linux-yocto.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") +} + +SRCREV_machine ?= "b6f5c933ce66e4a00412bb5c5691a2ab4187c979" +SRCREV_meta ?= "803b8d600e45afa0375459bf599fe365571a3866" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" + +LINUX_VERSION ?= "4.9.21" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +LINUX_KERNEL_TYPE = "preempt-rt" + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" +KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb new file mode 100644 index 0000000000..ce8aea628b --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb @@ -0,0 +1,23 @@ +KBRANCH ?= "standard/tiny/common-pc" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "4.1.38" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +SRCREV_machine ?= "2ce56d130ddff67f43ec857cc51cd347666a0078" +SRCREV_meta ?= "7140ddb86e4b01529185e6d4a606001ad152b8f3" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}" + +COMPATIBLE_MACHINE = "(qemux86$)" + +# Functionality flags +KERNEL_FEATURES = "" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb new file mode 100644 index 0000000000..61e680a111 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb @@ -0,0 +1,25 @@ +KBRANCH ?= "standard/tiny/common-pc" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "4.10.9" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +SRCREV_machine ?= "fe0fb8da3d633d802776081e7ff2df73ff2983f2" +SRCREV_meta ?= "ad2e885015c5bf8adeef5cb789b535fc3c0dd396" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.10.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.10;destsuffix=${KMETA}" + +COMPATIBLE_MACHINE = "(qemux86$)" + +# Functionality flags +KERNEL_FEATURES = "" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb new file mode 100644 index 0000000000..04f719c5d0 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb @@ -0,0 +1,23 @@ +KBRANCH ?= "standard/tiny/common-pc" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "4.4.60" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +SRCREV_machine ?= "0298d3765a5c474ff5776284d49111276510d4b4" +SRCREV_meta ?= "d6733af2080f8c0775569adc0826eb0c8954fc5e" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}" + +COMPATIBLE_MACHINE = "(qemux86$)" + +# Functionality flags +KERNEL_FEATURES = "" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb new file mode 100644 index 0000000000..62aedb37de --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb @@ -0,0 +1,25 @@ +KBRANCH ?= "standard/tiny/common-pc" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +require recipes-kernel/linux/linux-yocto.inc + +LINUX_VERSION ?= "4.9.21" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +SRCREV_machine ?= "81055b89bd32414ecaf95156ce9a5fa6643e530a" +SRCREV_meta ?= "803b8d600e45afa0375459bf599fe365571a3866" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" + +COMPATIBLE_MACHINE = "(qemux86$)" + +# Functionality flags +KERNEL_FEATURES = "" + +KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 09433fabe9..637506a2a8 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -1,33 +1,61 @@ -DESCRIPTION = "Yocto Kernel" +SUMMARY = "Linux kernel" SECTION = "kernel" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)" + +INC_PR = "r4" + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required +# by the use of AUTOREV SRCREVs, which are the default for this recipe. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"): + d.delVar("BB_DONT_CACHE") + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN"))) +} + +DEPENDS += "xz-native bc-native" +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}" + +KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc" + # 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" -# Set this to 'preempt_rt' in the local.conf if you want a real time kernel -LINUX_KERNEL_TYPE ?= standard +LINUX_KERNEL_TYPE ?= "standard" -KMETA ?= meta +# KMETA ?= "" +KBRANCH ?= "master" +KMACHINE ?= "${MACHINE}" SRCREV_FORMAT ?= "meta_machine" -LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" -KERNEL_REVISION_CHECKING ?= "t" -YOCTO_KERNEL_META_DATA ?= t +# 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" -do_patch[depends] = "kern-tools-native:do_populate_sysroot" - -addtask kernel_configme before do_configure after do_patch +LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" # Pick up shared functions +inherit kernel inherit kernel-yocto require linux-dtb.inc -B = "${WORKDIR}/linux-${MACHINE}-${LINUX_KERNEL_TYPE}-build" +B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" do_install_append(){ if [ -n "${KMETA}" ]; then @@ -36,6 +64,6 @@ do_install_append(){ } |
