Bug 15059 - INITRAMFS_IMAGE_BUNDLE rebuilds the whole kernel
Summary: INITRAMFS_IMAGE_BUNDLE rebuilds the whole kernel
Status: IN PROGRESS IMPLEMENTATION
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: 4.0.10
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 6.1 M2
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard: NIR 03/31
Depends on:
Blocks:
 
Reported: 2023-03-03 23:50 UTC by Nick Owens
Modified: 2026-05-28 14:28 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Owens 2023-03-03 23:50:04 UTC
in an otherwise clean kirkstone tree with

INITRAMFS_FSTYPES = "cpio"
INITRAMFS_IMAGE = "core-image-minimal-initramfs"
INITRAMFS_IMAGE_BUNDLE = "1"

set in local.conf, the do_bundle_initramfs task takes an excruciatingly long time, much longer than just do_compile.

to bundle the initramfs, the task appears to rebuild the whole kernel, while also ignoring PARALLEL_MAKE.

on my system with PARALLEL_MAKE="-j32", do_compile takes about 1 minute, whereas bundle_initramfs takes over 9 minutes.

i suspect setting CONFIG_INITRAMFS_SOURCE somehow taints the kernel source and the kernel makefiles think everything has to be rebuilt.

the best fix here is probably to not rebuild the whole kernel if possible, but if that isn't possible then at least rebuild it in parallel.
Comment 1 Randy MacLeod 2023-03-09 15:35:29 UTC
Does this also happen on the master branch?
Comment 2 Nick Owens 2023-03-10 13:30:30 UTC
(In reply to comment #1)
> Does this also happen on the master branch?

yes, i've just tested this on master:

commit 45d0ab66fd1285834312c8bb28124d2617461763 (HEAD -> master, origin/master)
Author: Michael Halstead <mhalstead@linuxfoundation.org>
Date:   Wed Mar 8 16:09:31 2023 -0800

    selftest/runtime_test/virgl: Disable for all Rocky Linux


the kernel is still completely rebuilt, and ignores PARALLEL_MAKE, when executing do_bundle_initramfs. my expectation is that either the whole kernel is not rebuilt just to bundle the initramfs, or it is at least done in parallel.
Comment 3 Randy MacLeod 2023-03-16 15:20:11 UTC
Still a bug. Bruce?
Comment 4 Bruce Ashfield 2023-03-31 17:04:59 UTC
Yup. Parallel or not, we need to root cause the rebuild reason.
Comment 5 Randy MacLeod 2024-10-17 19:04:15 UTC
Bulk move of medium importance bugs from 5.1 to 5.2 on behalf of Bruce.