aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-11-27 12:02:05 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-11-28 20:15:10 +0000
commit0a4f5d06c23215f4ea9945f8d72dff5ba60c34e5 (patch)
tree98cf001f8b1b8acc8dfb6b442560d3ba20ad8141 /include
parent2f6c847eb7f89bce9e33c64d707469fd3923dc36 (diff)
downloadupstream-0a4f5d06c23215f4ea9945f8d72dff5ba60c34e5.tar.gz
upstream-0a4f5d06c23215f4ea9945f8d72dff5ba60c34e5.tar.bz2
upstream-0a4f5d06c23215f4ea9945f8d72dff5ba60c34e5.zip
image: fix CONFIG_EXTERNAL_CPIO handling
CONFIG_EXTERNAL_CPIO is a string variable, hence testing for 'y' doesn't make much sense here. Fixes: 330bd380e8 ("image: allow building FIT and uImage with ramdisk") Reported-by: Huangbin Zhan <zhanhb88@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'include')
-rw-r--r--include/kernel-defaults.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 77a612dbe1..5a061a5178 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -171,7 +171,7 @@ define Kernel/CompileImage/Initramfs
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
-ifeq ($(CONFIG_EXTERNAL_CPIO),y)
+ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
else
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )