Skip to contentSkip to conversation

bitbake: globally define KERNEL_PACKAGE_NAME

PATCH In review Vincent Davis Jr 4 participants 38 messages Jul 12 – Sep 22 2 messages not in the archive RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/27 bitbake: globally define KERNEL_PACKAGE_NAME

A number of recipes rely on hard coded
kernel prefix set by KERNEL_PACKAGE_NAME
when including modules. This leads to build
time failures such as.

ERROR: Nothing RPROVIDES 'kernel-module-*'

Commit globally defines variable so that
recipes aren't reliant on hardcoded 'kernel'
prefix.

Commit also updates variables

STAGING_KERNEL_DIR
STAGING_KERNEL_BUILDDIR

STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR get changed from default defined in bitbake.conf in the kernel.bbclass. The reason was to set these variables to directories under WORKDIR in alternate kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they may build in parallel with the default kernel without clobbering. The issue is that the variables only get changed in kernel recipes. So, other recipes such as perf and make-mod-scripts don't know the location of virtual/kernel WORKDIR.

Solution is to include KERNEL_PACKAGE_NAME in STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR so recipes like perf and make-mod-scripts can find virtual/kernel source and solve the clobbering of build artifacts issue.

---
 meta/conf/bitbake.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +5 -2
index bdf37d0da2..569b83a138 100644
@@ -479,6 +479,9 @@ SDKPATHINSTALL = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
 # Kernel info.
 ##################################################################
 
+# Globally define base string for kernel packages
+KERNEL_PACKAGE_NAME ??= "kernel"
+
 OLDEST_KERNEL = "5.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are
@@ -490,8 +493,8 @@ SDK_OLDEST_KERNEL = "3.2.0"
 # they are staged.
 KERNEL_SRC_PATH = "/usr/src/kernel"
 
-STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
-STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
+STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-source"
+STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-build-artifacts"
 
 ##################################################################
 # Specific image creation and rootfs population info.
Signature · 1 line
2.43.0
#1 lore raw

PATCH v4 2/27 kernel: dont set WORKDIR if KERNEL_PACKAGE_NAME changes

Setting WORKDIR in the kernel recipes if KERNEL_PACKAGE_NAME changes to the WORKDIR of the recipe leads to other recipes such as perf and make-mod-scripts build errors. As they rely on globally set variables to determine the location of the kernel-source.

Commit also removes KERNEL_PACKAGE_NAME variable as it's set globally in bitbake.conf.

---
 meta/classes-recipe/kernel.bbclass | 13 -------------
 1 file changed, 13 deletions(-)
meta/classes-recipe/kernel.bbclass +0 -13
index 48e394b650..d8d44de27b 100644
@@ -12,7 +12,6 @@ COMPATIBLE_HOST = ".*-linux"
 REQUIRED_TUNE_FEATURES:riscv32 = "rv 32 i m a zicsr zifencei"
 REQUIRED_TUNE_FEATURES:riscv64 = "rv 64 i m a zicsr zifencei"
 
-KERNEL_PACKAGE_NAME ??= "kernel"
 KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
 
 PROVIDES += "virtual/kernel"
@@ -67,18 +66,6 @@ python __anonymous () {
         bb.warn("Some packages (E.g. *-dev) might be missing due to "
                 "bug 11905 (variable KERNEL_PACKAGE_NAME == PN)")
 
-    # The default kernel recipe builds in a shared location defined by
-    # bitbake/distro confs: STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR.
-    # Set these variables to directories under ${WORKDIR} in alternate
-    # kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they
-    # may build in parallel with the default kernel without clobbering.
-    if kpn != "kernel":
-        workdir = d.getVar("WORKDIR")
-        sourceDir = os.path.join(workdir, 'kernel-source')
-        artifactsDir = os.path.join(workdir, 'kernel-build-artifacts')
-        d.setVar("STAGING_KERNEL_DIR", sourceDir)
-        d.setVar("STAGING_KERNEL_BUILDDIR", artifactsDir)
-
     # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
     type = d.getVar('KERNEL_IMAGETYPE') or ""
     alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
Signature · 1 line
2.43.0
#2 lore raw

PATCH v4 3/27 kernel: remove setting of KERNEL_PACKAGE_NAME

In reply to Vincent Davis Jr

Must always be globally defined to maintain
uniformity with builds if KERNEL_PACKAGE_NAME
variable were to change.

---
 meta/classes-recipe/kernel.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes-recipe/kernel.bbclass +4 -1
index d8d44de27b..59746bee7b 100644
@@ -95,7 +95,10 @@ python __anonymous () {
 
         d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', ' '.join(sorted(typeformake)))
 
-    kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
+    kname = d.getVar('KERNEL_PACKAGE_NAME')
+    if not kname:
+        bb.error("KERNEL_PACKAGE_NAME is somehow not defined.")
+
     imagedest = d.getVar('KERNEL_IMAGEDEST')
 
     for type in types.split():
Signature · 1 line
2.43.0
#3 lore raw

PATCH v4 4/27 machine: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/conf/machine/include/loongarch/qemuloongarch.inc | 2 +-
 meta/conf/machine/include/riscv/qemuriscv.inc         | 2 +-
 meta/conf/machine/qemuppc64.conf                      | 2 +-
 meta/conf/machine/qemux86-64.conf                     | 2 +-
 meta/conf/machine/qemux86.conf                        | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
meta/conf/machine/include/loongarch/qemuloongarch.inc +1 -1
index e1bcfabc43..9cd26fb6d0 100644
@@ -15,7 +15,7 @@ IMAGE_FSTYPES += "ext4 wic.qcow2"
 
 WKS_FILE ?= "qemuloongarch.wks"
 
-MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
+MACHINE_EXTRA_RRECOMMENDS += "${KERNEL_PACKAGE_NAME}-modules"
 
 #EXTRA_IMAGEDEPENDS += "opensbi"
 
meta/conf/machine/include/riscv/qemuriscv.inc +1 -1
index bac376ce5a..37d5787ee2 100644
@@ -15,7 +15,7 @@ IMAGE_FSTYPES += "ext4.zst wic.qcow2"
 
 WKS_FILE ?= "qemuriscv.wks"
 
-MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
+MACHINE_EXTRA_RRECOMMENDS += "${KERNEL_PACKAGE_NAME}-modules"
 
 EXTRA_IMAGEDEPENDS += "opensbi"
 RISCV_SBI_PLAT ?= "generic"
meta/conf/machine/qemuppc64.conf +1 -1
index 2fbd26a6f9..1cfdeea025 100644
@@ -20,4 +20,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=hvc0 nohugevmalloc"
 #QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
 QB_OPT_APPEND = "-usb -device usb-tablet"
 
-MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
+MACHINE_EXTRA_RRECOMMENDS += "${KERNEL_PACKAGE_NAME}-modules"
meta/conf/machine/qemux86-64.conf +1 -1
index 8aac7634b7..f0c9a6141b 100644
@@ -31,7 +31,7 @@ MACHINE_FEATURES += "x86 pci"
 
 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
 
-MACHINE_EXTRA_RRECOMMENDS = "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+MACHINE_EXTRA_RRECOMMENDS = "${KERNEL_PACKAGE_NAME}-module-snd-ens1370 ${KERNEL_PACKAGE_NAME}-module-snd-rawmidi"
 
 WKS_FILE ?= "qemux86-directdisk.wks"
 do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
meta/conf/machine/qemux86.conf +1 -1
index 51f080bd2a..22e2ae836e 100644
@@ -27,7 +27,7 @@ MACHINE_FEATURES += "x86 pci"
 
 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
 
-MACHINE_EXTRA_RRECOMMENDS = "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+MACHINE_EXTRA_RRECOMMENDS = "${KERNEL_PACKAGE_NAME}-module-snd-ens1370 ${KERNEL_PACKAGE_NAME}-module-snd-rawmidi"
 
 WKS_FILE ?= "qemux86-directdisk.wks"
 do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
Signature · 1 line
2.43.0
#4 lore raw

PATCH v4 5/27 core-image-kernel-dev: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-extended/images/core-image-kernel-dev.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/images/core-image-kernel-dev.bb +1 -1
index 4018af7a3a..708bd6bc1f 100644
@@ -6,7 +6,7 @@ require recipes-core/images/core-image-minimal.bb
 
 KERNEL_DEV_UTILS ?= "dropbear connman"
 KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile packagegroup-core-buildessential kernel-devsrc"
-KERNEL_DEV_MODULE ?= "kernel-modules"
+KERNEL_DEV_MODULE ?= "${KERNEL_PACKAGE_NAME}-modules"
 
 CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
                              ${KERNEL_DEV_UTILS} \
Signature · 1 line
2.43.0
#5 lore raw

PATCH v4 6/27 packagegroup-self-hosted: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 .../packagegroups/packagegroup-self-hosted.bb      | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +7 -7
index c386267781..16835e60df 100644
@@ -7,7 +7,7 @@ DESCRIPTION = "Packages required to run the build system"
 
 PACKAGE_ARCH = "${TUNE_PKGARCH}"
 
-inherit packagegroup  features_check
+inherit packagegroup features_check
 # rdepends on libx11-dev
 REQUIRED_DISTRO_FEATURES = "x11"
 
@@ -51,12 +51,12 @@ PSEUDO = "pseudo"
 PSEUDO:libc-musl = ""
 
 RRECOMMENDS:packagegroup-self-hosted-host-tools = "\
-    kernel-module-tun \
-    kernel-module-iptable-raw \
-    kernel-module-iptable-nat \
-    kernel-module-iptable-mangle \
-    kernel-module-iptable-filter \
-	"
+    ${KERNEL_PACKAGE_NAME}-module-tun \
+    ${KERNEL_PACKAGE_NAME}-module-iptable-raw \
+    ${KERNEL_PACKAGE_NAME}-module-iptable-nat \
+    ${KERNEL_PACKAGE_NAME}-module-iptable-mangle \
+    ${KERNEL_PACKAGE_NAME}-module-iptable-filter \
+    "
 
 RDEPENDS:packagegroup-self-hosted-sdk = "\
     autoconf \
Signature · 1 line
2.43.0
#6 lore raw

PATCH v4 7/27 packagegroup-core-boot: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +1 -1
index 5cdd161811..96c07aff52 100644
@@ -22,7 +22,7 @@ RDEPENDS:${PN} = "\
     ${VIRTUAL-RUNTIME_base-utils} \
     ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
     ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
-    ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} kernel", "", d)} \
+    ${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER} ${KERNEL_PACKAGE_NAME}", "", d)} \
     netbase \
     ${VIRTUAL-RUNTIME_login_manager} \
     ${VIRTUAL-RUNTIME_init_manager} \
