public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [RFC v3 0/2] Significantly speedup image generation
@ 2025-04-09 11:28 'Felix Moessbauer' via isar-users
  2025-04-09 11:28 ` [RFC v3 1/2] delay creation of initrd until end of rootfs install 'Felix Moessbauer' via isar-users
  2025-04-09 11:28 ` [RFC v3 2/2] report approximate progress during initrd generation 'Felix Moessbauer' via isar-users
  0 siblings, 2 replies; 4+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2025-04-09 11:28 UTC (permalink / raw)
  To: isar-users; +Cc: adriaan.schmidt, cedric.hombourger, Felix Moessbauer

Especially on non native machines, the image generation can take a long time.
This is due to the fact that the initrd is generated during the rootfs
installation. By that, also the initrd is generated multiple times, despite
only one final version is needed. In case of a out-of-rootfs initrd, it is built
5 times (2x in rootfs, 2x in initramfs +1x manually in initramfs).

We optimize this by manually controlling when the initrd is built instead of
relying on the triggers from the initramfs-tools. As initramfs-tools does
not provide a conf.d style mechanism to completely disable the generation,
we now install this package during bootstrap and then stub the update-initramfs
calls during rootfs installation. In rootfs_postprocess, we restore the
original update-initramfs calls and build the initrd manually.

Changes since v2:

- Complete re-design of approach to better integrate with sstate cache
- Unify logic in rootfs.bblcass and initramfs.bbclass

Best regards,
Felix

Felix Moessbauer (2):
  delay creation of initrd until end of rootfs install
  report approximate progress during initrd generation

 meta/classes/image.bbclass                    | 17 ++---
 meta/classes/initramfs.bbclass                | 39 +----------
 meta/classes/rootfs.bbclass                   | 70 +++++++++++++++++++
 meta/lib/rootfs_progress.py                   | 33 +++++++--
 .../isar-bootstrap/isar-bootstrap.inc         |  2 +
 .../isar-mmdebstrap/isar-mmdebstrap.inc       |  2 +
 .../sbuild-chroot/sbuild-chroot.inc           |  1 +
 7 files changed, 109 insertions(+), 55 deletions(-)

-- 
2.39.5

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250409112847.3395116-1-felix.moessbauer%40siemens.com.

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

end of thread, other threads:[~2025-04-09 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-09 11:28 [RFC v3 0/2] Significantly speedup image generation 'Felix Moessbauer' via isar-users
2025-04-09 11:28 ` [RFC v3 1/2] delay creation of initrd until end of rootfs install 'Felix Moessbauer' via isar-users
2025-04-09 14:03   ` 'Jan Kiszka' via isar-users
2025-04-09 11:28 ` [RFC v3 2/2] report approximate progress during initrd generation 'Felix Moessbauer' via isar-users

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