+# $(1): Profile Name
+# $(2): Sub Profiles list
+define MultiProfile
+ define Image/BuildKernel/Profile/$(1)
+ $(foreach profile, $(2),
+ $(call Image/BuildKernel/Profile/$(profile)))
+ endef
+
+ define Image/Build/Profile/$(1)/BuildSysupgrade
+ $(foreach profile, $(2),
+ $(call Image/Build/Profile/$(profile)/BuildSysupgrade,$$(1)))
+ endef
+
+ define Image/Build/Profile/$(1)/Initramfs
+ $(foreach profile, $(2),
+ $(call Image/Build/Profile/$(profile)/Initramfs))
+ endef
+
+ define Image/Build/Profile/$(1)/squashfs
+ $(foreach profile, $(2),
+ $(call Image/Build/Profile/$(profile)/squashfs))
+ endef
+endef
+
+# Boards with NAND, with subpages
+$(eval $(call NANDProfile,370-DB,armada-370-db,128KiB,2048,512))
+$(eval $(call NANDProfile,370-RD,armada-370-rd,128KiB,2048,512))
+$(eval $(call NANDProfile,Mamba,armada-xp-mamba,128KiB,2048,512))
+$(eval $(call NANDProfile,Mirabox,armada-370-mirabox,128KiB,2048,512))
+$(eval $(call NANDProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB,2048,512))
+$(eval $(call NANDProfile,XP-DB,armada-xp-db,128KiB,2048,512))
+$(eval $(call NANDProfile,XP-GP,armada-xp-gp,128KiB,2048,512))
+
+define Image/Build/Profile/Mamba/squashfs
+ $(call Image/Build/UbinizeImage,armada-xp-mamba,,squashfs, -p 128KiB -m 2048 -s 512)