Signature · 1 line
2.43.0
#7 lore raw

PATCH v4 8/27 packagegroup-base: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 .../packagegroups/packagegroup-base.bb        | 156 +++++++++---------
 1 file changed, 78 insertions(+), 78 deletions(-)
meta/recipes-core/packagegroups/packagegroup-base.bb +78 -78
index c57f4ae92a..e9726e1bbf 100644
@@ -73,13 +73,13 @@ RDEPENDS:packagegroup-base = "\
     "
 
 RRECOMMENDS:packagegroup-base = "\
-    kernel-module-nls-utf8 \
-    kernel-module-input \
-    kernel-module-uinput \
-    kernel-module-rtc-dev \
-    kernel-module-rtc-proc \
-    kernel-module-rtc-sysfs \
-    kernel-module-unix"
+    ${KERNEL_PACKAGE_NAME}-module-nls-utf8 \
+    ${KERNEL_PACKAGE_NAME}-module-input \
+    ${KERNEL_PACKAGE_NAME}-module-uinput \
+    ${KERNEL_PACKAGE_NAME}-module-rtc-dev \
+    ${KERNEL_PACKAGE_NAME}-module-rtc-proc \
+    ${KERNEL_PACKAGE_NAME}-module-rtc-sysfs \
+    ${KERNEL_PACKAGE_NAME}-module-unix"
 
 RDEPENDS:packagegroup-base-extended = "\
     packagegroup-base \
@@ -152,10 +152,10 @@ RRECOMMENDS:packagegroup-base-ext2 = "\
 
 SUMMARY:packagegroup-base-vfat = "FAT filesystem support"
 RRECOMMENDS:packagegroup-base-vfat = "\
-    kernel-module-msdos \
-    kernel-module-vfat \
-    kernel-module-nls-iso8859-1 \
-    kernel-module-nls-cp437 \
+    ${KERNEL_PACKAGE_NAME}-module-msdos \
+    ${KERNEL_PACKAGE_NAME}-module-vfat \
+    ${KERNEL_PACKAGE_NAME}-module-nls-iso8859-1 \
+    ${KERNEL_PACKAGE_NAME}-module-nls-cp437 \
     dosfstools"
 
 SUMMARY:packagegroup-base-alsa = "ALSA sound support"
@@ -165,8 +165,8 @@ RDEPENDS:packagegroup-base-alsa = "\
     ${VIRTUAL-RUNTIME_alsa-state}"
 
 RRECOMMENDS:packagegroup-base-alsa = "\
-    kernel-module-snd-mixer-oss \
-    kernel-module-snd-pcm-oss"
+    ${KERNEL_PACKAGE_NAME}-module-snd-mixer-oss \
+    ${KERNEL_PACKAGE_NAME}-module-snd-pcm-oss"
 
 SUMMARY:packagegroup-base-pcmcia = "PC card slot support"
 RDEPENDS:packagegroup-base-pcmcia = "\
@@ -174,15 +174,15 @@ RDEPENDS:packagegroup-base-pcmcia = "\
     "
 
 RRECOMMENDS:packagegroup-base-pcmcia = "\
-    kernel-module-pcmcia \
-    kernel-module-airo-cs \
-    kernel-module-pcnet-cs \
-    kernel-module-serial-cs \
-    kernel-module-ide-cs \
-    kernel-module-ide-disk \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'kernel-module-hostap-cs', '',d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'kernel-module-orinoco-cs', '',d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'kernel-module-spectrum-cs', '',d)}"
+    ${KERNEL_PACKAGE_NAME}-module-pcmcia \
+    ${KERNEL_PACKAGE_NAME}-module-airo-cs \
+    ${KERNEL_PACKAGE_NAME}-module-pcnet-cs \
+    ${KERNEL_PACKAGE_NAME}-module-serial-cs \
+    ${KERNEL_PACKAGE_NAME}-module-ide-cs \
+    ${KERNEL_PACKAGE_NAME}-module-ide-disk \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '${KERNEL_PACKAGE_NAME}-module-hostap-cs', '',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '${KERNEL_PACKAGE_NAME}-module-orinoco-cs', '',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '${KERNEL_PACKAGE_NAME}-module-spectrum-cs', '',d)}"
 
 SUMMARY:packagegroup-base-bluetooth = "Bluetooth support"
 RDEPENDS:packagegroup-base-bluetooth = "\
@@ -190,46 +190,46 @@ RDEPENDS:packagegroup-base-bluetooth = "\
     "
 
 RRECOMMENDS:packagegroup-base-bluetooth = "\
-    kernel-module-bluetooth \
-    kernel-module-l2cap \
-    kernel-module-rfcomm \
-    kernel-module-hci-vhci \
-    kernel-module-bnep \
-    kernel-module-hidp \
-    kernel-module-hci-uart \
-    kernel-module-sco \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'usbhost', 'kernel-module-hci-usb', '',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', 'kernel-module-bluetooth3c-cs', '',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', 'kernel-module-bluecard-cs', '',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', 'kernel-module-bluetoothuart-cs', '',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \
+    ${KERNEL_PACKAGE_NAME}-module-bluetooth \
+    ${KERNEL_PACKAGE_NAME}-module-l2cap \
+    ${KERNEL_PACKAGE_NAME}-module-rfcomm \
+    ${KERNEL_PACKAGE_NAME}-module-hci-vhci \
+    ${KERNEL_PACKAGE_NAME}-module-bnep \
+    ${KERNEL_PACKAGE_NAME}-module-hidp \
+    ${KERNEL_PACKAGE_NAME}-module-hci-uart \
+    ${KERNEL_PACKAGE_NAME}-module-sco \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'usbhost', '${KERNEL_PACKAGE_NAME}-module-hci-usb', '',d)} \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', '${KERNEL_PACKAGE_NAME}-module-bluetooth3c-cs', '',d)} \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', '${KERNEL_PACKAGE_NAME}-module-bluecard-cs', '',d)} \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', '${KERNEL_PACKAGE_NAME}-module-bluetoothuart-cs', '',d)} \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'pcmcia', '${KERNEL_PACKAGE_NAME}-module-dtl1-cs', '',d)} \
     "
 
 SUMMARY:packagegroup-base-usbgadget = "USB gadget support"
 RRECOMMENDS:packagegroup-base-usbgadget = "\
-    kernel-module-pxa27x_udc \
-    kernel-module-gadgetfs \
-    kernel-module-g-file-storage \
-    kernel-module-g-serial \
-    kernel-module-g-ether"
+    ${KERNEL_PACKAGE_NAME}-module-pxa27x_udc \
+    ${KERNEL_PACKAGE_NAME}-module-gadgetfs \
+    ${KERNEL_PACKAGE_NAME}-module-g-file-storage \
+    ${KERNEL_PACKAGE_NAME}-module-g-serial \
+    ${KERNEL_PACKAGE_NAME}-module-g-ether"
 
 SUMMARY:packagegroup-base-usbhost = "USB host support"
 RDEPENDS:packagegroup-base-usbhost = "\
     usbutils "
 
 RRECOMMENDS:packagegroup-base-usbhost = "\
-    kernel-module-uhci-hcd \
-    kernel-module-ohci-hcd \
-    kernel-module-ehci-hcd \
-    kernel-module-usbcore \
-    kernel-module-usbhid \
-    kernel-module-usbnet \
-    kernel-module-sd-mod \
-    kernel-module-scsi-mod \
-    kernel-module-usbmouse \
-    kernel-module-mousedev \
-    kernel-module-usbserial \
-    kernel-module-usb-storage "
+    ${KERNEL_PACKAGE_NAME}-module-uhci-hcd \
+    ${KERNEL_PACKAGE_NAME}-module-ohci-hcd \
+    ${KERNEL_PACKAGE_NAME}-module-ehci-hcd \
+    ${KERNEL_PACKAGE_NAME}-module-usbcore \
+    ${KERNEL_PACKAGE_NAME}-module-usbhid \
+    ${KERNEL_PACKAGE_NAME}-module-usbnet \
+    ${KERNEL_PACKAGE_NAME}-module-sd-mod \
+    ${KERNEL_PACKAGE_NAME}-module-scsi-mod \
+    ${KERNEL_PACKAGE_NAME}-module-usbmouse \
+    ${KERNEL_PACKAGE_NAME}-module-mousedev \
+    ${KERNEL_PACKAGE_NAME}-module-usbserial \
+    ${KERNEL_PACKAGE_NAME}-module-usb-storage "
 
 SUMMARY:packagegroup-base-ppp = "PPP dial-up protocol support"
 RDEPENDS:packagegroup-base-ppp = "\
@@ -237,18 +237,18 @@ RDEPENDS:packagegroup-base-ppp = "\
     ppp-dialin"
 
 RRECOMMENDS:packagegroup-base-ppp = "\
-    kernel-module-ppp-async \
-    kernel-module-ppp-deflate \
-    kernel-module-ppp-generic \
-    kernel-module-ppp-mppe \
-    kernel-module-slhc"
+    ${KERNEL_PACKAGE_NAME}-module-ppp-async \
+    ${KERNEL_PACKAGE_NAME}-module-ppp-deflate \
+    ${KERNEL_PACKAGE_NAME}-module-ppp-generic \
+    ${KERNEL_PACKAGE_NAME}-module-ppp-mppe \
+    ${KERNEL_PACKAGE_NAME}-module-slhc"
 
 SUMMARY:packagegroup-base-ipsec = "IPSEC support"
 RDEPENDS:packagegroup-base-ipsec = "\
     "
 
 RRECOMMENDS:packagegroup-base-ipsec = "\
-    kernel-module-ipsec"
+    ${KERNEL_PACKAGE_NAME}-module-ipsec"
 
 #
 # packagegroup-base-wifi contain everything needed to get WiFi working
@@ -264,42 +264,42 @@ RDEPENDS:packagegroup-base-wifi = "\
 "
 
 RRECOMMENDS:packagegroup-base-wifi = "\
-    ${@bb.utils.contains('MACHINE_FEATURES', 'usbhost', 'kernel-module-zd1211rw', '',d)} \
-    kernel-module-ieee80211-crypt \
-    kernel-module-ieee80211-crypt-ccmp \
-    kernel-module-ieee80211-crypt-tkip \
-    kernel-module-ieee80211-crypt-wep \
-    kernel-module-ecb \
-    kernel-module-arc4 \
-    kernel-module-crypto_algapi \
-    kernel-module-cryptomgr \
-    kernel-module-michael-mic \
-    kernel-module-aes-generic \
-    kernel-module-aes"
+    ${@bb.utils.contains('MACHINE_FEATURES', 'usbhost', '${KERNEL_PACKAGE_NAME}-module-zd1211rw', '',d)} \
+    ${KERNEL_PACKAGE_NAME}-module-ieee80211-crypt \
+    ${KERNEL_PACKAGE_NAME}-module-ieee80211-crypt-ccmp \
+    ${KERNEL_PACKAGE_NAME}-module-ieee80211-crypt-tkip \
+    ${KERNEL_PACKAGE_NAME}-module-ieee80211-crypt-wep \
+    ${KERNEL_PACKAGE_NAME}-module-ecb \
+    ${KERNEL_PACKAGE_NAME}-module-arc4 \
+    ${KERNEL_PACKAGE_NAME}-module-crypto_algapi \
+    ${KERNEL_PACKAGE_NAME}-module-cryptomgr \
+    ${KERNEL_PACKAGE_NAME}-module-michael-mic \
+    ${KERNEL_PACKAGE_NAME}-module-aes-generic \
+    ${KERNEL_PACKAGE_NAME}-module-aes"
 
 SUMMARY:packagegroup-base-nfc = "Near Field Communication support"
 RDEPENDS:packagegroup-base-nfc = "\
     neard"
 
 RRECOMMENDS:packagegroup-base-nfc = "\
-    kernel-module-nfc"
+    ${KERNEL_PACKAGE_NAME}-module-nfc"
 
 SUMMARY:packagegroup-base-3g = "Cellular data support"
 RDEPENDS:packagegroup-base-3g = "\
     ofono"
 
 RRECOMMENDS:packagegroup-base-3g = "\
-    kernel-module-cdc-acm \
-    kernel-module-cdc-wdm"
+    ${KERNEL_PACKAGE_NAME}-module-cdc-acm \
+    ${KERNEL_PACKAGE_NAME}-module-cdc-wdm"
 
 SUMMARY:packagegroup-base-smbfs = "SMB network filesystem support"
 RRECOMMENDS:packagegroup-base-smbfs = "\
-    kernel-module-cifs \
-    kernel-module-smbfs"
+    ${KERNEL_PACKAGE_NAME}-module-cifs \
+    ${KERNEL_PACKAGE_NAME}-module-smbfs"
 
 SUMMARY:packagegroup-base-cramfs = "cramfs filesystem support"
 RRECOMMENDS:packagegroup-base-cramfs = "\
-    kernel-module-cramfs"
+    ${KERNEL_PACKAGE_NAME}-module-cramfs"
 
 #
 # packagegroup-base-nfs provides ONLY client support - server is in nfs-utils package
@@ -309,7 +309,7 @@ RDEPENDS:packagegroup-base-nfs = "\
     rpcbind"
 
 RRECOMMENDS:packagegroup-base-nfs = "\
-    kernel-module-nfs "
+    ${KERNEL_PACKAGE_NAME}-module-nfs "
 
 SUMMARY:packagegroup-base-zeroconf = "Zeroconf support"
 RDEPENDS:packagegroup-base-zeroconf = "\
@@ -323,7 +323,7 @@ RDEPENDS:packagegroup-base-ipv6 = "\
     "
 
 RRECOMMENDS:packagegroup-base-ipv6 = "\
-    kernel-module-ipv6 "
+    ${KERNEL_PACKAGE_NAME}-module-ipv6 "
 
 SUMMARY:packagegroup-base-serial = "Serial port support"
 RDEPENDS:packagegroup-base-serial = "\
Signature · 1 line
2.43.0
#8 lore raw

PATCH v4 9/27 ofono: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-connectivity/ofono/ofono_2.19.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/ofono/ofono_2.19.bb +1 -1
index 74fa70f609..defbe5fbe8 100644
@@ -44,4 +44,4 @@ RDEPENDS:${PN}-tests = "\
     ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)} \
 "
 
-RRECOMMENDS:${PN} += "kernel-module-tun mobile-broadband-provider-info"
+RRECOMMENDS:${PN} += "${KERNEL_PACKAGE_NAME}-module-tun mobile-broadband-provider-info"
Signature · 1 line
2.43.0
#9 lore raw

