kernel: rework Initramfs compile cpio handling
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 18 Sep 2024 23:01:27 +0000 (01:01 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 18 Sep 2024 23:07:25 +0000 (01:07 +0200)
commitbfb2e099e41172d4cf8884a97058ff6d495b9976
treec73250902c995c3bc34640c6e8ee48f6c43e5598
parent98a62f7c8c099de724318cdbdd74a1df659df619
kernel: rework Initramfs compile cpio handling

Now that we copy and then delete the Per-Device rootfs linux directory,
it's not valid anymore placing the generated cpio there as artifacts
or subsequent commands need the generated cpio.

To handle this, rework Initramfs compile cpio handling by placing them in
the KERNEL_BUILD_DIR but add to the name the rootfs HASH ID.

To also prevent race condition, generate and access these file under a
lock to prevent fit command to reference a cpio while a parallel
execution is genereting it.

Fixes: 52cc9d82f113 ("kernel: rework Initramfs locking logic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
include/image-commands.mk
include/kernel-defaults.mk