public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] systemd based initrd and modular kernel support
@ 2025-04-04 16:29 Mikko Rapeli
  2025-04-04 16:29 ` [PATCH v3 01/11] systemd: enable efi support by default Mikko Rapeli
                   ` (11 more replies)
  0 siblings, 12 replies; 76+ messages in thread
From: Mikko Rapeli @ 2025-04-04 16:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mikko Rapeli

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.

v1: https://lists.openembedded.org/g/openembedded-core/message/212832

v2: split initrd size reduction and kernel modules addition
    to separate commits, added packages exclicitly back to fix
    rootfs mount visible as wic selftest failures,
    fixed wic bugs which resulted in broken boot due to missing
    EFI bootloader binaries in some builds, moved
    "systemd: use serial-getty-generator on genericarm64" to separate
    series since it's not strictly needed and goes to a different mailing
    list

v3: enable "efi" support in systemd by default not via MACHINE_FEATURES,
    disable kernel-initrd-modules meta package generation if
    KERNEL_INITRD_MODULES_REGEX is not set at all, keeping
    default KERNEL_INITRD_MODULES_REGEX in classes to support
    external kernel recipes (which could be compatible with default
    images to e.g. run upstream tests), tested (with pmem and
    modular kernel RFC patches sent out separately) using genericarm64
    machine config on:
    qemu u-boot https://ledge.validation.linaro.org/scheduler/job/106701
    qemu edk2 https://ledge.validation.linaro.org/scheduler/job/106703
    AMD zcu102 https://ledge.validation.linaro.org/scheduler/job/106702
    AMD kv260 https://ledge.validation.linaro.org/scheduler/job/106700
    rpi4 https://ledge.validation.linaro.org/scheduler/job/106705

Mikko Rapeli (11):
  systemd: enable efi support by default
  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
  core-image-initramfs-boot: don't install RRECOMMENDS to reduce size
  core-image-initramfs-boot: install kernel-initrd-modules by default
  oeqa selftest uki.py: add aarch64/arm test with systemd based initrd
  test_efi_plugin_plain_systemd-boot: don't set console
  image_types_wic.bbclass: capture verbose wic output by default
  wic bootimg-efi.py: fail build if no binaries installed
  image_types_wic.bbclass: depend on grub-efi and systemd-boot on
    aarch64, systemd-boot on arm

 .../test_efi_plugin_plain_systemd-boot.wks    |  2 +-
 meta/classes-recipe/image_types_wic.bbclass   |  4 +-
 .../kernel-module-split.bbclass               | 48 ++++++++++++
 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       | 32 +++++++-
 meta/recipes-core/systemd/systemd_257.4.bb    |  3 +-
 scripts/lib/wic/plugins/source/bootimg-efi.py |  3 +
 10 files changed, 203 insertions(+), 9 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2025-04-23 12:49 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 16:29 [PATCH v3 00/11] systemd based initrd and modular kernel support Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 01/11] systemd: enable efi support by default Mikko Rapeli
