mvebu: stop legacy image generation
[openwrt/svn-archive/archive.git] / target / linux / mvebu / image / Makefile
index 3512c6a3b6338fdefa546f9f09fbddabe7342b21..269ad19991a82aeccb58fa3aa1a11f5eea87cc7a 100644 (file)
@@ -22,8 +22,6 @@ define Image/Build/DTB
        $(call Image/BuildKernel/MkuImage, \
                none, $(LOADADDR), $(LOADADDR), \
                $(KDIR)/zImage$(2)-$(1), $(KDIR)/uImage$(2)-$(1))
-# The next line will be dropped, migrate your board to use a single firmware file
-       cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
 endef
 
 # $(1): Profile Name
@@ -31,6 +29,7 @@ endef
 # $(3): Erase Block Size
 # $(4): Page Size
 # $(5): Sub-Page Size (optional)
+# $(6): VID offset (optional)
 define NANDProfile
   define Image/BuildKernel/Profile/$(1)
        $(call Image/Build/DTB,$(2))
@@ -48,9 +47,7 @@ define NANDProfile
   endef
 
   define Image/Build/Profile/$(1)/squashfs
-       $(call Image/Build/UbinizeImage,$(2),,squashfs, -p $(3) -m $(4) $(if $(5),-s $(5)))
-# The next line will be dropped, migrate your board to use a single firmware file
-       cp $(KDIR)/$$(IMG_PREFIX)-$(2)-squashfs-ubinized.bin $(BIN_DIR)
+       $(call Image/Build/UbinizeImage,$(2),,squashfs, -p $(3) -m $(4) $(if $(5),-s $(5)) $(if $(6),-O $(6)))
   endef
 
   PROFILES_LIST += $(1)
@@ -136,7 +133,7 @@ $(eval $(call NANDProfile,XP-DB,armada-xp-db,512KiB,4096))
 $(eval $(call NANDProfile,XP-GP,armada-xp-gp,512KiB,4096))
 
 # Boards with NAND, with subpages
-$(eval $(call NANDProfile,Mamba,armada-xp-mamba,128KiB,2048,512))
+$(eval $(call NANDProfile,Mamba,armada-xp-linksys-mamba,128KiB,2048,512,2048))
 
 # Boards with large NOR, where we want to use UBI
 $(eval $(call UBINORProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB))
@@ -145,12 +142,21 @@ $(eval $(call UBINORProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB)
 $(eval $(call NORProfile,385-RD,armada-385-rd,256KiB))
 
 define Image/Build/Profile/Mamba/squashfs
-       $(call Image/Build/UbinizeImage,armada-xp-mamba,,squashfs, -p 128KiB -m 2048 -s 512)
+       $(call Image/Build/UbinizeImage,armada-xp-linksys-mamba,,squashfs, -p 128KiB -m 2048 -s 512 -O 2048)
        ( \
-               dd if=$(KDIR)/uImage-armada-xp-mamba bs=3072k conv=sync; \
-               dd if=$(KDIR)/$(IMG_PREFIX)-armada-xp-mamba-squashfs-ubinized.bin \
+               dd if=$(KDIR)/uImage-armada-xp-linksys-mamba bs=3072k conv=sync; \
+               dd if=$(KDIR)/$(IMG_PREFIX)-armada-xp-linksys-mamba-squashfs-ubinized.bin \
                bs=2048 conv=sync; \
-       ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-xp-mamba-squashfs-factory.img
+       ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-xp-linksys-mamba-squashfs-factory.img
+endef
+
+define Image/Build/Profile/385-DB-AP/squashfs
+       $(call Image/Build/UbinizeImage,armada-385-db-ap,,squashfs, -p 256KiB -m 4096)
+       ( \
+               dd if=$(KDIR)/uImage-armada-385-db-ap bs=8M conv=sync; \
+               dd if=$(KDIR)/$(IMG_PREFIX)-armada-385-db-ap-squashfs-ubinized.bin \
+               bs=4096 conv=sync; \
+       ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-385-db-ap-squashfs-factory.img
 endef
 
 # The Default profile should build everything
@@ -169,8 +175,6 @@ endef
 
 define Image/Build
        $(call Image/Build/$(1))
-# The next line will be dropped, migrate your board to use a single firmware file
-       dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
        $(call Image/Build/Profile/$(PROFILE)/BuildSysupgrade,$(1))
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
        $(call Image/Build/Profile/$(PROFILE)/Initramfs)