aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-10-31 09:28:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-10-31 09:28:05 +0000
commit74d9ef96f1d96331b60d84d9f1687334b7fac557 (patch)
tree999b51a41739bb55c8bd06607adbb81bcf40c354 /target/linux
parent8a237d1f03a2c6bd43181a6aef2aff67c72a954b (diff)
downloadupstream-74d9ef96f1d96331b60d84d9f1687334b7fac557.tar.gz
upstream-74d9ef96f1d96331b60d84d9f1687334b7fac557.tar.bz2
upstream-74d9ef96f1d96331b60d84d9f1687334b7fac557.zip
oxnas: image: Refactor sanitize_profile_name using PROFILE_SANITIZED variable
Signed-off-by: Petr Štetiar <ynezz@true.cz> SVN-Revision: 47310
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/oxnas/image/Makefile20
1 files changed, 8 insertions, 12 deletions
diff --git a/target/linux/oxnas/image/Makefile b/target/linux/oxnas/image/Makefile
index 953aa0304e..f6abd6d293 100644
--- a/target/linux/oxnas/image/Makefile
+++ b/target/linux/oxnas/image/Makefile
@@ -22,10 +22,6 @@ POGOPLUG_V3_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
-define sanitize_profile_name
-$(shell echo $(PROFILE) | tr '[:upper:]' '[:lower:]' | sed 's/_/-/g')
-endef
-
define Image/BuildKernel/Template
$(CP) $(DTS_DIR)/ox820-$(1).dtb $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb
@@ -86,22 +82,22 @@ define Image/InstallKernel/Template
endef
define Image/Build/squashfs
- $(call Image/Build/SysupgradeNAND,$(call sanitize_profile_name),$(1),$(KDIR)/fit-$(call sanitize_profile_name).itb)
- $(call Image/Build/UbinizeImage,$(call sanitize_profile_name),--uboot-env --kernel $(KDIR)/fit-$(call sanitize_profile_name).itb,$(1),$($(PROFILE)_UBI_OPTS))
- cp $(KDIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-squashfs-ubinized.bin $(BIN_DIR)
+ $(call Image/Build/SysupgradeNAND,$(PROFILE_SANITIZED),$(1),$(KDIR)/fit-$(PROFILE_SANITIZED).itb)
+ $(call Image/Build/UbinizeImage,$(PROFILE_SANITIZED),--uboot-env --kernel $(KDIR)/fit-$(PROFILE_SANITIZED).itb,$(1),$($(PROFILE)_UBI_OPTS))
+ cp $(KDIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-squashfs-ubinized.bin $(BIN_DIR)
endef
define Image/mkfs/targz
- $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-rootfs.tar.gz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
+ $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-rootfs.tar.gz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
endef
define Image/Build/ubifs
ifneq ($($(PROFILE)_UBIFS_OPTS),)
- $(call Image/Build/SysupgradeNAND,$(call sanitize_profile_name),ubifs,$(KDIR)/fit-$(call sanitize_profile_name).itb)
- $(call Image/Build/UbinizeImage,$(call sanitize_profile_name),--uboot-env --kernel $(KDIR)/fit-$(call sanitize_profile_name).itb,ubifs,$($(PROFILE)_UBI_OPTS))
- cp $(KDIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-ubifs-ubinized.bin $(BIN_DIR)
+ $(call Image/Build/SysupgradeNAND,$(PROFILE_SANITIZED),ubifs,$(KDIR)/fit-$(PROFILE_SANITIZED).itb)
+ $(call Image/Build/UbinizeImage,$(PROFILE_SANITIZED),--uboot-env --kernel $(KDIR)/fit-$(PROFILE_SANITIZED).itb,ubifs,$($(PROFILE)_UBI_OPTS))
+ cp $(KDIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-ubifs-ubinized.bin $(BIN_DIR)
endif
endef
@@ -129,7 +125,7 @@ endef
define Image/Build
$(if $(Image/Build/$(1)), \
$(call Image/Build/$(1),$(1)), \
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-$(1).img \
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-$(1).img \
)
endef