diff mbox

[OpenWrt-Devel,v2,4/8] mvebu: Add large NOR sub-profile implementation

Message ID 1423060626-17088-5-git-send-email-maxime.ripard@free-electrons.com
State Not Applicable
Headers show

Commit Message

Maxime Ripard Feb. 4, 2015, 2:37 p.m. UTC
While we supported only the NAND so far, some boards use a large enough NOR,
where UBI is the only reasonable option. Create a new sub-profile template with
a different set of UBI options.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 target/linux/mvebu/image/Makefile | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox

Patch

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 0b69d4b38f34..7076e876e06c 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -55,6 +55,28 @@  define NANDProfile
 endef
 
 # $(1): Profile Name
+# $(2): DTB Name
+# $(3): Erase Block Size
+define UBINORProfile
+  define Image/BuildKernel/Profile/$(1)
+	$(call Image/Build/DTB,$(2))
+    ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+	$(call Image/Build/Profile,$(1)/Initramfs)
+    endif
+  endef
+
+  define Image/Build/Profile/$(1)/Initramfs
+	$(call Image/Build/DTB,$(2),-initramfs)
+  endef
+
+  define Image/Build/Profile/$(1)/squashfs
+	$(call Image/Build/UbinizeImage,$(2),,squashfs, -p $(3) -m 1)
+  endef
+
+  PROFILES_LIST += $(1)
+endef
+
+# $(1): Profile Name
 # $(2): Sub Profiles list
 define MultiProfile
   define Image/BuildKernel/Profile/$(1)