mvebu: armada-385-rd has been renamed to armada-388-rd upstream
[openwrt/openwrt.git] / target / linux / mvebu / image / Makefile
index 443110113cbcdf7831e110a8aa74b5c926f246e6..123be9eac24c62c59fac533b50674fab160e4a65 100644 (file)
@@ -4,17 +4,13 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/image.mk
-
-LOADADDR:=0x00008000
 
 JFFS2_BLOCKSIZE = 128k
 
-KDIR_TMP:=$(KDIR)/tmp
-
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
 
-UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
+LOADADDR:=0x00008000
 
 define Image/Build/DTB
        cp $(KDIR)/zImage$(2) $(KDIR)/zImage$(2)-$(1);
@@ -22,8 +18,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
@@ -46,12 +40,11 @@ define NANDProfile
 
   define Image/Build/Profile/$(1)/Initramfs
        $(call Image/Build/DTB,$(2),-initramfs)
+       cp $(KDIR)/uImage-initramfs-$(2) $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs
   endef
 
   define Image/Build/Profile/$(1)/squashfs
        $(call Image/Build/UbinizeImage,$(2),,squashfs, -p $(3) -m $(4) $(if $(5),-s $(5)) $(if $(6),-O $(6)))
-# 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)
   endef
 
   PROFILES_LIST += $(1)
@@ -138,13 +131,41 @@ $(eval $(call NANDProfile,XP-GP,armada-xp-gp,512KiB,4096))
 
 # Boards with NAND, with subpages
 $(eval $(call NANDProfile,Mamba,armada-xp-linksys-mamba,128KiB,2048,512,2048))
+$(eval $(call NANDProfile,Caiman,armada-385-linksys-caiman,128KiB,2048,512,2048))
+$(eval $(call NANDProfile,Cobra,armada-385-linksys-cobra,128KiB,2048,512,2048))
+$(eval $(call NANDProfile,Shelby,armada-385-linksys-shelby,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))
 
 # Boards with small NOR, where UBI doesn't make sense
-$(eval $(call NORProfile,385-RD,armada-385-rd,256KiB))
+$(eval $(call NORProfile,388-RD,armada-388-rd,256KiB))
+
+###
+### Linksys
+###
+
+# Caiman: Linksys WRT1200AC
+define Image/Build/Profile/Caiman/squashfs
+       $(call Image/Build/UbinizeImage,armada-385-linksys-caiman,,squashfs, -p 128KiB -m 2048 -s 512 -O 2048)
+       ( \
+               dd if=$(KDIR)/uImage-armada-385-linksys-caiman bs=6M conv=sync; \
+               dd if=$(KDIR)/$(IMG_PREFIX)-armada-385-linksys-caiman-squashfs-ubinized.bin \
+               bs=2048 conv=sync; \
+       ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-385-linksys-caiman-squashfs-factory.img
+endef
 
+# Cobra: Linksys WRT1900ACv2
+define Image/Build/Profile/Cobra/squashfs
+       $(call Image/Build/UbinizeImage,armada-385-linksys-cobra,,squashfs, -p 128KiB -m 2048 -s 512 -O 2048)
+       ( \
+               dd if=$(KDIR)/uImage-armada-385-linksys-cobra bs=6M conv=sync; \
+               dd if=$(KDIR)/$(IMG_PREFIX)-armada-385-linksys-cobra-squashfs-ubinized.bin \
+               bs=2048 conv=sync; \
+       ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-385-linksys-cobra-squashfs-factory.img
+endef
+
+# Mamba: Linksys WRT1900AC
 define Image/Build/Profile/Mamba/squashfs
        $(call Image/Build/UbinizeImage,armada-xp-linksys-mamba,,squashfs, -p 128KiB -m 2048 -s 512 -O 2048)
        ( \
@@ -154,6 +175,31 @@ define Image/Build/Profile/Mamba/squashfs
        ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-xp-linksys-mamba-squashfs-factory.img
 endef
 
+# Shelby: Linksys WRT1900ACS
+define Image/Build/Profile/Shelby/squashfs
+       $(call Image/Build/UbinizeImage,armada-385-linksys-shelby,,squashfs, -p 128KiB -m 2048 -s 512 -O 2048)
+       ( \
+               dd if=$(KDIR)/uImage-armada-385-linksys-shelby bs=6M conv=sync; \
+               dd if=$(KDIR)/$(IMG_PREFIX)-armada-385-linksys-shelby-squashfs-ubinized.bin \
+               bs=2048 conv=sync; \
+       ) > $(BIN_DIR)/$(IMG_PREFIX)-armada-385-linksys-shelby-squashfs-factory.img
+endef
+
+###
+### Marvell
+###
+
+# Marvell Armada 385 Access Point Development board (DB-88F6820-AP)
+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
 $(eval $(call MultiProfile,Default,$(PROFILES_LIST)))
 
@@ -170,8 +216,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)