From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Bruce Ashfield <bruce.ashfield@gmail.com>,
Harish Sadineni <Harish.Sadineni@windriver.com>
Cc: openembedded-core@lists.openembedded.org,
Randy.MacLeod@windriver.com, Sundeep.Kokkonda@windriver.com,
paul@pbarker.dev, yoann.congal@smile.fr
Subject: Re: [OE-core] [PATCH v7 01/14] linux-yocto: conditionally add clang/rust/bindgen-cli-native to DEPENDS
Date: Mon, 09 Mar 2026 19:20:00 +0000 [thread overview]
Message-ID: <cff0fc23fcf9e5176fc4830f1ff395a79bcaffe8.camel@linuxfoundation.org> (raw)
In-Reply-To: <CADkTA4OZVd17y5v2XYzZx1gRqSE81A+RRo4-WaL13195GpKTAw@mail.gmail.com>
On Mon, 2026-03-09 at 14:01 -0400, Bruce Ashfield wrote:
>
>
>
> On Mon, Mar 9, 2026 at 12:54 PM Harish Sadineni
> <Harish.Sadineni@windriver.com> wrote:
> >
> >
> >
> >
> >
> > On 3/9/2026 9:59 PM, Bruce Ashfield wrote:
> >
> >
> > >
> > > CAUTION: This email comes from a non Wind River email account!
> > > Do not click links or open attachments unless you recognize the
> > > sender and know the content is safe.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Mon, Mar 9, 2026 at 12:10 PM Harish Sadineni
> > > <Harish.Sadineni@windriver.com> wrote:
> > >
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 3/9/2026 4:56 PM, Richard Purdie wrote:
> > > >
> > > >
> > > > >
> > > > > CAUTION: This email comes from a non Wind River email
> > > > > account!
> > > > > Do not click links or open attachments unless you recognize
> > > > > the sender and know the content is safe.
> > > > >
> > > > > On Wed, 2026-03-04 at 09:43 -0800, Sadineni, Harish via
> > > > > lists.openembedded.org wrote:
> > > > >
> > > > > >
> > > > > > From: Harish Sadineni <Harish.Sadineni@windriver.com>
> > > > > >
> > > > > > Conditionally add 'clang-native', 'rust-native' and
> > > > > > 'bindgen-cli-native' to 'DEPENDS'
> > > > > > when Kernel Rust Support is enabled.
> > > > > >
> > > > > > These tools are required for building Rust-enabled kernels
> > > > > > and for
> > > > > > generating Rust FFI bindings via bindgen during the kernel
> > > > > > build.
> > > > > >
> > > > > > This ensures the additional dependencies are only pulled in
> > > > > > when
> > > > > > Rust support is explicitly enabled, avoiding unnecessary
> > > > > > native
> > > > > > dependencies for non-Rust kernel builds.
> > > > > >
> > > > > > Signed-off-by: Harish Sadineni
> > > > > > <Harish.Sadineni@windriver.com>
> > > > > > ---
> > > > > > meta/recipes-kernel/linux/linux-yocto.inc | 3 +++
> > > > > > 1 file changed, 3 insertions(+)
> > > > > >
> > > > > > diff --git a/meta/recipes-kernel/linux/linux-yocto.inc
> > > > > > b/meta/recipes-kernel/linux/linux-yocto.inc
> > > > > > index 4d0a726bb6..b7961bbcdf 100644
> > > > > > --- a/meta/recipes-kernel/linux/linux-yocto.inc
> > > > > > +++ b/meta/recipes-kernel/linux/linux-yocto.inc
> > > > > > @@ -76,11 +76,14 @@ do_install:append(){
> > > > > > KERNEL_FEATURES:append:qemuall = " features/kernel-
> > > > > > sample/kernel-sample.scc"
> > > > > >
> > > > > > KERNEL_DEBUG ?= ""
> > > > > > +KERNEL_RUST_SUPPORT ?= ""
> > > > > > # These used to be version specific, but are now common
> > > > > > dependencies. New
> > > > > > # tools / dependencies will continue to be added in
> > > > > > version specific recipes.
> > > > > > DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86",
> > > > > > "arm64", "powerpc" ], "elfutils-native", "", d)}'
> > > > > > DEPENDS += "openssl-native util-linux-native"
> > > > > > DEPENDS += "gmp-native libmpc-native"
> > > > > > +RUST_KERNEL_DEPENDS ?=
> > > > > > "${@bb.utils.contains('KERNEL_RUST_SUPPORT', 'True',
> > > > > > 'clang-native rust-native bindgen-cli-native', '', d)}"
> > > > > > +DEPENDS += "${RUST_KERNEL_DEPENDS}"
> > > > > >
> > > > > > # Some options depend on CONFIG_PAHOLE_VERSION, so need to
> > > > > > make pahole-native available before do_kernel_configme
> > > > > > do_kernel_configme[depends] +=
> > > > > > '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-
> > > > > > native:do_populate_sysroot", "", d)}'
> > > > > >
> > > > >
> > > > > I thought we were going to try and use KERNEL_FEATURES for
> > > > > this?
> > > > >
> > > > Hi Richard,
> > > >
> > > > I have tried this but i got circular dependency error with
> > > > KERNEL_FEATURES. So, I opted using variable
> > > > KERNEL_RUST_SUPPORT.
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > > I'm curious about that. Can you share the details ? (diff and the
> > > bitbake error)
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > As discussed previously, I attempted to use the following in
> > meta/recipes-kernel/linux/linux-yocto_6.18.bb:
> >
> > KERNEL_FEATURES:append = " ${@bb.utils.contains('KERNEL_FEATURES',
> > 'rust-kernel', ' features/kernel-rust/kernel-rust.scc', '', d)}"
> >
> > This resulted in a BitBake variable dependency chain failure. The
> > issue occurs because the expression is trying to read
> > KERNEL_FEATURES
> > while simultaneously modifying KERNEL_FEATURES, which creates a
> > circular dependency.
> >
>
>
> Yes, that's clearly not going to work, but that wouldn't have been
> the suggestion.
>
> Wasn't Richard asking about setting the RUST_KERNEL_DEPENDS based on
> the KERNEL_FEATURES containing rust.scc ?
Yes, along with maybe with a tweak to the KERNEL_FEATURES code which
could expand " rust " or maybe " kernel-rust "in KERNEL_FEATURES into
"features/kernel-rust/kernel-rust.scc" too just so there was a nice
short cut for it?
Cheers,
Richard
next prev parent reply other threads:[~2026-03-09 19:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 17:43 [PATCH v7 00/14] Enable rust support for linux kernel Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 01/14] linux-yocto: conditionally add clang/rust/bindgen-cli-native to DEPENDS Harish.Sadineni
2026-03-09 11:26 ` [OE-core] " Richard Purdie
2026-03-09 16:09 ` Harish Sadineni
2026-03-09 16:29 ` Bruce Ashfield
2026-03-09 16:53 ` Harish Sadineni
2026-03-09 18:01 ` Bruce Ashfield
2026-03-09 19:20 ` Richard Purdie [this message]
2026-03-10 10:57 ` Harish Sadineni
2026-03-10 12:44 ` Bruce Ashfield
2026-03-10 13:30 ` Harish Sadineni
2026-03-10 13:40 ` Bruce Ashfield
2026-03-12 13:34 ` Richard Purdie
2026-03-12 22:21 ` Yoann Congal
2026-03-04 17:43 ` [PATCH v7 02/14] rust: install Rust library sources for 'make rustavailable' support Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 03/14] kernel-yocto-rust: enable Rust kernel support via 'make rustavailable' Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 04/14] linux-yocto: enable Rust support in kernel configuration Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 06/14] make-mod-scripts: split `HOSTCC` flag to align with to linux-yocto Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 07/14] kernel: Disable ccache when kernel rust support is enabled Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 08/14] kernel-devsrc: copying rust-kernel source to $kerneldir/build Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 10/14] kernel.bbclass: Copy include/config/auto.conf in STAGING_KERNEL_BUILDDIR Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 11/14] module-rust.bbclass: Prepare out-of-tree rust module compilation Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 12/14] meta-skeleton: Add rust-out-of-tree-module recipe Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 13/14] make-mod-scripts: fix for buildpath issues with rust-out-of-tree compilation Harish.Sadineni
2026-03-04 17:43 ` [PATCH v7 14/14] runtime_test: Add rust-out-of-tree selftest Harish.Sadineni
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=cff0fc23fcf9e5176fc4830f1ff395a79bcaffe8.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=Harish.Sadineni@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=bruce.ashfield@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul@pbarker.dev \
--cc=yoann.congal@smile.fr \
/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