PATCH v4 10/27 iptables: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 .../iptables/iptables_1.8.13.bb               | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
meta/recipes-extended/iptables/iptables_1.8.13.bb +11 -11
index 11b287ed3b..0fa5bf40b2 100644
@@ -92,18 +92,18 @@ python populate_packages:prepend() {
 RDEPENDS:${PN} = "${PN}-module-xt-standard"
 RRECOMMENDS:${PN} = " \
     ${PN}-modules \
-    kernel-module-x-tables \
-    kernel-module-ip-tables \
-    kernel-module-iptable-filter \
-    kernel-module-iptable-nat \
-    kernel-module-nf-defrag-ipv4 \
-    kernel-module-nf-conntrack \
-    kernel-module-nf-conntrack-ipv4 \
-    kernel-module-nf-nat \
-    kernel-module-ipt-masquerade \
+    ${KERNEL_PACKAGE_NAME}-module-x-tables \
+    ${KERNEL_PACKAGE_NAME}-module-ip-tables \
+    ${KERNEL_PACKAGE_NAME}-module-iptable-filter \
+    ${KERNEL_PACKAGE_NAME}-module-iptable-nat \
+    ${KERNEL_PACKAGE_NAME}-module-nf-defrag-ipv4 \
+    ${KERNEL_PACKAGE_NAME}-module-nf-conntrack \
+    ${KERNEL_PACKAGE_NAME}-module-nf-conntrack-ipv4 \
+    ${KERNEL_PACKAGE_NAME}-module-nf-nat \
+    ${KERNEL_PACKAGE_NAME}-module-ipt-masquerade \
     ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', '\
-        kernel-module-ip6table-filter \
-        kernel-module-ip6-tables \
+        ${KERNEL_PACKAGE_NAME}-module-ip6table-filter \
+        ${KERNEL_PACKAGE_NAME}-module-ip6-tables \
     ', '', d)} \
 "
 
Signature · 1 line
2.43.0
#10 lore raw

PATCH v4 11/27 watchdog: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-extended/watchdog/watchdog_5.16.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/watchdog/watchdog_5.16.bb +2 -2
index c166ace665..8ce0c2fc5a 100644
@@ -65,8 +65,8 @@ FILES:${PN}-keepalive = " \
 "
 
 RDEPENDS:${PN} += "${PN}-config"
-RRECOMMENDS:${PN} += "kernel-module-softdog"
+RRECOMMENDS:${PN} += "${KERNEL_PACKAGE_NAME}-module-softdog"
 
 RDEPENDS:${PN}-keepalive += "${PN}-config"
 RCONFLICTS:${PN}-keepalive += "${PN}"
-RRECOMMENDS:${PN}-keepalive += "kernel-module-softdog"
+RRECOMMENDS:${PN}-keepalive += "${KERNEL_PACKAGE_NAME}-module-softdog"
Signature · 1 line
2.43.0
#11 lore raw

PATCH v4 12/27 nfs-utils: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.1.bb +2 -2
index 6f00bee0d8..76002d2d3c 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
 # util-linux for libblkid
 DEPENDS = "libcap libevent util-linux sqlite3 libtirpc libxml2 libnl"
 RDEPENDS:${PN} = "netbase ${PN}-client"
-RRECOMMENDS:${PN} = "kernel-module-nfsd"
+RRECOMMENDS:${PN} = "${KERNEL_PACKAGE_NAME}-module-nfsd"
 
 inherit useradd
 
@@ -28,7 +28,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
 
 SRC_URI[sha256sum] = "302846343bf509f8f884c23bdbd0fe853b7f7cbb6572060a9082279d13b21a2c"
 
-# Only kernel-module-nfsd is required here (but can be built-in)  - the nfsd module will
+# Only ${KERNEL_PACKAGE_NAME}-module-nfsd is required here (but can be built-in)  - the nfsd module will
 # pull in the remainder of the dependencies.
 
 INITSCRIPT_PACKAGES = "${PN} ${PN}-client"
Signature · 1 line
2.43.0
#12 lore raw

PATCH v4 13/27 mdadm: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-extended/mdadm/mdadm_4.6.bb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/recipes-extended/mdadm/mdadm_4.6.bb +6 -6
index b1d0a27c7f..41726bc37b 100644
@@ -85,12 +85,12 @@ RDEPENDS:${PN}-ptest += " \
 "
 RRECOMMENDS:${PN}-ptest += " \
     coreutils \
-    kernel-module-loop \
-    kernel-module-linear \
-    kernel-module-raid0 \
-    kernel-module-raid1 \
-    kernel-module-raid10 \
-    kernel-module-raid456 \
+    ${KERNEL_PACKAGE_NAME}-module-loop \
+    ${KERNEL_PACKAGE_NAME}-module-linear \
+    ${KERNEL_PACKAGE_NAME}-module-raid0 \
+    ${KERNEL_PACKAGE_NAME}-module-raid1 \
+    ${KERNEL_PACKAGE_NAME}-module-raid10 \
+    ${KERNEL_PACKAGE_NAME}-module-raid456 \
 "
 
 FILES:${PN} += "${systemd_unitdir}/*"
Signature · 1 line
2.43.0
#13 lore raw

PATCH v4 14/27 systemd: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-core/systemd/systemd_259.5.bb | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
meta/recipes-core/systemd/systemd_259.5.bb +8 -5
index f3ec0edae7..9f082a07d1 100644
@@ -483,7 +483,7 @@ FILES:${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
                       ${nonarch_libdir}/systemd/systemd-binfmt \
                       ${systemd_system_unitdir}/proc-sys-fs-binfmt_misc.* \
                       ${systemd_system_unitdir}/systemd-binfmt.service"
-RRECOMMENDS:${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'kernel-module-binfmt-misc', '', d)}"
+RRECOMMENDS:${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${KERNEL_PACKAGE_NAME}-module-binfmt-misc', '', d)}"
 
 RDEPENDS:${PN}-vconsole-setup = "${@bb.utils.contains('PACKAGECONFIG', 'vconsole', 'kbd kbd-consolefonts kbd-keymaps', '', d)}"
 
@@ -561,9 +561,9 @@ RRECOMMENDS:${PN}-container += "\
                          ${PN}-journal-gatewayd \
                          ${PN}-journal-remote \
                          ${PN}-journal-upload \
-                         kernel-module-dm-mod \
-                         kernel-module-loop \
-                         kernel-module-tun \
+                         ${KERNEL_PACKAGE_NAME}-module-dm-mod \
+                         ${KERNEL_PACKAGE_NAME}-module-loop \
+                         ${KERNEL_PACKAGE_NAME}-module-tun \
                          tar \
                         "
 
@@ -744,7 +744,10 @@ RDEPENDS:${PN} += "volatile-binds"
 RRECOMMENDS:${PN} += "${PN}-extra-utils \
                       udev-hwdb \
                       e2fsprogs-e2fsck \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
+                      ${KERNEL_PACKAGE_NAME}-module-autofs4 \
+                      ${KERNEL_PACKAGE_NAME}-module-unix \
+                      ${KERNEL_PACKAGE_NAME}-module-ipv6 \
+                      ${KERNEL_PACKAGE_NAME}-module-sch-fq-codel \
                       os-release \
                       systemd-conf \
                       ${@bb.utils.contains('PACKAGECONFIG', 'logind', 'pam-plugin-umask', '', d)} \
Signature · 1 line
2.43.0
#14 lore raw

PATCH v4 15/27 util-linux: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-core/util-linux/util-linux_2.42.2.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.42.2.bb +6 -1
index 4943d5c7ab..e0f248e3ba 100644
@@ -207,7 +207,12 @@ RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS:${PN}-bash-completion += "${PN}-lsblk ${PN}-findmnt"
 RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat xz diffutils"
-RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash"
+RRECOMMENDS:${PN}-ptest += "\
+    ${KERNEL_PACKAGE_NAME}-module-scsi-debug \
+    ${KERNEL_PACKAGE_NAME}-module-sd-mod \
+    ${KERNEL_PACKAGE_NAME}-module-loop \
+    ${KERNEL_PACKAGE_NAME}-module-algif-hash \
+    "
 RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
 ALLOW_EMPTY:${PN}-swaponoff = "1"
 
Signature · 1 line
2.43.0
#15 lore raw

PATCH v4 16/27 connman: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-connectivity/connman/connman_2.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/connman/connman_2.0.bb +1 -1
index e9873f3163..9c50d2b0b1 100644
@@ -71,7 +71,7 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t
 PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,ppp,pptp-linux"
 # WISPr support for logging into hotspots, requires TLS
 PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
-PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat,iptables"
+PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,${KERNEL_PACKAGE_NAME}-module-nf-tables ${KERNEL_PACKAGE_NAME}-module-nft-chain-nat-ipv4 ${KERNEL_PACKAGE_NAME}-module-nft-chain-route-ipv4 ${KERNEL_PACKAGE_NAME}-module-nft-masq-ipv4 ${KERNEL_PACKAGE_NAME}-module-nft-nat,iptables"
 PACKAGECONFIG[iptables] = "--with-firewall=iptables,,iptables,,,nftables"
 PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard"
 PACKAGECONFIG[client] = "--enable-client,--disable-client,readline"
Signature · 1 line
2.43.0
#16 lore raw

PATCH v4 17/27 hwlatdetect: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-rt/rt-tests/hwlatdetect_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-rt/rt-tests/hwlatdetect_git.bb +1 -1
index 2dcc80965a..7abbe25dec 100644
@@ -23,4 +23,4 @@ do_install() {
 
 FILES:${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
 RDEPENDS:${PN} = "python3-core "
-RRECOMMENDS:${PN} = "kernel-module-hwlat-detector"
+RRECOMMENDS:${PN} = "${KERNEL_PACKAGE_NAME}-module-hwlat-detector"
Signature · 1 line
2.43.0
#17 lore raw

PATCH v4 18/27 v86d: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-bsp/v86d/v86d_0.1.10.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/v86d/v86d_0.1.10.bb +1 -1
index 3bc9b24487..66dc3b177e 100644
@@ -6,7 +6,7 @@ DESCRIPTION = "v86d provides a backend for kernel drivers that need to execute x
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://README;md5=94ac1971e4f2309dc322d598e7b1f7dd"
 
-RRECOMMENDS:${PN} = "kernel-module-uvesafb"
+RRECOMMENDS:${PN} = "${KERNEL_PACKAGE_NAME}-module-uvesafb"
 
 SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \
            file://Update-x86emu-from-X.org.patch \
Signature · 1 line
2.43.0
#18 lore raw

PATCH v4 19/27 efivar: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-bsp/efivar/efivar_39.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/efivar/efivar_39.bb +1 -1
index e5839f7a99..b15279239d 100644
@@ -28,6 +28,6 @@ do_install() {
 
 BBCLASSEXTEND = "native"
 
-RRECOMMENDS:${PN}:class-target = "kernel-module-efivarfs"
+RRECOMMENDS:${PN}:class-target = "${KERNEL_PACKAGE_NAME}-module-efivarfs"
 
 CLEANBROKEN = "1"
Signature · 1 line
2.43.0
#19 lore raw

PATCH v4 20/27 parted: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-extended/parted/parted_3.7.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/parted/parted_3.7.bb +1 -1
index a669919dd7..4215cbf4a7 100644
@@ -52,7 +52,7 @@ do_install_ptest() {
 }
 
 RDEPENDS:${PN}-ptest = "bash coreutils perl util-linux-losetup util-linux-mkswap python3 make gawk e2fsprogs-mke2fs e2fsprogs-tune2fs python3-core dosfstools"
-RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-loop kernel-module-vfat"
+RRECOMMENDS:${PN}-ptest += "${KERNEL_PACKAGE_NAME}-module-scsi-debug ${KERNEL_PACKAGE_NAME}-module-loop ${KERNEL_PACKAGE_NAME}-module-vfat"
 RDEPENDS:${PN}-ptest:append:libc-glibc = "\
         glibc-utils \
         locale-base-en-us \
Signature · 1 line
2.43.0
#20 lore raw

PATCH v4 21/27 ltp: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-extended/ltp/ltp_20260529.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/ltp/ltp_20260529.bb +1 -1
index e863503200..58763f5d13 100644
@@ -121,7 +121,7 @@ RDEPENDS:${PN} = "\
     tar \
 "
 
-RRECOMMENDS:${PN} += "kernel-module-loop"
+RRECOMMENDS:${PN} += "${KERNEL_PACKAGE_NAME}-module-loop"
 
 FILES:${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${prefix}/testcases/bin/* ${prefix}/testcases/bin/*/bin/* ${prefix}/testscripts/* ${prefix}/testcases/open_posix_testsuite/* ${prefix}/testcases/open_posix_testsuite/conformance/* ${prefix}/testcases/open_posix_testsuite/Documentation/* ${prefix}/testcases/open_posix_testsuite/functional/* ${prefix}/testcases/open_posix_testsuite/include/* ${prefix}/testcases/open_posix_testsuite/scripts/* ${prefix}/testcases/open_posix_testsuite/stress/* ${prefix}/testcases/open_posix_testsuite/tools/* ${prefix}/testcases/data/nm01/lib.a ${prefix}/lib/libmem.a"
 
Signature · 1 line
2.43.0
#21 lore raw

PATCH v4 22/27 libnl: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/recipes-support/libnl/libnl_3.12.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libnl/libnl_3.12.0.bb +1 -1
index 2b46fb69d9..cbc5eca20e 100644
@@ -54,7 +54,7 @@ RREPLACES:${PN}-genl = "libnl-genl2"
 RCONFLICTS:${PN}-genl = "libnl-genl2"
 
 DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}"
-RRECOMMENDS:${PN}-ptest += "kernel-module-dummy kernel-module-bonding"
+RRECOMMENDS:${PN}-ptest += "${KERNEL_PACKAGE_NAME}-module-dummy ${KERNEL_PACKAGE_NAME}-module-bonding"
 RDEPENDS:${PN}-ptest += "iproute2-ip"
 
 do_compile_ptest() {
Signature · 1 line
2.43.0
#22 lore raw

PATCH v4 23/27 linux-kernel-base: rename kernel prefix

In reply to Vincent Davis Jr

Utilize preset variable KERNEL_PACKAGE_NAME
to ensure uniformity with builds if
KERNEL_PACKAGE_NAME variable were to
change.

---
 meta/classes-recipe/linux-kernel-base.bbclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/classes-recipe/linux-kernel-base.bbclass +6 -6
index e2187a73f0..a711c62a03 100644
@@ -30,8 +30,8 @@ def get_kernelversion_headers(p):
     return None
 
 
-def get_kernelversion_file(p):
-    fn = p + '/kernel-abiversion'
+def get_kernelversion_file(p, kpn):
+    fn = '%s/%s-abiversion' % (p, kpn)
 
     try:
         with open(fn, 'r') as f:
@@ -39,8 +39,8 @@ def get_kernelversion_file(p):
     except IOError:
         return None
 
-def get_kernellocalversion_file(p):
-    fn = p + '/kernel-localversion'
+def get_kernellocalversion_file(p, kpn):
+    fn = '%s/%s-localversion' % (p, kpn)
 
     try:
         with open(fn, 'r') as f:
@@ -50,9 +50,9 @@ def get_kernellocalversion_file(p):
 
     return ""
 
-def linux_module_packages(s, d):
+def linux_module_packages(s, pkn):
     suffix = ""
-    return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
+    return " ".join(map(lambda s: "%s-module-%s%s" % (kpn, s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
 
 export KBUILD_BUILD_VERSION = "1"
 export KBUILD_BUILD_USER ?= "oe-user"
Signature · 1 line
2.43.0
#23 lore raw

PATCH v4 24/27 perf: disable discarded-qualifiers checks

In reply to Vincent Davis Jr
---
 meta/recipes-kernel/perf/perf.bb | 9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-kernel/perf/perf.bb +9 -0
index e3e5d55e39..03808e1d68 100644
@@ -98,6 +98,15 @@ TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
 #| cc1: all warnings being treated as errors
 TARGET_CC_ARCH:append:toolchain-clang:arm = " -fno-error=maybe-uninitialized"
 
+#| libbpf.c: In function 'kallsyms_cb':
+#| libbpf.c:8120:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
+#|  8120 |         res = strstr(sym_name, ".llvm.");
+#|       |             ^
+#| libbpf.c: In function 'resolve_full_path':
+#| libbpf.c:11920:35: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
+#| 11920 |                         next_path = strchr(s, ':');
+TARGET_CC_ARCH:append = " -Wno-error=discarded-qualifiers"
+
 EXTRA_OEMAKE = '\
     V=1 \
     VF=1 \
Signature · 1 line
2.43.0
#24 lore raw

PATCH v4 25/27 linux-yocto-fitimage: add KERNEL_PACKAGE_NAME prefix

In reply to Vincent Davis Jr

get_kernellocalversion_file relies on hard coded kernel-abiversion file. The kernel- prefix changes when you modify KERNEL_PACKAGE_NAME.

Update to account for the modification of KERNEL_PACKAGE_NAME.

---
 meta/recipes-kernel/linux/linux-yocto-fitimage.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/linux/linux-yocto-fitimage.bb +1 -1
index 6ce1960a87..68cda0bfae 100644
@@ -10,4 +10,4 @@ inherit linux-kernel-base kernel-fit-image
 
 # Set the version of this recipe to the version of the included kernel
 # (without taking the long way around via PV)
-PKGV = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
+PKGV = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}", "${KERNEL_PACKAGE_NAME}")}"
Signature · 1 line
2.43.0
#25 lore raw

PATCH v4 26/27 make-mod-scripts: add KERNEL_PACKAGE_NAME prefix

In reply to Vincent Davis Jr

get_kernellocalversion_file relies on hard coded kernel-localversion file. The kernel- prefix changes when you modify KERNEL_PACKAGE_NAME.

Update to account for the modification of KERNEL_PACKAGE_NAME.

---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -1
index 4b0630313f..c5d51411aa 100644
@@ -21,7 +21,7 @@ DEPENDS += "gmp-native"
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
 EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
-KERNEL_LOCALVERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}")}"
+KERNEL_LOCALVERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}", "${KERNEL_PACKAGE_NAME}")}"
 export LOCALVERSION = "${KERNEL_LOCALVERSION}"
 
 # Build some host tools under work-shared.  CC, LD, and AR are probably
Signature · 1 line
2.43.0
#26 lore raw

PATCH v4 27/27 kernelsrc: add KERNEL_PACKAGE_NAME prefix

In reply to Vincent Davis Jr

get_kernellocalversion_file and get_kernelversion_file relies on hard coded kernel-localversion and kernel-abiversion files. The kernel- prefix changes when you modify KERNEL_PACKAGE_NAME.

Update to account for the modification of KERNEL_PACKAGE_NAME.

There also appears to be an issue in the do_package task. The KERNEL_VERSION variable appears to be empty. Reseting the variable fixes issues with PKGV not being set.

---
 meta/classes-recipe/kernelsrc.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes-recipe/kernelsrc.bbclass +5 -2
index 9336184298..36a3c8aa68 100644
@@ -10,12 +10,15 @@ deltask do_unpack
 do_patch[depends] += "virtual/kernel:do_shared_workdir"
 do_patch[noexec] = "1"
 do_package[depends] += "virtual/kernel:do_populate_sysroot"
-KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
-LOCAL_VERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}")}"
 
 inherit linux-kernel-base
 
+KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}", "${KERNEL_PACKAGE_NAME}")}"
+LOCAL_VERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}", "${KERNEL_PACKAGE_NAME}")}"
+
 # The final packages get the kernel version instead of the default 1.0
 python do_package:prepend() {
+    kernel_version = oe.utils.read_file('%s/%s-abiversion' % (d.getVar("STAGING_KERNEL_BUILDDIR"), d.getVar("KERNEL_PACKAGE_NAME")))
+    d.setVar('KERNEL_VERSION', kernel_version)
     d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
 }
Signature · 1 line
2.43.0
#27 lore raw
In reply to Vincent Davis Jr
Quoted 28 lines · Vincent Davis Jr via lists.openembedded.org

A number of recipes rely on hard coded
kernel prefix set by KERNEL_PACKAGE_NAME
when including modules. This leads to build
time failures such as.

ERROR: Nothing RPROVIDES 'kernel-module-*'

Commit globally defines variable so that
recipes aren't reliant on hardcoded 'kernel'
prefix.

Commit also updates variables

STAGING_KERNEL_DIR
STAGING_KERNEL_BUILDDIR

STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR get changed from default defined in bitbake.conf in the kernel.bbclass. The reason was to set these variables to directories under WORKDIR in alternate kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they may build in parallel with the default kernel without clobbering. The issue is that the variables only get changed in kernel recipes. So, other recipes such as perf and make-mod-scripts don't know the location of virtual/kernel WORKDIR.

Quoted 5 lines

Solution is to include KERNEL_PACKAGE_NAME in
STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR
so recipes like perf and make-mod-scripts can
find virtual/kernel source and solve the
clobbering of build artifacts issue.

These descriptions cover what you've changed, and how they are cooredinated .. but you haven't explained *why*

What problem does this solve? This introduces complexity throughout the code base, so there has to be an appropriately significant use case to justify it.

and "We are changing the kernel package name" is not a sufficient justification. a reason, that is obviously something you are doing.

Bruce

Quoted 43 lines
---
 meta/conf/bitbake.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +5 -3
index bdf37d0da2..569b83a138 100644
@@ -479,6 +479,9 @@ SDKPATHINSTALL = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
 # Kernel info.
 ##################################################################
 
+# Globally define base string for kernel packages
+KERNEL_PACKAGE_NAME ??= "kernel"
+
 OLDEST_KERNEL = "5.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are
@@ -490,8 +493,8 @@ SDK_OLDEST_KERNEL = "3.2.0"
 # they are staged.
 KERNEL_SRC_PATH = "/usr/src/kernel"
 
-STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
-STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
+STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-source"
+STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-build-artifacts"
 
 ##################################################################
 # Specific image creation and rootfs population info.
--

2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#240791): https://lists.openembedded.org/g/openembedded-core/message/240791
Mute This Topic: https://lists.openembedded.org/mt/120238087/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#28 lore raw

Hey,

There are 2 use cases the first being if the caller simply wants to change KERNEL_PACKAGE_NAME in their distro. They'll run into the runtime error described in patch description. This can be tested by just changing the name in the kernel.bbclass.

The second being if you want to build 2 or more kernels with different initramfs contained in each kernel using one DISTRO.

You'd have to define

1. Multiple kernel recipes with variables bellow so not to name mangle

INITRAMFS_IMAGE_BUNDLE = "1"

INITRAMFS_IMAGE = "<recipe name>"
INITRAMFS_IMAGE_NAME = "<recipe image name>"

KERNEL_PACKAGE_NAME = "<pkn>"
KERNEL_ARTIFACT_NAME = "<artifact name>"

2. Multiple multiconfigs that have different

PREFFERRED_PROVIDER_virtual/kernel

Of course assigned to the different kernels.

3. Wic image or image recipes that pull in all the kernels

do_rootfs[depends] += "\
virtual/kernel:do_bundle_initramfs \
virtual/kernel:do_deploy"

do_rootfs[mcdepends] += "\
mc:from_distro:to_distro:virtual/kernel:do_bundle_initramfs \
mc:from_distro:to_distro:virtual/kernel:do_deploy"

This patch series gives us the best opportunity for the cases above without brittle special cases. If you don't replace each kernel- prefix with a variable you end up with build time errors.

Can update the description to explain use cases and why this change is needed, but are the above statements okay with you before I submit more patches? Or do we need to work out more of a justification for the patch series?

Quoted 106 lines · Bruce Ashfield
Quoted 28 lines · Vincent Davis Jr via lists.openembedded.org

A number of recipes rely on hard coded
kernel prefix set by KERNEL_PACKAGE_NAME
when including modules. This leads to build
time failures such as.

ERROR: Nothing RPROVIDES 'kernel-module-*'

Commit globally defines variable so that
recipes aren't reliant on hardcoded 'kernel'
prefix.

Commit also updates variables

STAGING_KERNEL_DIR
STAGING_KERNEL_BUILDDIR

STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR get changed from default defined in bitbake.conf in the kernel.bbclass. The reason was to set these variables to directories under WORKDIR in alternate kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they may build in parallel with the default kernel without clobbering. The issue is that the variables only get changed in kernel recipes. So, other recipes such as perf and make-mod-scripts don't know the location of virtual/kernel WORKDIR.

Quoted 5 lines

Solution is to include KERNEL_PACKAGE_NAME in STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR so recipes like perf and make-mod-scripts can find virtual/kernel source and solve the clobbering of build artifacts issue.

These descriptions cover what you've changed, and how they are cooredinated .. but you haven't explained *why*

What problem does this solve? This introduces complexity throughout the code base, so there has to be an appropriately significant use case to justify it.

and "We are changing the kernel package name" is not a sufficient justification.
a reason, that is obviously something you are doing.

Bruce

meta/conf/bitbake.conf SDKPATHINSTALL =

Quoted 11 lines
---
 meta/conf/bitbake.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +0 -0
index bdf37d0da2..569b83a138 100644
@@ -479,6 +479,9 @@ SDKPATHINSTALL =

"/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"

Quoted 10 lines
meta/conf/bitbake.conf +3 -0
 # Kernel info.
 ##################################################################
 
+# Globally define base string for kernel packages
+KERNEL_PACKAGE_NAME ??= "kernel"
+
 OLDEST_KERNEL = "5.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 494

Quoted 5 lines
meta/conf/bitbake.conf +0 -2
@@ -490,8 +493,8 @@ SDK_OLDEST_KERNEL = "3.2.0"
 # they are staged.
 KERNEL_SRC_PATH = "/usr/src/kernel"
 
-STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
-STAGING_KERNEL_BUILDDIR =

"${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 496

Quoted 1 line
meta/conf/bitbake.conf +1 -0
+STAGING_KERNEL_DIR =

"${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-source"

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 497

Quoted 1 line
meta/conf/bitbake.conf +1 -0
+STAGING_KERNEL_BUILDDIR =

"${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-build-artifacts"

Quoted 10 lines
meta/conf/bitbake.conf +0 -1
 ##################################################################
 # Specific image creation and rootfs population info.
--

2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#240791):

https://lists.openembedded.org/g/openembedded-core/message/240791

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/120238087/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

A message that is not in the archive (sent off-list or not yet received): [email protected]

#30 lore raw

To explain why anyone would ever want two or more different types of kernels on a single partition.

Let's say a company requires you keep swupdate on a separate rootfs from normal operation apps. You'd have to create 2 separate DISTRO's to define separate kernel per DISTRO. Making it harder to place both rootfs (kernel+initramfs is really what I mean) in the same wic.

If you can build multiple different kernels + initramfs in the same DISTRO you avoid the problem entirely.

Can create a repo with mockup ideal of what I'm trying to achieve. If need be.

Quoted 160 lines · Vincent Davis Jr via lists.openembedded.org

Hey,

There are 2 use cases the first being if the caller simply wants to change KERNEL_PACKAGE_NAME in their distro. They'll run into the runtime error described in patch description. This can be tested by just changing the name in the kernel.bbclass.

The second being if you want to build 2 or more kernels with different initramfs contained in each kernel using one DISTRO.

You'd have to define

1. Multiple kernel recipes with variables bellow so not to name mangle

INITRAMFS_IMAGE_BUNDLE = "1"

INITRAMFS_IMAGE = "<recipe name>"
INITRAMFS_IMAGE_NAME = "<recipe image name>"

KERNEL_PACKAGE_NAME = "<pkn>"
KERNEL_ARTIFACT_NAME = "<artifact name>"

2. Multiple multiconfigs that have different

PREFFERRED_PROVIDER_virtual/kernel

Of course assigned to the different kernels.

3. Wic image or image recipes that pull in all the kernels

do_rootfs[depends] += "\
virtual/kernel:do_bundle_initramfs \
virtual/kernel:do_deploy"

do_rootfs[mcdepends] += "\
mc:from_distro:to_distro:virtual/kernel:do_bundle_initramfs \
mc:from_distro:to_distro:virtual/kernel:do_deploy"

This patch series gives us the best opportunity for the cases above without brittle special cases. If you don't replace each kernel- prefix with a variable you end up with build time errors.

Can update the description to explain use cases and why this change is needed, but are the above statements okay with you before I submit more patches? Or do we need to work out more of a justification for the patch series?

Quoted 93 lines · Bruce Ashfield
Quoted 28 lines · Vincent Davis Jr via lists.openembedded.org

A number of recipes rely on hard coded
kernel prefix set by KERNEL_PACKAGE_NAME
when including modules. This leads to build
time failures such as.

ERROR: Nothing RPROVIDES 'kernel-module-*'

Commit globally defines variable so that
recipes aren't reliant on hardcoded 'kernel'
prefix.

Commit also updates variables

STAGING_KERNEL_DIR
STAGING_KERNEL_BUILDDIR

STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR get changed from default defined in bitbake.conf in the kernel.bbclass. The reason was to set these variables to directories under WORKDIR in alternate kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they may build in parallel with the default kernel without clobbering. The issue is that the variables only get changed in kernel recipes. So, other recipes such as perf and make-mod-scripts don't know the location of virtual/kernel WORKDIR.

Quoted 5 lines

Solution is to include KERNEL_PACKAGE_NAME in STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR so recipes like perf and make-mod-scripts can find virtual/kernel source and solve the clobbering of build artifacts issue.

These descriptions cover what you've changed, and how they are cooredinated .. but you haven't explained *why*

What problem does this solve? This introduces complexity throughout the code base, so there has to be an appropriately significant use case to justify it.

and "We are changing the kernel package name" is not a sufficient justification.
a reason, that is obviously something you are doing.

Bruce

meta/conf/bitbake.conf SDKPATHINSTALL =

Quoted 11 lines
---
 meta/conf/bitbake.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +0 -0
index bdf37d0da2..569b83a138 100644
@@ -479,6 +479,9 @@ SDKPATHINSTALL =

"/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"

Quoted 10 lines
meta/conf/bitbake.conf +3 -0
 # Kernel info.
 ##################################################################
 
+# Globally define base string for kernel packages
+KERNEL_PACKAGE_NAME ??= "kernel"
+
 OLDEST_KERNEL = "5.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 494

Quoted 5 lines
meta/conf/bitbake.conf +0 -2
@@ -490,8 +493,8 @@ SDK_OLDEST_KERNEL = "3.2.0"
 # they are staged.
 KERNEL_SRC_PATH = "/usr/src/kernel"
 
-STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
-STAGING_KERNEL_BUILDDIR =

"${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 496

Quoted 1 line
meta/conf/bitbake.conf +1 -0
+STAGING_KERNEL_DIR =

"${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-source"

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 497

Quoted 1 line
meta/conf/bitbake.conf +1 -0
+STAGING_KERNEL_BUILDDIR =

"${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-build-artifacts"

Quoted 9 lines
meta/conf/bitbake.conf +0 -1
 ##################################################################
 # Specific image creation and rootfs population info.
--

2.43.0

Quoted 5 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#240819):
https://lists.openembedded.org/g/openembedded-core/message/240819
Mute This Topic: https://lists.openembedded.org/mt/120238087/7072109
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#32 lore raw

Correction

KERNEL_PACKAGE_NAME
KERNEL_ARTIFACT_NAME

Are set in the multiconfig files.

Quoted 180 lines · Vincent Davis Jr via lists.openembedded.org

To explain why anyone would ever want two or more different types of kernels on a single partition.

Let's say a company requires you keep swupdate on a separate rootfs from normal operation apps. You'd have to create 2 separate DISTRO's to define separate kernel per DISTRO. Making it harder to place both rootfs (kernel+initramfs is really what I mean) in the same wic.

If you can build multiple different kernels + initramfs in the same DISTRO you avoid the problem entirely.

Can create a repo with mockup ideal of what I'm trying to achieve. If need be.

Quoted 42 lines · Vincent Davis Jr via lists.openembedded.org

Hey,

There are 2 use cases the first being if the caller simply wants to change KERNEL_PACKAGE_NAME in their distro. They'll run into the runtime error described in patch description. This can be tested by just changing the name in the kernel.bbclass.

The second being if you want to build 2 or more kernels with different initramfs contained in each kernel using one DISTRO.

You'd have to define

1. Multiple kernel recipes with variables bellow so not to name mangle

INITRAMFS_IMAGE_BUNDLE = "1"

INITRAMFS_IMAGE = "<recipe name>"
INITRAMFS_IMAGE_NAME = "<recipe image name>"

KERNEL_PACKAGE_NAME = "<pkn>"
KERNEL_ARTIFACT_NAME = "<artifact name>"

2. Multiple multiconfigs that have different

PREFFERRED_PROVIDER_virtual/kernel

Of course assigned to the different kernels.

3. Wic image or image recipes that pull in all the kernels

do_rootfs[depends] += "\
virtual/kernel:do_bundle_initramfs \
virtual/kernel:do_deploy"

do_rootfs[mcdepends] += "\
mc:from_distro:to_distro:virtual/kernel:do_bundle_initramfs \
mc:from_distro:to_distro:virtual/kernel:do_deploy"

This patch series gives us the best opportunity for the cases above without brittle special cases. If you don't replace each kernel- prefix with a variable you end up with build time errors.

Quoted 110 lines

Can update the description to explain use cases and why this change is needed, but are the above statements okay with you before I submit more patches? Or do we need to work out more of a justification for the patch series?

Quoted 98 lines · Bruce Ashfield
Quoted 28 lines · Vincent Davis Jr via lists.openembedded.org

A number of recipes rely on hard coded
kernel prefix set by KERNEL_PACKAGE_NAME
when including modules. This leads to build
time failures such as.

ERROR: Nothing RPROVIDES 'kernel-module-*'

Commit globally defines variable so that
recipes aren't reliant on hardcoded 'kernel'
prefix.

Commit also updates variables

STAGING_KERNEL_DIR
STAGING_KERNEL_BUILDDIR

STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR get changed from default defined in bitbake.conf in the kernel.bbclass. The reason was to set these variables to directories under WORKDIR in alternate kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they may build in parallel with the default kernel without clobbering. The issue is that the variables only get changed in kernel recipes. So, other recipes such as perf and make-mod-scripts don't know the location of virtual/kernel WORKDIR.

Quoted 5 lines

Solution is to include KERNEL_PACKAGE_NAME in STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR so recipes like perf and make-mod-scripts can find virtual/kernel source and solve the clobbering of build artifacts issue.

These descriptions cover what you've changed, and how they are cooredinated .. but you haven't explained *why*

What problem does this solve? This introduces complexity throughout the code base, so there has to be an appropriately significant use case to justify it.

and "We are changing the kernel package name" is not a sufficient justification.
a reason, that is obviously something you are doing.

Bruce

meta/conf/bitbake.conf SDKPATHINSTALL =

Quoted 11 lines
---
 meta/conf/bitbake.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +0 -0
index bdf37d0da2..569b83a138 100644
@@ -479,6 +479,9 @@ SDKPATHINSTALL =

"/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"

Quoted 10 lines
meta/conf/bitbake.conf +3 -0
 # Kernel info.
 ##################################################################
 
+# Globally define base string for kernel packages
+KERNEL_PACKAGE_NAME ??= "kernel"
+
 OLDEST_KERNEL = "5.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 494

Quoted 5 lines
meta/conf/bitbake.conf +0 -2
@@ -490,8 +493,8 @@ SDK_OLDEST_KERNEL = "3.2.0"
 # they are staged.
 KERNEL_SRC_PATH = "/usr/src/kernel"
 
-STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
-STAGING_KERNEL_BUILDDIR =

"${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 496

Quoted 1 line
meta/conf/bitbake.conf +1 -0
+STAGING_KERNEL_DIR =

"${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-source"

meta/conf/bitbake.conf SDK_OLDEST_KERNEL = "3.2.0" · line 497

Quoted 1 line
meta/conf/bitbake.conf +1 -0
+STAGING_KERNEL_BUILDDIR =

"${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-build-artifacts"

Quoted 9 lines
meta/conf/bitbake.conf +0 -1
 ##################################################################
 # Specific image creation and rootfs population info.
--

2.43.0

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#240820):
https://lists.openembedded.org/g/openembedded-core/message/240820
Mute This Topic: https://lists.openembedded.org/mt/120238087/7072109
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#33 lore raw
In reply to Vincent Davis Jr
Quoted 6 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Vincent Davis Jr
Sent: den 12 juli 2026 20:43
To: [email protected]
Cc: Vincent Davis Jr <[email protected]>
Subject: [OE-core] [PATCH v4 01/27] bitbake: globally define KERNEL_PACKAGE_NAME

Please use bitbake.conf as prefix. It is very confusing to see bitbake used as a prefix to mean bitbake.conf, especially if you like me have worked with the poky repository for many years where bitbake was the prefix used for the bitbake repository.

Personally, I think including the file suffix in the subject prefix is a good idea for anything that isn't recipes, e.g., bbclasses, conf files, inc files, etc. However, I do not know if there is an official stand on this.

Quoted 8 lines

A number of recipes rely on hard coded
kernel prefix set by KERNEL_PACKAGE_NAME
when including modules. This leads to build
time failures such as.

ERROR: Nothing RPROVIDES 'kernel-module-*'

Quoted 8 lines

Commit globally defines variable so that
recipes aren't reliant on hardcoded 'kernel'
prefix.

Commit also updates variables

STAGING_KERNEL_DIR
STAGING_KERNEL_BUILDDIR

This should be in a separate commit.

Quoted 49 lines

STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR get changed from default defined in bitbake.conf in the kernel.bbclass. The reason was to set these variables to directories under WORKDIR in alternate kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they may build in parallel with the default kernel without clobbering. The issue is that the variables only get changed in kernel recipes. So, other recipes such as perf and make-mod-scripts don't know the location of virtual/kernel WORKDIR.

Solution is to include KERNEL_PACKAGE_NAME in
STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR
so recipes like perf and make-mod-scripts can
find virtual/kernel source and solve the
clobbering of build artifacts issue.

---
 meta/conf/bitbake.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +5 -3
index bdf37d0da2..569b83a138 100644
@@ -479,6 +479,9 @@ SDKPATHINSTALL = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
 # Kernel info.
 ##################################################################
 
+# Globally define base string for kernel packages
+KERNEL_PACKAGE_NAME ??= "kernel"
+
 OLDEST_KERNEL = "5.15"
 
 # SDK_OLDEST_KERNEL can't be set using overrides since there are
@@ -490,8 +493,8 @@ SDK_OLDEST_KERNEL = "3.2.0"
 # they are staged.
 KERNEL_SRC_PATH = "/usr/src/kernel"
 
-STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
-STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
+STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-source"
+STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/${KERNEL_PACKAGE_NAME}/kernel-build-artifacts"
 
 ##################################################################
 # Specific image creation and rootfs population info.
--
Quoted 1 line

2.43.0

//Peter

#34 lore raw

Any feedback besides

Bruce and Peter comments.

Before I submit v5 to address review comments.

#35 lore raw
Quoted 5 lines · Vincent Davis Jr via lists.openembedded.org

Any feedback besides

Bruce and Peter comments.

Before I submit v5 to address review comments.

We discussed this briefly in the patch review call last week and I think we were all a bit concerned about the patch series.

There was some work some time ago to try and make multiple kernels build in parallel and parameterise some of the code. This does seem to be a continuation of that work.

What some of us were wondering is whether the kernel-XXX prefix was intended to be the general "default" namespace which each kernel/module would provide, then the provider could be switched without the need to have all parameterisation this series ends up implementing. Unfortunately I've not had a chance to think about that more deeply and work out if that can be done or we really do have to change all the references as this series does.

Cheers,

Richard

#36 lore raw

Hello resurfacing this,

Finally setup a layer that builds multiple distro's simultaneously. It doesn't set KERNEL_PACKAGE_NAME. Builds just fine by changing TMPDIR in each multiconfig. Will run into issues like bellow if you don't.

ERROR: mc:liveusb-install:liveusb-install-linux-6.12.101-r0 do_packagedata:
Recipe liveusb-install-linux is trying to install files into a shared area when those files already exist. The files and the manifests listing them are:
/../../runtime-rprovides/kernel-6.12.101-amd-tiny/kernel-base

I think if we want the kernel-XXX prefix to be the default namespace we may need to remove KERNEL_PACKAGE_NAME entirely and force user to build in different TMPDIR's. Which I'm fine with that. I also think the original ideal was to 1 allow a single TMPDIR to be used and 2 have better separation between the kernels when using a package manager.
If you build 2 separate kernels, but they both have the same package name which one would the package manager install.

To fix this I have to set KERNEL_PACKAGE_NAME.

Can find layer here.

https://github.com/under-view/meta-udoo-bolt

For quick setup recommend using Docker container. Link in README.

Have a branch for this patch series that I'm keeping up to date. As well as supporting branches.

May be found here.

https://github.com/under-view/openembedded-core/tree/bugfix/kernel-package-name-2
https://github.com/under-view/meta-openembedded/tree/feature/kernel-package-name
https://github.com/under-view/meta-udoo-bolt/tree/feature/set-kernel-pn

Lastly, the above setup doesn't fix bug 11905. So, working on that now.

#37 lore raw
Quoted 20 lines · Vincent Davis Jr via lists.openembedded.org

Hello resurfacing this,

Finally setup a layer that builds multiple distro's simultaneously. It doesn't set KERNEL_PACKAGE_NAME. Builds just fine by changing TMPDIR in each multiconfig. Will run into issues like bellow if you don't.

ERROR: mc:liveusb-install:liveusb-install-linux-6.12.101-r0 do_packagedata:
Recipe liveusb-install-linux is trying to install files into a shared area when those files already exist. The files and the manifests listing them are:
  /../../runtime-rprovides/kernel-6.12.101-amd-tiny/kernel-base

I think if we want the kernel-XXX prefix to be the default namespace we may need to remove KERNEL_PACKAGE_NAME entirely and force user to build in different TMPDIR's. Which I'm fine with that. I also think the original ideal was to 1 allow a single TMPDIR to be used and 2 have better separation between the kernels when using a package manager.
If you build 2 separate kernels, but they both have the same package name which one would the package manager install.

Quoted 1 line

To fix this I have to set KERNEL_PACKAGE_NAME.

Have you tried setting PACKAGE_ARCH and adding a new level of packaging architecture to PACKAGE_ARCHS?

It will default to MACHINE_ARCH for a kernel but defining a new one should avoid some of the clashes as above...

Cheers,

Richard

#38 lore raw

Yes,

Setting PACKAGE_ARCH and updating PACKAGE_ARCHS.

Will run into

do_create_spdx: Could not find a static SPDX document named *static* -liveusb-console-linux

Which could probably be fix fairly easily. Will post when I'm further.

#39 lore raw

Hello,

In response to

https://lists.openembedded.org/g/openembedded-core/topic/121365625?msg=246365#msg246365

You can bypass spdx issues by

inheriting nospdx.

Put still run into same packaging issue. Even when changing PACKAGE_ARCH.

How do we think we want to proceed?

Quoted 22 lines · Vincent Davis Jr via lists.openembedded.org

Yes,

Setting PACKAGE_ARCH and updating PACKAGE_ARCHS.

Will run into

do_create_spdx: Could not find a static SPDX document named *static* -liveusb-console-linux

Which could probably be fix fairly easily. Will post when I'm further.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#244993):
https://lists.openembedded.org/g/openembedded-core/message/244993
Mute This Topic: https://lists.openembedded.org/mt/120238087/7072109
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-