mbox series

[RFC,0/5] Kernel Rust out-of-tree module support

Message ID 20251119195540.2671856-1-yoann.congal@smile.fr
Headers show
Series Kernel Rust out-of-tree module support | expand

Message

Yoann Congal Nov. 19, 2025, 7:55 p.m. UTC
As followup of Harish Sadineni's RFC series "Enable rust support for
linux kernel" [0] (and to increase its test coverage), this series add
support for out-of-tree kernel module written in Rust as well as
associated test.

[0]: https://lists.openembedded.org/g/openembedded-core/message/226560

Yoann Congal (5):
  kernel.bbclass: Export artifacts needed for out-of-tree Rust
    compilation
  module.bbclass: Prepare out-of-tree rust module compilation
  meta-skeleton: Add rust-out-of-tree-module recipe
  rust-out-of-tree-module: Add myself as maintainer
  runtime_test: Add rust-out-of-tree selftest

 .../rust-out-of-tree-module_git.bb             | 18 ++++++++++++++++++
 meta/classes-recipe/kernel.bbclass             | 18 ++++++++++++++++++
 meta/classes-recipe/module.bbclass             |  8 ++++++++
 meta/conf/distro/include/maintainers.inc       |  1 +
 meta/lib/oeqa/selftest/cases/runtime_test.py   |  9 ++++++++-
 5 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb

Comments

Mathieu Dubois-Briand Dec. 1, 2025, 9:48 a.m. UTC | #1
On Wed Nov 19, 2025 at 8:55 PM CET, Yoann Congal via lists.openembedded.org wrote:
> As followup of Harish Sadineni's RFC series "Enable rust support for
> linux kernel" [0] (and to increase its test coverage), this series add
> support for out-of-tree kernel module written in Rust as well as
> associated test.
>
> [0]: https://lists.openembedded.org/g/openembedded-core/message/226560
>
> Yoann Congal (5):
>   kernel.bbclass: Export artifacts needed for out-of-tree Rust
>     compilation
>   module.bbclass: Prepare out-of-tree rust module compilation
>   meta-skeleton: Add rust-out-of-tree-module recipe
>   rust-out-of-tree-module: Add myself as maintainer
>   runtime_test: Add rust-out-of-tree selftest
>
>  .../rust-out-of-tree-module_git.bb             | 18 ++++++++++++++++++
>  meta/classes-recipe/kernel.bbclass             | 18 ++++++++++++++++++
>  meta/classes-recipe/module.bbclass             |  8 ++++++++
>  meta/conf/distro/include/maintainers.inc       |  1 +
>  meta/lib/oeqa/selftest/cases/runtime_test.py   |  9 ++++++++-
>  5 files changed, 53 insertions(+), 1 deletion(-)
>  create mode 100644 meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb

Hi Yoann,

I ran a few RFC series on the autobuilder, and I suspect this one of
these two issues, during oe-selftests.

First issues:

2025-11-29 08:23:13,186 - oe-selftest - INFO - 2: 6/31 214/648 (110.21s) (0 failed) (distrodata.Distrodata.test_maintainers)
2025-11-29 08:23:13,186 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/distrodata.py", line 115, in test_maintainers
    self.fail("""
  File "/usr/lib/python3.12/unittest/case.py", line 715, in fail
    raise self.failureException(msg)
AssertionError:
Unable to find recipes for the following entries in maintainers.inc:
rust-out-of-tree-module

I saw you added something, but for some reason the test is not happy.

Second issues:

ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command '/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/rootfs/etc/yum.repos.d --installroot=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/rootfs --setopt=logdir=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/temp --repofrompath=oe-repo,/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/oe-rootfs-repo --nogpgcheck install kernel-module-rust-minimal kernel-module-rust-out-of-tree packagegroup-core-boot run-postinsts ssh-pregen-hostkeys' returned 1:
...
No match for argument: kernel-module-rust-out-of-tree
Error: Unable to find a match: kernel-module-rust-out-of-tree
kernel-module-rust-out-of-tree is neither a recipe nor a generated package.

https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2915
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2777
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/2672

Thanks,
Mathieu
Yoann Congal Dec. 4, 2025, 8:15 a.m. UTC | #2
Le 01/12/2025 à 10:48, Mathieu Dubois-Briand a écrit :
> On Wed Nov 19, 2025 at 8:55 PM CET, Yoann Congal via lists.openembedded.org wrote:
>> As followup of Harish Sadineni's RFC series "Enable rust support for
>> linux kernel" [0] (and to increase its test coverage), this series add
>> support for out-of-tree kernel module written in Rust as well as
>> associated test.
>>
>> [0]: https://lists.openembedded.org/g/openembedded-core/message/226560
>>
>> Yoann Congal (5):
>>   kernel.bbclass: Export artifacts needed for out-of-tree Rust
>>     compilation
>>   module.bbclass: Prepare out-of-tree rust module compilation
>>   meta-skeleton: Add rust-out-of-tree-module recipe
>>   rust-out-of-tree-module: Add myself as maintainer
>>   runtime_test: Add rust-out-of-tree selftest
>>
>>  .../rust-out-of-tree-module_git.bb             | 18 ++++++++++++++++++
>>  meta/classes-recipe/kernel.bbclass             | 18 ++++++++++++++++++
>>  meta/classes-recipe/module.bbclass             |  8 ++++++++
>>  meta/conf/distro/include/maintainers.inc       |  1 +
>>  meta/lib/oeqa/selftest/cases/runtime_test.py   |  9 ++++++++-
>>  5 files changed, 53 insertions(+), 1 deletion(-)
>>  create mode 100644 meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb
> 
> Hi Yoann,
> 
> I ran a few RFC series on the autobuilder, and I suspect this one of
> these two issues, during oe-selftests.
> 
> First issues:
> 
> 2025-11-29 08:23:13,186 - oe-selftest - INFO - 2: 6/31 214/648 (110.21s) (0 failed) (distrodata.Distrodata.test_maintainers)
> 2025-11-29 08:23:13,186 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
>   File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/distrodata.py", line 115, in test_maintainers
>     self.fail("""
>   File "/usr/lib/python3.12/unittest/case.py", line 715, in fail
>     raise self.failureException(msg)
> AssertionError:
> Unable to find recipes for the following entries in maintainers.inc:
> rust-out-of-tree-module
> 
> I saw you added something, but for some reason the test is not happy.
> 
> Second issues:
> 
> ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command '/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/rootfs/etc/yum.repos.d --installroot=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/rootfs --setopt=logdir=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/temp --repofrompath=oe-repo,/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-179319/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0/oe-rootfs-repo --nogpgcheck install kernel-module-rust-minimal kernel-module-rust-out-of-tree packagegroup-core-boot run-postinsts ssh-pregen-hostkeys' returned 1:
> ...
> No match for argument: kernel-module-rust-out-of-tree
> Error: Unable to find a match: kernel-module-rust-out-of-tree
> kernel-module-rust-out-of-tree is neither a recipe nor a generated package.
> 
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2915
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2777
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/2672

It appears that meta-skeleton:
* is not covered by maintainers.inc
* is not included by default during this selftest (I had it in my local
  config)

I will fix these in v2.

Thanks!

> Thanks,
> Mathieu
>