The page size and related NAND options are completely board specific. It makes
little sense to define such options in the global image Makefile.

Move these informations to the profiles, where it is more fit.

Signed-off-by: Maxime Ripard <maxime.rip...@free-electrons.com>
---
 target/linux/mvebu/image/Makefile             | 5 +----
 target/linux/mvebu/profiles/100-Generic.mk    | 3 +++
 target/linux/mvebu/profiles/200-Evalboards.mk | 3 +++
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/target/linux/mvebu/image/Makefile 
b/target/linux/mvebu/image/Makefile
index 0de7328515ca..6bd4091b86bd 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -14,9 +14,6 @@ LOADADDR:=0x00008000
 
 JFFS2_BLOCKSIZE = 128k
 
-UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
-UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
-
 KDIR_TMP:=$(KDIR)/tmp
 
 
@@ -43,7 +40,7 @@ endef
 
 define Image/Build/squashfs
        $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
-       $(foreach dtb,$(TARGET_DTBS),$(call 
Image/Build/UbinizeImage,$(dtb),,squashfs,$(UBI_OPTS));)
+       $(foreach dtb,$(TARGET_DTBS),$(call 
Image/Build/UbinizeImage,$(dtb),,squashfs,$($(call 
toupper,$(PROFILE))_UBI_OPTS));)
        ( \
                dd if=$(KDIR)/uImage-armada-xp-mamba bs=3072k conv=sync; \
                dd 
if=$(BIN_DIR)/$(IMG_PREFIX)-armada-xp-mamba-squashfs-ubinized.bin \
diff --git a/target/linux/mvebu/profiles/100-Generic.mk 
b/target/linux/mvebu/profiles/100-Generic.mk
index a6923118d3ad..0940643f7ace 100644
--- a/target/linux/mvebu/profiles/100-Generic.mk
+++ b/target/linux/mvebu/profiles/100-Generic.mk
@@ -5,6 +5,9 @@
 # See /LICENSE for more information.
 #
 
+GENERIC_UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
+GENERIC_UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
+
 define Profile/Generic
   NAME:=Generic (default)
   PACKAGES:= \
diff --git a/target/linux/mvebu/profiles/200-Evalboards.mk 
b/target/linux/mvebu/profiles/200-Evalboards.mk
index 52d0b9803db2..f06f94911c62 100644
--- a/target/linux/mvebu/profiles/200-Evalboards.mk
+++ b/target/linux/mvebu/profiles/200-Evalboards.mk
@@ -5,6 +5,9 @@
 # See /LICENSE for more information.
 #
 
+EVALBOARDS_UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
+EVALBOARDS_UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
+
 define Profile/Evalboards
   NAME:=Evaluation / Development boards
   PACKAGES:= \
-- 
2.1.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to