From 8a237d1f03a2c6bd43181a6aef2aff67c72a954b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 31 Oct 2015 09:27:56 +0000 Subject: kirkwood: image: Refactor sanitize_profile_name using PROFILE_SANITIZED var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Štetiar SVN-Revision: 47309 --- target/linux/kirkwood/image/Makefile | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'target') diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 019806c985..5dcad9850b 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -10,10 +10,6 @@ NAND_BLOCKSIZE := 2048-128k include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -define sanitize_profile_name -$(shell echo $(PROFILE) | tr '[:upper:]' '[:lower:]') -endef - define Image/BuildKernel/Template $(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage @@ -37,21 +33,21 @@ define Image/BuildKernel/Template ifneq ($(1),) $(CP) $(DTS_DIR)/kirkwood-$(1).dtb $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb - $(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-zImage - cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb >> $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-zImage + $(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage + cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb >> $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage $(call Image/BuildKernel/MkuImage, \ none, 0x8000, 0x8000, \ - $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-zImage, \ - $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-uImage \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage, \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-uImage \ ) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-zImage-initramfs - cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb >> $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-zImage-initramfs + $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage-initramfs + cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb >> $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage-initramfs $(call Image/BuildKernel/MkuImage, \ none, 0x8000, 0x8000, \ - $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-zImage-initramfs, \ - $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-uImage-initramfs \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage-initramfs, \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-uImage-initramfs \ ) endif endif @@ -81,7 +77,7 @@ define Image/InstallKernel/Template endef define Image/Build/jffs2-nand-2048-128k - dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-$(1).img \ + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-$(1).img \ bs=2048 conv=sync endef @@ -90,25 +86,25 @@ define Image/Build/squashfs ( \ dd if=$(KDIR)/zImage bs=4096k conv=sync; \ dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \ - ) > $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-$(1).img + ) > $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-$(1).img 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),) - $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-rootfs.ubifs + $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-rootfs.ubifs endif endef define Image/Build/ubi ifneq ($($(PROFILE)_UBI_OPTS),) - $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-rootfs.ubi + $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-rootfs.ubi endif endef @@ -165,7 +161,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 -- cgit v1.2.3