All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/5] baremetal, linux-dummy: bypass kernel dependencies for baremetal
@ 2025-10-02  0:08 Denys Dmytriyenko
  2025-10-02  0:08 ` [RFC PATCH 2/5] glibc: skip also on baremetal Denys Dmytriyenko
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Denys Dmytriyenko @ 2025-10-02  0:08 UTC (permalink / raw)
  To: openembedded-core; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@konsulko.com>

When building something for baremetal configs (such as firmware
images for heterogeneous cores), you don't normally include Linux
kernel. But yocto-check-layer (and possibly other tools) tend to
dump "world" signatures and trip over a large number of Linux
kernel depdencies from other recipes and packagegroups. Those
aren't limited to directly depending on virtual/kernel, but also
everything else kernel-related, such as tools, device trees and
especially a large number of specific kernel module RRECOMMENDS.

As linux-dummy was originally created to specifically cut down all
such kernel dependencies when it's not built or packaged normally,
we can re-use it for baremetal configs as well.

Since linux-dummy can now be used outside of Linux host, update
COMPATIBLE_HOST accordingly.

Also, cut out kernel-devsrc (kernel sources) from the world build
completely - it is quite weird and very custom on its own.

[YOCTO #15982]

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 meta/conf/distro/include/tclibc-baremetal.inc | 1 +
 meta/recipes-kernel/linux/kernel-devsrc.bb    | 2 ++
 meta/recipes-kernel/linux/linux-dummy.bb      | 2 --
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/conf/distro/include/tclibc-baremetal.inc b/meta/conf/distro/include/tclibc-baremetal.inc
index abea5a7162..adac212dc0 100644
--- a/meta/conf/distro/include/tclibc-baremetal.inc
+++ b/meta/conf/distro/include/tclibc-baremetal.inc
@@ -8,6 +8,7 @@ LIBCOVERRIDE = ":libc-baremetal"
 
 ASSUME_PROVIDED += "virtual/libc virtual/libiconv virtual/crypt"
 
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
 PREFERRED_PROVIDER_virtual/libc ?= "musl"
 PREFERRED_PROVIDER_virtual/libiconv ?= "musl"
 PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 04dd683dde..dbad6f113a 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -423,3 +423,5 @@ RDEPENDS:${PN} += "${@bb.utils.contains('ARCH', 'powerpc', 'elfutils-dev', '', d
 RDEPENDS:${PN} += "gcc-plugins libmpc-dev"
 # 5.13+ needs grep for powerpc
 RDEPENDS:${PN}:append:powerpc = " grep"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index d7f39a452d..6199787a71 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -25,8 +25,6 @@ DESCRIPTION:kernel-vmlinux = "Kernel vmlinux meta package"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-COMPATIBLE_HOST = ".*-linux"
-
 SRC_URI = "file://COPYING.GPL"
 
 S = "${UNPACKDIR}"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-10-02 19:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02  0:08 [RFC PATCH 1/5] baremetal, linux-dummy: bypass kernel dependencies for baremetal Denys Dmytriyenko
2025-10-02  0:08 ` [RFC PATCH 2/5] glibc: skip also on baremetal Denys Dmytriyenko
2025-10-02  0:08 ` [RFC PATCH 3/5] musl: set compatibility a bit more flexible Denys Dmytriyenko
2025-10-02  2:12   ` [OE-core] " Khem Raj
2025-10-02 14:04     ` Denys Dmytriyenko
2025-10-02 17:23       ` Khem Raj
2025-10-02 19:31         ` Denys Dmytriyenko
2025-10-02  0:08 ` [RFC PATCH 4/5] newlib: mark as incompatible with baremetal, which uses musl Denys Dmytriyenko
2025-10-02  0:08 ` [RFC PATCH 5/5] packagegroups, dpkg: extend musl conditionals to baremetal Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.