diff --git a/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf b/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf index c221285..778c9d7 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf +++ b/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf @@ -2,6 +2,8 @@ #@NAME: Beaglebone-yocto machine #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards +require conf/machine/include/coreos.inc + MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" EXTRA_IMAGEDEPENDS += "virtual/bootloader" @@ -19,9 +21,6 @@ do_image_wic[recrdeptask] += "do_bootimg" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0" APPEND:append = " console=ttyS0,115200" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" -PREFERRED_VERSION_linux-yocto ?= "6.5%" - KERNEL_IMAGETYPE = "zImage" # ti/omap/ prefix was added in 6.5, need to be removed if someone want to build linux-yocto_6.1 @@ -36,7 +35,7 @@ UBOOT_MACHINE = "am335x_evm_defconfig" UBOOT_ENTRYPOINT = "0x80008000" UBOOT_LOADADDRESS = "0x80008000" -MACHINE_FEATURES = "usbgadget usbhost vfat alsa" +MACHINE_FEATURES += "usbgadget usbhost vfat alsa" # support runqemu EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" @@ -60,5 +59,4 @@ EFIBOOTGUARD_TIMEOUT ?= "0" COREOS_IMAGE_SWUPDATE_EXTRACLASSES += "coreos-image-swupdate-beaglebone" -require conf/machine/include/coreos-generic-features/efi.inc -require conf/machine/include/coreos-generic-features/partitions.inc + diff --git a/layers/meta-belden-coreos-bsp/conf/machine/eagle40-03.conf b/layers/meta-belden-coreos-bsp/conf/machine/eagle40-03.conf index 4c2c11d..0ac1565 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/eagle40-03.conf +++ b/layers/meta-belden-coreos-bsp/conf/machine/eagle40-03.conf @@ -3,6 +3,7 @@ #@DESCRIPTION: Machine support for EAGLE40-03 # +require conf/machine/include/coreos.inc require include/coreos-generic-arch/x64.inc MACHINE_FEATURES += "pci usbhost x86 acpi serial efi tpm2 " @@ -10,9 +11,6 @@ MACHINE_FEATURES += "pci usbhost x86 acpi serial efi tpm2 " # Kernel configuration # ****************************************************************************** -PREFERRED_VERSION_linux-yocto ?= "6.5%" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" - KERNEL_IMAGETYPE = "bzImage" # getty configuration @@ -36,5 +34,5 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " kernel-modules" # No watchdog available yet EFIBOOTGUARD_TIMEOUT ?= "0" -require conf/machine/include/coreos-generic-features/efi.inc -require conf/machine/include/coreos-generic-features/partitions.inc \ No newline at end of file + + diff --git a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc index 44c7808..6b03c33 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc +++ b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc @@ -1,6 +1,5 @@ # EFI Configuration # ============================================================================== -MACHINE_FEATURES:append = " efi" - +MACHINE_FEATURES += " efi" do_image_wic[depends] += "efibootguard-native:do_populate_sysroot efibootguard:do_deploy" diff --git a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/kernel.inc b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/kernel.inc new file mode 100644 index 0000000..25905cf --- /dev/null +++ b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/kernel.inc @@ -0,0 +1 @@ +PREFERRED_PROVIDER_virtual/kernel ?= "linux-coreos" diff --git a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-machine/vm.inc b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-machine/vm.inc index 8527082..ba2843b 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-machine/vm.inc +++ b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-machine/vm.inc @@ -21,5 +21,3 @@ do_image_wic[recrdeptask] += "do_bootimg" # ============================================================================== COREOS_EFI_SECUREBOOT_INSTALL_PUBKEY_IN_EFIDIR = "1" -require conf/machine/include/coreos-generic-features/efi.inc -require conf/machine/include/coreos-generic-features/partitions.inc diff --git a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos.inc b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos.inc new file mode 100644 index 0000000..65353da --- /dev/null +++ b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos.inc @@ -0,0 +1,5 @@ +# Common configuration for all coreos machine + +require conf/machine/include/coreos-generic-features/kernel.inc +require conf/machine/include/coreos-generic-features/efi.inc +require conf/machine/include/coreos-generic-features/partitions.inc \ No newline at end of file diff --git a/layers/meta-belden-coreos-bsp/conf/machine/vm-x64.conf b/layers/meta-belden-coreos-bsp/conf/machine/vm-x64.conf index 45cfaab..eca5fb8 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/vm-x64.conf +++ b/layers/meta-belden-coreos-bsp/conf/machine/vm-x64.conf @@ -2,6 +2,7 @@ #@NAME: Generic x86_64 #@DESCRIPTION: Machine configuration for generic x86_64 (64-bit) PCs and servers. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. +require conf/machine/include/coreos.inc require include/coreos-generic-arch/x64.inc require include/coreos-generic-machine/vm.inc @@ -9,3 +10,5 @@ QB_SYSTEM_NAME = "qemu-system-x86_64" # Currently we don't support the watchdog EFIBOOTGUARD_TIMEOUT ?= "0" + + diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/bsp/beaglebone-coreos.scc b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/bsp/beaglebone-coreos.scc new file mode 100644 index 0000000..70c58f9 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/bsp/beaglebone-coreos.scc @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: MIT +define KMACHINE beaglebone +define KTYPE coreos +define KARCH arm + +include ktypes/coreos.scc + +# Include beaglebone.scc from yocto-kernel-cache +include bsp/beaglebone/beaglebone.scc diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/bsp/vm-x64-coreos.scc b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/bsp/vm-x64-coreos.scc new file mode 100644 index 0000000..e8de3b6 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/bsp/vm-x64-coreos.scc @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT +define KMACHINE vm-x64 +define KTYPE coreos +define KARCH arm + +include ktypes/coreos.scc + +include bsp/common-pc-64/common-pc-64.scc +include cfg/virtio.scc +include cfg/paravirt_kvm.scc +include cfg/hyperv.cfg diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/hyperv.cfg b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/hyperv.cfg similarity index 100% rename from layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/hyperv.cfg rename to layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/hyperv.cfg diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/hyperv.scc b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/hyperv.scc new file mode 100644 index 0000000..4dadc83 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/hyperv.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "HyperV Guest support" +define KFEATURE_COMPATIBILITY arch + +kconf hardware hyperv.cfg diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/k3s_kernel_adaptions.cfg b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/k3s.cfg similarity index 100% rename from layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/k3s_kernel_adaptions.cfg rename to layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/k3s.cfg diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/k3s.scc b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/k3s.scc new file mode 100644 index 0000000..03145e6 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/cfg/k3s.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "kernel requirement for running k3s" +define KFEATURE_COMPATIBILITY all + +kconf non-hardware k3s.cfg diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/ktypes/coreos.scc b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/ktypes/coreos.scc new file mode 100644 index 0000000..7d4fa94 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos/coreos-kmeta/ktypes/coreos.scc @@ -0,0 +1,6 @@ +# For now one, just fall-back to OE standard ktypes +include ktypes/standard/standard.scc + +include features/netfilter/netfilter.scc +include cfg/efi.scc +include cfg/efi-ext.scc diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos_6.5.bb b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos_6.5.bb new file mode 100644 index 0000000..42dcd4d --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-coreos_6.5.bb @@ -0,0 +1,32 @@ +KBRANCH ?= "v6.5/standard/base" +require recipes-kernel/linux/linux-yocto.inc + +# CVE exclusions +include recipes-kernel/linux/cve-exclusion.inc +include recipes-kernel/linux/cve-exclusion_6.5.inc + +SRCREV_machine ?= "128116621dee1ddbc7cf5f58cddc708d7b823600" +SRCREV_meta ?= "e4aaaaddfaf695039a7fc41815e24f57c29e30c0" +LINUX_VERSION ?= "6.5.10" +PV = "${LINUX_VERSION}+git" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.5;destsuffix=${KMETA};protocol=https \ + file://coreos-kmeta;type=kmeta;name=coreos-kmeta;destsuffix=coreos-kmeta" + +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +KMETA = "kernel-meta" + +# The distro or local.conf should set this, but we should fallback to coreos +# instead of standard if it's not the case +LINUX_KERNEL_TYPE ??= "coreos" + +COMPATIBLE_MACHINE = "^(beaglebone|cn9130-cf-pro|vm-x64)$" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "" +KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}" diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto-coreos-efi.inc b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto-coreos-efi.inc deleted file mode 100644 index 686d3c6..0000000 --- a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto-coreos-efi.inc +++ /dev/null @@ -1,23 +0,0 @@ - -inherit coreos-efi-sbsign -require conf/image-uefi.conf - -# Ensure EFI STUB is enabled -KERNEL_FEATURES:append = " cfg/efi.scc cfg/efi-ext.scc" - -# By default we use a Unified Kernel Image that contain the kernel, the -# kernel command line and some device tree, so we don't need to sign the output -# of the kernel recipes -COREOS_KERNEL_EFI_SIGNED ??= "0" - -# Extend the kernel_do_deploy function from kernel.bbclass to sign the kernel -kernel_do_deploy:append() { - if [ "${COREOS_KERNEL_EFI_SIGNED}" == "1" ]; then - deployDir="${DEPLOYDIR}" - for imageType in ${KERNEL_IMAGETYPES} ; do - baseName="$imageType-${KERNEL_IMAGE_NAME}" - coreos_efi_secureboot_sign_app "$deployDir/$baseName${KERNEL_IMAGE_BIN_EXT}" - done - fi -} - diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_6.1.bbappend b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_6.1.bbappend deleted file mode 100644 index c46b6aa..0000000 --- a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_6.1.bbappend +++ /dev/null @@ -1,36 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -# vm-x64 settings -# ============================================================================== -# The machine use the default KBRANCH, SRCREV and Linux Version set in OECore, -# so that the kernel get updated when updated OECore - -KMACHINE:vm-x64 ?= "common-pc-64" -COMPATIBLE_MACHINE:vm-x64 = "vm-x64" - -# Enable some kernel features related to virtualiuzation -KERNEL_FEATURES:append:vm-x64=" cfg/virtio.scc cfg/paravirt_kvm.scc" - -# Eagle 40-03 settings -# ============================================================================== -# The machine use the default KBRANCH, SRCREV and Linux Version set in OECore, -# so that the kernel get updated when updated OECore - -KMACHINE:eagle40-03 ?= "common-pc-64" -COMPATIBLE_MACHINE:eagle40-03 = "eagle40-03" - -# Beaglebone Settings -# ============================================================================== -# The machine use the default KBRANCH, SRCREV and Linux Version set in OECore, -# so that the kernel get updated when updated OECore - -KMACHINE:beaglebone ?= "beaglebone" -COMPATIBLE_MACHINE:beaglebone = "beaglebone" - -# CoreOS Generic Settings -# ============================================================================== - -require ${@bb.utils.contains("COMBINED_FEATURES", "efi", "linux-yocto-coreos-efi.inc", "", d)} - -SRC_URI += " file://k3s_kernel_adaptions.cfg" -SRC_URI:append:vm-x64 = " file://hyperv.cfg" diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_6.5.bbappend b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_6.5.bbappend deleted file mode 100644 index 6529ae1..0000000 --- a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_6.5.bbappend +++ /dev/null @@ -1,37 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -# vm-x64 settings -# ============================================================================== -# The machine use the default KBRANCH, SRCREV and Linux Version set in OECore, -# so that the kernel get updated when updated OECore - -KMACHINE:vm-x64 ?= "common-pc-64" -COMPATIBLE_MACHINE:vm-x64 = "vm-x64" - -# Enable some kernel features related to virtualiuzation -KERNEL_FEATURES:append:vm-x64=" cfg/virtio.scc cfg/paravirt_kvm.scc" - - -# Eagle 40-03 settings -# ============================================================================== -# The machine use the default KBRANCH, SRCREV and Linux Version set in OECore, -# so that the kernel get updated when updated OECore - -KMACHINE:eagle40-03 ?= "common-pc-64" -COMPATIBLE_MACHINE:eagle40-03 = "eagle40-03" - -# Beaglebone Settings -# ============================================================================== -# The machine use the default KBRANCH, SRCREV and Linux Version set in OECore, -# so that the kernel get updated when updated OECore - -KMACHINE:beaglebone ?= "beaglebone" -COMPATIBLE_MACHINE:beaglebone = "beaglebone" - -# CoreOS Generic Settings -# ============================================================================== - -require ${@bb.utils.contains("COMBINED_FEATURES", "efi", "linux-yocto-coreos-efi.inc", "", d)} - -SRC_URI += " file://k3s_kernel_adaptions.cfg" -SRC_URI:append:vm-x64 = " file://hyperv.cfg"