public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-core@lists.openembedded.org
Cc: Denys Dmytriyenko <denys@konsulko.com>
Subject: [RFC PATCH 1/5] baremetal, linux-dummy: bypass kernel dependencies for baremetal
Date: Wed,  1 Oct 2025 20:08:06 -0400	[thread overview]
Message-ID: <20251002000810.226673-1-denis@denix.org> (raw)

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



             reply	other threads:[~2025-10-02  0:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02  0:08 Denys Dmytriyenko [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251002000810.226673-1-denis@denix.org \
    --to=denis@denix.org \
    --cc=denys@konsulko.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox