mvebu: add large NOR sub-profile implementation
authorImre Kaloz <kaloz@openwrt.org>
Thu, 5 Feb 2015 11:24:10 +0000 (11:24 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Thu, 5 Feb 2015 11:24:10 +0000 (11:24 +0000)
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>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 44262

target/linux/mvebu/image/Makefile

index 0b69d4b38f34731714a460778c94a2d870766b90..7076e876e06c6c1f2cfa8cd3b8b4bb290004c878 100644 (file)
@@ -54,6 +54,28 @@ define NANDProfile
   PROFILES_LIST += $(1)
 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