All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 0/6] systemd based initrd and modular kernel support
Date: Mon, 17 Mar 2025 14:20:38 +0200	[thread overview]
Message-ID: <Z9gTlqM4WDBVZiSW@nuoska> (raw)
In-Reply-To: <d9313e60692d537081323a532bd154493efc5975.camel@linuxfoundation.org>

Hi,

On Mon, Mar 17, 2025 at 11:50:58AM +0000, Richard Purdie wrote:
> On Fri, 2025-03-14 at 13:19 +0200, Mikko Rapeli via lists.openembedded.org wrote:
> > systemd based initrd supports more security, encryption etc features
> > than custom shell script ones but oe-core lacks support for it.
> > Convert core-image-initramfs-boot to create systemd based initrd
> > if "systemd-initramfs" is set in DISTRO_FEATURES. Includes a test
> > for this initrd to mount rootfs via Unified Kernel Image uki.py.
> > 
> > Sadly the boot time is really slow, e.g. over 30 seconds with
> > systemd based initrd. One of the major reasons is the large
> > amount of kernel modules built into the linux-yocto kernel and
> > processing of their udev events in userspace. Thus add
> > kernel-initrd-modules meta package to easily install
> > subset of all kernel modules to initrd. The subset
> > supports "mount rootfs from any block device" but
> > doesn't include graphics, UBS etc support. Without this
> > generated meta package, initrd recipe needs to manually define
> > which exact kernel modules to include which breaks if
> > those modules are built into the kernel. Thus the initrd
> > becomes machine and kernel config specific and hard to maintain.
> > With this meta package a generic initrd can be created.
> > 
> > Separate changes to linux-yocto compile a lot more drivers
> > as modules but they depend on these initrd changes.
> > 
> > Mikko Rapeli (6):
> > � systemd: use serial-getty-generator on genericarm64
> > � systemd: enable efi support if in MACHINE_FEATURES too
> > � uki.bbclass: drop serial console from kernel command line
> > � kernel.bbclass: add kernel-initrd-modules meta package
> > � core-image-initramfs-boot: add option to build systemd based initrd
> > � oeqa selftest uki.py: add aarch64/arm test with systemd based initrd
> > 
> > �.../recipes-core/systemd/systemd_%.bbappend�� |� 3 +
> > �.../kernel-module-split.bbclass�������������� | 46 +++++++++++
> > �meta/classes-recipe/kernel.bbclass����������� |� 5 +-
> > �meta/classes-recipe/module.bbclass����������� | 37 +++++++++
> > �meta/classes-recipe/uki.bbclass�������������� |� 2 +-
> > �meta/lib/oeqa/selftest/cases/uki.py���������� | 76 +++++++++++++++++++
> > �.../images/core-image-initramfs-boot.bb������ | 28 ++++++-
> > �meta/recipes-core/systemd/systemd_257.3.bb��� |� 1 +
> > �8 files changed, 193 insertions(+), 5 deletions(-)
> > �create mode 100644 meta-yocto-bsp/recipes-core/systemd/systemd_%.bbappend
> 
> Unfortunately this series seemed to result in oe-selftest failures on
> both aarch64 and x86-64:
> 
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/1242
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1110/steps/14/logs/stdio

Thanks, I will investigate these. I ran into various issues when executing
selftests on my aarch64 build machine.

Is the basehash error related to this series or something else?

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/1782873/raw_inline

stdio: ERROR: When reparsing /tmp/selftest-fetchoxfe4t0p/test.bb:do_checkuri, the basehash value changed from 84b9e23a83a764e7a5d8a96ee523199e2b1c604f4280a45030e248de0ff52962 to 4123da244f465feffecb2b4fd2b132b64851981ec2fb70bf9445df8b0ea6a69e. The metadata is not deterministic and this needs to be fixed.
stdio: ERROR: The following commands may help:
stdio: ERROR: $ bitbake test -cdo_checkuri -Snone
stdio: ERROR: Then:
stdio: ERROR: $ bitbake test -cdo_checkuri -Sprintdiff
stdio: ERROR: When reparsing /tmp/selftest-fetchoxfe4t0p/test.bb:do_fetch, the basehash value changed from 6d55d6743729b615749dc016857d7e5f9c884a8b92f0d57f68e743f4910333d3 to fa7d6ea0563b60362418d2a6c5e41a6684183d01ec578b65abd0c64a9cfba7cf. The metadata is not deterministic and this needs to be fixed.
...

There are a lot of these.

If there are any boot failures in qemu then I will have a look. The changes were not
supposed to change existing rootfs or initrd images. The new test in uki.py
may fail on some configurations which I did no manage to test.
Maybe "uki.bbclass: drop serial console from kernel command line" is breaking
serial console prompt on some machines. I'll try to reproduce.

Did the test run contain the linux-yocto changes which build a lot of kernel
drivers as modules? I don't think that is ready for AB testing yet, hence RFC in
https://lists.yoctoproject.org/g/linux-yocto/message/14866
The changes were sent out in-reply-to this thread so it's possible some tool
picked them up. That could explain shell script based initrd boot error message:

ERROR: There's no '/dev' on rootfs.

Cheers,

-Mikko


  reply	other threads:[~2025-03-17 12:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 11:19 [PATCH 0/6] systemd based initrd and modular kernel support Mikko Rapeli
2025-03-14 11:19 ` [PATCH 2/6] systemd: enable efi support if in MACHINE_FEATURES too Mikko Rapeli
2025-03-14 11:19 ` [PATCH 3/6] uki.bbclass: drop serial console from kernel command line Mikko Rapeli
2025-03-14 11:19 ` [PATCH 4/6] kernel.bbclass: add kernel-initrd-modules meta package Mikko Rapeli
2025-03-14 11:19 ` [PATCH 5/6] core-image-initramfs-boot: add option to build systemd based initrd Mikko Rapeli
2025-03-14 11:19 ` [PATCH 6/6] oeqa selftest uki.py: add aarch64/arm test with " Mikko Rapeli
2025-03-14 11:21 ` [PATCH v2 1/6] systemd: use serial-getty-generator on genericarm64 Mikko Rapeli
2025-03-14 11:33   ` Patchtest results for " patchtest
2025-03-17 10:37 ` [OE-core] [PATCH 0/6] systemd based initrd and modular kernel support Alexander Kanavin
2025-03-17 10:42   ` Mikko Rapeli
2025-03-17 11:50 ` Richard Purdie
2025-03-17 12:20   ` Mikko Rapeli [this message]
2025-03-17 12:25     ` Richard Purdie

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=Z9gTlqM4WDBVZiSW@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 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.