2025-04-10 10:16   ` [OE-core] " Adrian Freihofer
2025-04-10 11:12     ` Mikko Rapeli
2025-04-10 11:45     ` Ilias Apalodimas
2025-04-10 12:12       ` Ilias Apalodimas
2025-04-10 17:44         ` Alexander Kanavin
2025-04-10 17:48           ` Ilias Apalodimas
2025-04-10 19:19             ` Alexander Kanavin
2025-04-11 10:56               ` Ilias Apalodimas
2025-04-10 20:53         ` Adrian Freihofer
2025-04-11 10:38           ` Ilias Apalodimas
2025-04-10 12:13       ` Alexander Kanavin
2025-04-10 12:54         ` Ilias Apalodimas
2025-04-10 14:20           ` Alexander Kanavin
2025-04-10 14:38             ` Ilias Apalodimas
2025-04-10 14:51               ` Alexander Kanavin
2025-04-10 15:16                 ` Ilias Apalodimas
2025-04-10 15:27                 ` Mikko Rapeli
2025-04-11  8:40   ` Mike Looijmans
2025-04-11 10:45     ` Mikko Rapeli
2025-04-11 11:08       ` mike.looijmans
2025-04-14 16:28         ` Adrian Freihofer
2025-04-15  9:51           ` Mikko Rapeli
2025-04-15 10:39             ` Jose Quaresma
2025-04-15 16:20             ` Peter Kjellerstedt
2025-04-16  6:08               ` Mikko Rapeli
2025-04-16  9:07                 ` Koen Kooi
2025-04-16 10:10                 ` Adrian Freihofer
2025-04-16 12:54                 ` Peter Kjellerstedt
2025-04-04 16:29 ` [PATCH v3 02/11] uki.bbclass: drop serial console from kernel command line Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 03/11] kernel.bbclass: add kernel-initrd-modules meta package Mikko Rapeli
2025-04-08  3:42   ` [OE-core] " Bruce Ashfield
2025-04-10 12:42   ` Richard Purdie
2025-04-10 13:00     ` Mikko Rapeli
2025-04-10 13:15       ` Bruce Ashfield
2025-04-11  7:48         ` Mikko Rapeli
2025-04-11 12:52           ` Bruce Ashfield
2025-04-11 13:12             ` Mikko Rapeli
2025-04-11 13:39               ` Bruce Ashfield
2025-04-11 13:45                 ` Richard Purdie
2025-04-22 10:18                 ` Mikko Rapeli
2025-04-23 12:48                   ` Bruce Ashfield
     [not found]     ` <1834F69070219745.7383@lists.openembedded.org>
2025-04-11  8:07       ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 04/11] core-image-initramfs-boot: add option to build systemd based initrd Mikko Rapeli
2025-04-07  6:01   ` [OE-core] " Koen Kooi
2025-04-07  6:12     ` Mikko Rapeli
2025-04-07  8:58       ` Koen Kooi
2025-04-07  9:08         ` Mikko Rapeli
2025-04-10 12:45   ` Richard Purdie
2025-04-10 13:05     ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 05/11] core-image-initramfs-boot: don't install RRECOMMENDS to reduce size Mikko Rapeli
2025-04-10 12:47   ` [OE-core] " Richard Purdie
2025-04-10 13:09     ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 06/11] core-image-initramfs-boot: install kernel-initrd-modules by default Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 07/11] oeqa selftest uki.py: add aarch64/arm test with systemd based initrd Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 08/11] test_efi_plugin_plain_systemd-boot: don't set console Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 09/11] image_types_wic.bbclass: capture verbose wic output by default Mikko Rapeli
2025-04-14 20:43   ` [OE-core] " Trevor Woerner
2025-04-15  5:19     ` Mikko Rapeli
2025-04-22 14:25       ` Alexander Kanavin
2025-04-04 16:29 ` [PATCH v3 10/11] wic bootimg-efi.py: fail build if no binaries installed Mikko Rapeli
2025-04-14 20:51   ` [OE-core] " Trevor Woerner
2025-04-15  5:03     ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 11/11] image_types_wic.bbclass: depend on grub-efi and systemd-boot on aarch64, systemd-boot on arm Mikko Rapeli
2025-04-14 20:48   ` [OE-core] " Trevor Woerner
2025-04-15  5:01     ` Mikko Rapeli
2025-04-07  7:53 ` [OE-core] [PATCH v3 00/11] systemd based initrd and modular kernel support Mathieu Dubois-Briand
2025-04-07  8:10   ` Mikko Rapeli
2025-04-07  8:51     ` Mathieu Dubois-Briand
2025-04-07  9:24       ` Mikko Rapeli
2025-04-07  9:52         ` Mathieu Dubois-Briand
2025-04-07 10:26           ` Mikko Rapeli
     [not found]           ` <18340261181AE46F.21691@lists.openembedded.org>
2025-04-07 11:13             ` Mikko Rapeli
2025-04-08 11:26               ` Mathieu Dubois-Briand
2025-04-08 11:39                 ` Mikko Rapeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox