kernel: fix wrong rework for Initramfs cpio xz compression
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 18 Sep 2024 22:56:32 +0000 (00:56 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 18 Sep 2024 22:56:32 +0000 (00:56 +0200)
Fix wrong rework for Initramfs cpio xz compression where it was wrongly
dropped the Per-Device linux directory if condition.

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

index e9e36d72b6924e540ecc45978104a55eb6d9eafb..82472c219460aa4eef2e44d741c63b21207f6ccc 100644 (file)
@@ -207,7 +207,7 @@ define Kernel/CompileImage/Initramfs
                        $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO), \
                                $(STAGING_DIR_HOST)/bin/lzop -9 -f $(if $(2),$(LINUX_DIR)$(2),$(KERNEL_BUILD_DIR))/initrd.cpio;) \
                        $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ), \
-                               $(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio;) \
+                               $(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(if $(2),$(LINUX_DIR)$(2),$(KERNEL_BUILD_DIR))/initrd.cpio;) \
                        $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD), \
                                $(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(if $(2),$(LINUX_DIR)$(2),$(KERNEL_BUILD_DIR))/initrd.cpio.zstd $(if $(2),$(LINUX_DIR)$(2),$(KERNEL_BUILD_DIR))/initrd.cpio;) \
                        $(if $(2),,$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all);),\