build: add target_params variable for getting root filesystem image parameters
authorFelix Fietkau <nbd@nbd.name>
Fri, 22 Jul 2016 10:43:54 +0000 (12:43 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 29 Jul 2016 08:18:26 +0000 (10:18 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/image.mk

index 2ed089d0c75b32a5fb98fc12923ca7b6de228bcd..8cc6a91373ab6eef3038551cb91ca84ac1962c86 100644 (file)
@@ -16,6 +16,7 @@ include $(INCLUDE_DIR)/image-legacy.mk
 override MAKE:=$(_SINGLE)$(SUBMAKE)
 override NO_TRACE_MAKE:=$(_SINGLE)$(NO_TRACE_MAKE)
 
+target_params = $(subst +,$(space),$*)
 param_get = $(patsubst $(1)=%,%,$(filter $(1)=%,$(2)))
 param_mangle = $(subst $(space),_,$(strip $(1)))
 param_unmangle = $(subst _,$(space),$(1))
@@ -272,7 +273,7 @@ ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
 endif
 
 $(KDIR)/root.%: kernel_prepare
-       $(call Image/mkfs/$(word 1,$(subst +,$(space),$*)),$(subst +,$(space),$*))
+       $(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
 
 define Device/InitProfile
   PROFILES := $(PROFILE)