[OpenWrt-Devel] [PATCH v2 5/8] mvebu: Add a subprofile for boards based on a small NOR
Maxime Ripard
maxime.ripard at free-electrons.com
Wed Feb 4 09:37:03 EST 2015
Some boards only come with a small NOR on it, where UBI isn't a good solution
because of its overhead.
Add a new subprofile for such boards, that rely on the mtd split framework
instead.
Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
target/linux/mvebu/image/Makefile | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 7076e876e06c..a8fc4de134f8 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -77,6 +77,31 @@ define UBINORProfile
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)/Initramfs
+ $(call Image/Build/DTB,$(2),-initramfs)
+ endef
+
+ define Image/Build/Profile/$(1)/squashfs
+ ( \
+ dd if=$(KDIR)/uImage-$(2) bs=$(3) conv=sync; \
+ dd if=$(KDIR)/root.squashfs bs=$(3) conv=sync; \
+ ) > $$(BIN_DIR)/$$(IMG_PREFIX)-$(2)-squashfs-firmware.bin
+ endef
+
+ PROFILES_LIST += $(1)
+endef
+
+# $(1): Profile Name
# $(2): Sub Profiles list
define MultiProfile
define Image/BuildKernel/Profile/$(1)
--
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list