image: Fix the CONFIG_EXTERNAL_CPIO logic
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 24 Oct 2023 11:10:51 +0000 (13:10 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 24 Oct 2023 12:39:15 +0000 (14:39 +0200)
Fix the qstrip call.

Fixes: #13776.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 330492a101cdb1608d1194496c1b620315ef8bd8)

include/kernel-defaults.mk

index 2e2139201689fc7a1befb5a5b7794fb5c3e80c35..2291acdaf94f609701c03eb3941ec7a2a9d30e37 100644 (file)
@@ -171,7 +171,7 @@ define Kernel/CompileImage/Initramfs
        $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
        rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
-ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
+ifneq ($(call qstrip,$(CONFIG_EXTERNAL_CPIO)),)
        $(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
 else
        ( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )