diff mbox

[OpenWrt-Devel,5/9] mvebu: Add NOR sub-profile implementation

Message ID 1421164606-3222-6-git-send-email-maxime.ripard@free-electrons.com
State Rejected
Headers show

Commit Message

Maxime Ripard Jan. 13, 2015, 3:56 p.m. UTC
While we supported only the NAND so far, some boards use a NOR, which requires
a different set of UBI options.

Add a new subprofile type for such boards.

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

Patch

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 0b69d4b38f34..40a06c3e1443 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -55,6 +55,32 @@  define NANDProfile
 endef
 
 # $(1): Profile Name
+# $(2): DTB Name
+# $(3): Erase Block Size
+define NORProfile
+  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)/BuildSysupgrade
+	$(call Image/Build/SysupgradeNAND,$(2),$$(1),$(KDIR)/uImage-$(2))
+  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)