From 47adb7836def9c854ac174904cb324870105150e Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Sun, 9 Jul 2017 07:45:56 +0200 Subject: [PATCH] mvebu: Split into non vfpv3+neon and capable targets The Armada XP and 37x-series only supports vfpv3-d16 (16 64-bit FPU registers) while the newer 38x-series supports vfpv3 (32 64-bit FPU registers) and neon. We already have other targets that matches the 38x-series so this doesn't increase the variants of compiled binaries. Source: https://lists.linaro.org/pipermail/linaro-toolchain/2016-July/005825.html http://natisbad.org/NAS2/refs/Marvell_ARMADA_370_SoC.pdf http://ulli-kroll.de/Downloads/NAS326/A38x-Functional-Spec-PU0A.pdf Signed-off-by: Daniel Engberg --- target/linux/mvebu/Makefile | 10 +- .../profiles/000-Default.mk | 0 target/linux/mvebu/armada_37x_xp/target.mk | 18 +++ target/linux/mvebu/armada_38x/target.mk | 20 +++ target/linux/mvebu/image/Makefile | 136 +++++++++--------- 5 files changed, 116 insertions(+), 68 deletions(-) rename target/linux/mvebu/{ => armada_37x_xp}/profiles/000-Default.mk (100%) create mode 100644 target/linux/mvebu/armada_37x_xp/target.mk create mode 100644 target/linux/mvebu/armada_38x/target.mk diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile index a07aa7cf2d24..60ca2f9cff13 100644 --- a/target/linux/mvebu/Makefile +++ b/target/linux/mvebu/Makefile @@ -6,16 +6,18 @@ # include $(TOPDIR)/rules.mk -ARCH:=arm BOARD:=mvebu -BOARDNAME:=Marvell Armada 37x/38x/XP +BOARDNAME:=Marvell Armada FEATURES:=fpu usb pci pcie gpio nand squashfs -CPU_TYPE:=cortex-a9 -CPU_SUBTYPE:=vfpv3 +SUBTARGETS:=armada_37x_xp armada_38x MAINTAINER:=Imre Kaloz KERNEL_PATCHVER:=4.9 +define Target/Description + Build firmware images for Marvell ARM SoC +endef + include $(INCLUDE_DIR)/target.mk KERNELNAME:=zImage dtbs diff --git a/target/linux/mvebu/profiles/000-Default.mk b/target/linux/mvebu/armada_37x_xp/profiles/000-Default.mk similarity index 100% rename from target/linux/mvebu/profiles/000-Default.mk rename to target/linux/mvebu/armada_37x_xp/profiles/000-Default.mk diff --git a/target/linux/mvebu/armada_37x_xp/target.mk b/target/linux/mvebu/armada_37x_xp/target.mk new file mode 100644 index 000000000000..33475f029fef --- /dev/null +++ b/target/linux/mvebu/armada_37x_xp/target.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2012-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +ARCH:=arm +SUBTARGET:=armada_37x_xp +BOARDNAME:=Marvell Armada 37x/XP +FEATURES:=fpu usb pci pcie gpio nand squashfs +CPU_TYPE:=cortex-a9 +CPU_SUBTYPE:=vfpv3 + +define Target/Description + Build firmware for Marvell Armada 37x and XP SoC. +endef diff --git a/target/linux/mvebu/armada_38x/target.mk b/target/linux/mvebu/armada_38x/target.mk new file mode 100644 index 000000000000..c47f859d7632 --- /dev/null +++ b/target/linux/mvebu/armada_38x/target.mk @@ -0,0 +1,20 @@ +# +# Copyright (C) 2012-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +ARCH:=arm +SUBTARGET:=armada_38x +BOARDNAME:=Marvell Armada 38x +FEATURES:=fpu usb pci pcie gpio nand squashfs +CPU_TYPE:=cortex-a9 +CPU_SUBTYPE:=neon + +define Target/Description + Build firmware for Marvell Armada 38x. +endef + + diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index b5014161c624..2ac1b7a6b759 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -90,17 +90,39 @@ define Device/NAND-512K PAGESIZE := 4096 endef +define Device/marvell-nand + $(Device/NAND-512K) + DEVICE_TITLE := Marvell Armada $(1) +endef + define Device/linksys DEVICE_TITLE := Linksys $(1) DEVICE_PACKAGES := kmod-mwlwifi wpad-mini swconfig endef +ifeq ($(SUBTARGET),armada_38x) + define Device/armada-385-linksys $(Device/NAND-128K) $(Device/UBI-factory) KERNEL_SIZE := 6144k endef +define Device/armada-385-db-ap + $(Device/NAND-256K) + $(Device/UBI-factory) + KERNEL_SIZE := 8192k + DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP) +endef +TARGET_DEVICES += armada-385-db-ap + +define Device/armada-388-rd + DEVICE_TITLE := Marvell Armada 388 RD (RD-88F6820-AP) + IMAGES := firmware.bin + IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs +endef +TARGET_DEVICES += armada-388-rd + define Device/linksys-wrt1200ac $(call Device/linksys,WRT1200AC (Caiman)) $(Device/armada-385-linksys) @@ -115,14 +137,6 @@ define Device/linksys-wrt1900acv2 endef TARGET_DEVICES += linksys-wrt1900acv2 -define Device/linksys-wrt3200acm - $(call Device/linksys,WRT3200ACM (Rango)) - $(Device/armada-385-linksys) - DEVICE_DTS := armada-385-linksys-rango - DEVICE_PACKAGES += kmod-mwifiex-sdio -endef -TARGET_DEVICES += linksys-wrt3200acm - define Device/linksys-wrt1900acs $(call Device/linksys,WRT1900ACS (Shelby)) $(Device/armada-385-linksys) @@ -130,63 +144,13 @@ define Device/linksys-wrt1900acs endef TARGET_DEVICES += linksys-wrt1900acs -define Device/linksys-wrt1900ac - $(call Device/linksys,WRT1900AC (Mamba)) - DEVICE_DTS := armada-xp-linksys-mamba - $(Device/NAND-128K) - $(Device/UBI-factory) - KERNEL_SIZE := 3072k -endef -TARGET_DEVICES += linksys-wrt1900ac - -define Device/openblocks-ax3-4 - $(Device/UBI-factory) - DEVICE_DTS := armada-xp-openblocks-ax3-4 - SUPPORTED_DEVICES := $(1) - BLOCKSIZE := 128k - PAGESIZE := 1 - IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi - DEVICE_TITLE := Plat'Home OpenBlocks AX3 -endef -TARGET_DEVICES += openblocks-ax3-4 - -define Device/armada-385-db-ap - $(Device/NAND-256K) - $(Device/UBI-factory) - KERNEL_SIZE := 8192k - DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP) -endef -TARGET_DEVICES += armada-385-db-ap - -define Device/marvell-nand - $(Device/NAND-512K) - DEVICE_TITLE := Marvell Armada $(1) -endef - -Device/armada-370-db = $(call Device/marvell-nand,370 DB (DB-88F6710-BP-DDR3)) -Device/armada-370-rd = $(call Device/marvell-nand,370 RD (RD-88F6710-A1)) -Device/armada-xp-db = $(call Device/marvell-nand,XP DB (DB-78460-BP)) -Device/armada-xp-gp = $(call Device/marvell-nand,XP GP (DB-MV784MP-GP)) -TARGET_DEVICES += armada-370-db armada-370-rd armada-xp-db armada-xp-gp - -define Device/armada-388-rd - DEVICE_TITLE := Marvell Armada 388 RD (RD-88F6820-AP) - IMAGES := firmware.bin - IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs -endef -TARGET_DEVICES += armada-388-rd - -define Device/armada-388-clearfog-pro - KERNEL_INSTALL := 1 - KERNEL := kernel-bin - DEVICE_TITLE := SolidRun ClearFog Pro - DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 - IMAGES := sdcard.img.gz - IMAGE/sdcard.img.gz := boot-scr-cfpro | boot-img | sdcard-img | gzip | append-metadata - IMAGE_NAME = $$(IMAGE_PREFIX)-$$(2) - DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base +define Device/linksys-wrt3200acm + $(call Device/linksys,WRT3200ACM (Rango)) + $(Device/armada-385-linksys) + DEVICE_DTS := armada-385-linksys-rango + DEVICE_PACKAGES += kmod-mwifiex-sdio endef -TARGET_DEVICES += armada-388-clearfog-pro +TARGET_DEVICES += linksys-wrt3200acm define Device/armada-388-clearfog-base KERNEL_INSTALL := 1 @@ -204,6 +168,28 @@ define Device/armada-388-clearfog-base endef TARGET_DEVICES += armada-388-clearfog-base +define Device/armada-388-clearfog-pro + KERNEL_INSTALL := 1 + KERNEL := kernel-bin + DEVICE_TITLE := SolidRun ClearFog Pro + DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := boot-scr-cfpro | boot-img | sdcard-img | gzip | append-metadata + IMAGE_NAME = $$(IMAGE_PREFIX)-$$(2) + DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base +endef +TARGET_DEVICES += armada-388-clearfog-pro + +endif + +ifeq ($(SUBTARGET),armada_37x_xp) + +Device/armada-370-db = $(call Device/marvell-nand,370 DB (DB-88F6710-BP-DDR3)) +Device/armada-370-rd = $(call Device/marvell-nand,370 RD (RD-88F6710-A1)) +Device/armada-xp-db = $(call Device/marvell-nand,XP DB (DB-78460-BP)) +Device/armada-xp-gp = $(call Device/marvell-nand,XP GP (DB-MV784MP-GP)) +TARGET_DEVICES += armada-370-db armada-370-rd armada-xp-db armada-xp-gp + define Device/globalscale-mirabox $(Device/NAND-512K) DEVICE_DTS := armada-370-mirabox @@ -212,4 +198,26 @@ define Device/globalscale-mirabox endef TARGET_DEVICES += globalscale-mirabox +define Device/linksys-wrt1900ac + $(call Device/linksys,WRT1900AC (Mamba)) + DEVICE_DTS := armada-xp-linksys-mamba + $(Device/NAND-128K) + $(Device/UBI-factory) + KERNEL_SIZE := 3072k +endef +TARGET_DEVICES += linksys-wrt1900ac + +define Device/openblocks-ax3-4 + $(Device/UBI-factory) + DEVICE_DTS := armada-xp-openblocks-ax3-4 + SUPPORTED_DEVICES := $(1) + BLOCKSIZE := 128k + PAGESIZE := 1 + IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi + DEVICE_TITLE := Plat'Home OpenBlocks AX3 +endef +TARGET_DEVICES += openblocks-ax3-4 + +endif + $(eval $(call BuildImage))