diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-06-24 16:55:08 +0200 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2016-06-24 16:55:08 +0200 |
commit | 2ae96f95d0300bcdf4006d80628ddb92193e9873 (patch) | |
tree | b4e86d742f58caf81b0e16a4cecfafc9c284ef2f /target/linux | |
parent | 59c662b6ece6da93cff729b9a2013fd7fa350675 (diff) | |
download | master-187ad058-2ae96f95d0300bcdf4006d80628ddb92193e9873.tar.gz master-187ad058-2ae96f95d0300bcdf4006d80628ddb92193e9873.tar.bz2 master-187ad058-2ae96f95d0300bcdf4006d80628ddb92193e9873.zip |
lantiq: get rid of ifneq() checks inside command templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/lantiq/image/Makefile | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 9f3c8ecba8..e53fdd861e 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -57,14 +57,13 @@ define Image/Build/squashfs $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image) endef -define Image/BuildNAND/squashfs - ifneq ($($(PROFILE)_UBI_OPTS),) + define Image/BuildNAND/squashfs $(call prepare_generic_squashfs,$(KDIR)/root.$(1)) $(call Image/Build/UbinizeImage,$(PROFILE),,squashfs,$($(PROFILE)_UBI_OPTS)) $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE)) + endef endif -endef DGN3500_SKERNEL=0x50000 DGN3500_SKERNEL_DECIMAL=327680 @@ -108,20 +107,18 @@ define Image/BuildEVA/squashfs $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva) endef -define Image/BuildEVA/ubifs - ifneq ($($(PROFILE)_UBIFS_OPTS),) + define Image/BuildEVA/ubifs $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs + endef endif -endef - -define Image/BuildEVA/ubi ifneq ($($(PROFILE)_UBI_OPTS),) + define Image/BuildEVA/ubi $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi + endef endif -endef define Image/BuildLoader/squashfs dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=3072k conv=sync @@ -148,60 +145,69 @@ define Image/Build/jffs2-256k cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image endef -define Image/Build/ubifs - ifneq ($($(PROFILE)_UBIFS_OPTS),) + define Image/Build/ubifs $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs + endef endif -endef - -define Image/Build/ubi ifneq ($($(PROFILE)_UBI_OPTS),) + define Image/Build/ubi $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi + endef endif -endef -define Image/BuildNAND/ubifs - ifneq ($($(PROFILE)_UBIFS_OPTS),) ifneq ($($(PROFILE)_UBI_OPTS),) + define Image/BuildNAND/ubifs $(call Image/Build/UbinizeImage,$(PROFILE),,ubifs,$($(PROFILE)_UBI_OPTS)) $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE)) + endef endif endif -endef -define Image/BuildKernel/Template - $(call PatchKernelLzma,$(1)) - $(call MkImageLzma,$(1)) - $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + define Image/BuildKernel/InitramfsTemplate $(call PatchKernelLzma,$(1),-initramfs) $(call MkImageLzma,$(1),-initramfs) $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs + endef endif + +define Image/BuildKernel/Template + $(call PatchKernelLzma,$(1)) + $(call MkImageLzma,$(1)) + $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage + $(Image/BuildKernel/InitramfsTemplate) endef -define Image/BuildKernelLoader/Template - $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader - $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + define Image/BuildKernelLoader/InitramfsTemplate $(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs + endef endif + +define Image/BuildKernelLoader/Template + $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader + $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux + $(Image/BuildKernelLoader/InitramfsTemplate) endef -define Image/Prepare/Kernel - $(call PatchKernelLzma,$(1)) - $(call Image/BuildLoader/Template,$(1)) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + define Image/Prepare/InitramfsTemplate $(call PatchKernelLzma,$(1),-initramfs) $(call Image/BuildLoader/Template,$(1),-initramfs) + endef endif + +define Image/Prepare/Kernel + $(call PatchKernelLzma,$(1)) + $(call Image/BuildLoader/Template,$(1)) + $(Image/Prepare/InitramfsTemplate) endef define Image/BuildKernelEVA/Template @@ -209,12 +215,6 @@ define Image/BuildKernelEVA/Template $(call MkImageEVA,$(1)) $(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k $(CP) $(KDIR)/$(1).eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.128k -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(call PatchKernelLzma,$(1),-initramfs) - $(call MkImageEVA,$(1),-initramfs) - $(CP) $(KDIR)/$(1)-initramfs.eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.64k - $(CP) $(KDIR)/$(1)-initramfs.eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.128k -endif endef |