[source] lantiq: fix building NAND images in default config

LEDE Commits lede-commits at lists.infradead.org
Wed Jul 20 01:18:14 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=cc88df1a38498559bea51e8238a3724df239f7d0

commit cc88df1a38498559bea51e8238a3724df239f7d0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 19 14:55:43 2016 +0200

    lantiq: fix building NAND images in default config
    
    Remove remaining references to $(PROFILE)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 target/linux/lantiq/image/Makefile | 57 +++++++++++++++-----------------------
 1 file changed, 22 insertions(+), 35 deletions(-)

diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 5713faa..0a620fa 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -16,6 +16,14 @@ KERNEL_ENTRY = 0x80002000
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+ifeq ($(SUBTARGET),xway)
+  UBIFS_OPTS := -m 512 -e 15872 -c 1959
+  UBI_OPTS:="-m 512 -p 16KiB -s 256"
+else
+  UBIFS_OPTS := -m 2048 -e 126KiB -c 4096
+  UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+endif
+
 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
 
 define Image/BuildLoader/Template
@@ -279,8 +287,6 @@ endif
 ifeq ($(SUBTARGET),xway)
 
 # Danube
-DEVICE_BTHOMEHUBV2B_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
-DEVICE_BTHOMEHUBV2B_UBI_OPTS:="-m 512 -p 16KiB -s 256"
 
 Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call Image/BuildKernel/Template,BTHOMEHUBV2B)
 Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B)
@@ -460,10 +466,7 @@ endef
 TARGET_DEVICES += GIGASX76X
 
 
-
 # AR9
-DEVICE_BTHOMEHUBV3A_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
-DEVICE_BTHOMEHUBV3A_UBI_OPTS:="-m 512 -p 16KiB -s 256"
 
 Image/BuildKernel/Profile/BTHOMEHUBV3A=$(call Image/BuildKernel/Template,BTHOMEHUBV3A)
 Image/Build/Profile/BTHOMEHUBV3A=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV3A)
@@ -584,8 +587,6 @@ endif
 ifeq ($(SUBTARGET),xrx200)
 
 # VR9
-DEVICE_P2812HNUF1_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-DEVICE_P2812HNUF1_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
 
 Image/BuildKernel/Profile/P2812HNUF1=$(call Image/BuildKernel/Template,P2812HNUF1)
 Image/Build/Profile/P2812HNUF1=$(call Image/BuildNAND/$(1),$(1),P2812HNUF1)
@@ -596,9 +597,6 @@ define LegacyDevice/P2812HNUF1
 endef
 LEGACY_DEVICES += P2812HNUF1
 
-DEVICE_P2812HNUF3_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-DEVICE_P2812HNUF3_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
 Image/BuildKernel/Profile/P2812HNUF3=$(call Image/BuildKernel/Template,P2812HNUF3)
 Image/Build/Profile/P2812HNUF3=$(call Image/BuildNAND/$(1),$(1),P2812HNUF3)
 
@@ -617,9 +615,6 @@ endef
 TARGET_DEVICES += ARV7519RW22
 
 
-DEVICE_BTHOMEHUBV5A_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-DEVICE_BTHOMEHUBV5A_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
 Image/BuildKernel/Profile/BTHOMEHUBV5A=$(call Image/BuildKernel/Template,BTHOMEHUBV5A)
 Image/Build/Profile/BTHOMEHUBV5A=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV5A)
 
@@ -646,10 +641,6 @@ define Device/EASY80920NOR
 endef
 TARGET_DEVICES += EASY80920NOR
 
-
-DEVICE_FRITZ3370_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-DEVICE_FRITZ3370_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
-
 Image/BuildKernel/Profile/FRITZ3370=$(call Image/BuildKernelEVA/Template,FRITZ3370)
 Image/Build/Profile/FRITZ3370=$(call Image/BuildEVA/$(1),$(1),FRITZ3370)
 
@@ -729,38 +720,34 @@ TARGET_DEVICES += VGV7519BRN
 
 endif
 
-ifneq ($($(PROFILE)_UBI_OPTS),)
-  define Image/BuildNAND/squashfs
+define Image/BuildNAND/squashfs
 	$(call prepare_generic_squashfs,$(KDIR)/root.$(1))
-	$(call Image/Build/UbinizeImage,$(2),,squashfs,$($(PROFILE)_UBI_OPTS))
+	$(call Image/Build/UbinizeImage,$(2),,squashfs,$(UBI_OPTS))
 	$(call Image/Build/SysupgradeNAND,$(2),$(1),$(KDIR)/uImage-$(2))
-  endef
+endef
 
-  define Image/Build/ubifs
+define Image/Build/ubifs
 	$(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubifs
-  endef
+endef
 
-  define Image/Build/ubi
+define Image/Build/ubi
 	$(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubi
 	$(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs-overlay.ubi
-  endef
+endef
 
-  define Image/BuildEVA/ubi
+define Image/BuildEVA/ubi
 	$(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubi
 	$(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs-overlay.ubi
-  endef
+endef
 
-ifneq ($($(PROFILE)_UBIFS_OPTS),)
-  define Image/BuildNAND/ubifs
-	$(call Image/Build/UbinizeImage,$(2),,ubifs,$($(PROFILE)_UBI_OPTS))
+define Image/BuildNAND/ubifs
+	$(call Image/Build/UbinizeImage,$(2),,ubifs,$(UBI_OPTS))
 	$(call Image/Build/SysupgradeNAND,$(2),$(1),$(KDIR)/uImage-$(2))
-  endef
+endef
 
-  define Image/BuildEVA/ubifs
+define Image/BuildEVA/ubifs
 	$(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-rootfs.ubifs
-  endef
-endif
-endif
+endef
 
 define Image/Prepare/Profile
 	$(call Image/Prepare/Profile/$(1))



More information about the lede-commits mailing list