aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-31 23:40:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-31 23:40:37 +0000
commit929db89dbe91bfe0343835d774464b788252b19c (patch)
tree2ba07b2de28db750f34fbcbf972885a86b50eefe /include
parent301049bf1fb97f93d98ba92e944376a9ed126a65 (diff)
downloadupstream-929db89dbe91bfe0343835d774464b788252b19c.tar.gz
upstream-929db89dbe91bfe0343835d774464b788252b19c.tar.bz2
upstream-929db89dbe91bfe0343835d774464b788252b19c.zip
image: only call Image/BuildKernel/Initramfs if initramfs is actually enabled
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41914 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/image.mk13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/image.mk b/include/image.mk
index 9f583ca7ad..b3211e7cb1 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -77,15 +77,10 @@ define prepare_generic_squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(1) 4 8 16 64 128 256
endef
-ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
- define Image/BuildKernel/Initramfs
+define Image/BuildKernel/Initramfs
cp $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs.elf
$(call Image/Build/Initramfs)
- endef
-else
- define Image/BuildKernel/Initramfs
- endef
-endif
+endef
define Image/BuildKernel/MkuImage
mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \
@@ -269,7 +264,7 @@ define BuildImage
$(call Image/Prepare)
$(call Image/mkfs/prepare)
$(call Image/BuildKernel)
- $(call Image/BuildKernel/Initramfs)
+ $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs))
$(call Image/InstallKernel)
$(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz)
@@ -283,7 +278,7 @@ define BuildImage
else
install: compile install-targets
$(call Image/BuildKernel)
- $(call Image/BuildKernel/Initramfs)
+ $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs))
$(call Image/InstallKernel)
$(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz)