Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
247
package/boot/arm-trusted-firmware-mvebu/Makefile
Normal file
247
package/boot/arm-trusted-firmware-mvebu/Makefile
Normal file
@@ -0,0 +1,247 @@
|
||||
#
|
||||
# Copyright (C) 2019 Sartura Ltd.
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=2.9
|
||||
PKG_RELEASE:=2
|
||||
PKG_HASH:=76a66a1de0c01aeb83dfc7b72b51173fe62c6e51d6fca17cc562393117bed08b
|
||||
|
||||
PKG_MAINTAINER:=Vladimir Vid <vladimir.vid@sartura.hr>
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/trusted-firmware-a.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Trusted-Firmware-A/Default
|
||||
BUILD_TARGET:=mvebu
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
TFA_IMAGE:=flash-image.bin uart-images.tgz.bin
|
||||
UBOOT:=
|
||||
DDR_TOPOLOGY:=
|
||||
CLOCKSPRESET:=
|
||||
endef
|
||||
|
||||
|
||||
define Trusted-Firmware-A/espressobin-512mb
|
||||
NAME:=Marvell ESPRESSObin (512MB)
|
||||
DEPENDS:=+u-boot-espressobin
|
||||
BUILD_DEVICES:=globalscale_espressobin
|
||||
UBOOT:=espressobin
|
||||
DDR_TOPOLOGY:=0
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/espressobin-v3-v5-1gb-1cs
|
||||
NAME:=Marvell ESPRESSObin V3-V5 (1GB 1CS)
|
||||
DEPENDS:=+u-boot-espressobin
|
||||
BUILD_DEVICES:=globalscale_espressobin
|
||||
UBOOT:=espressobin
|
||||
DDR_TOPOLOGY:=4
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/espressobin-v3-v5-1gb-2cs
|
||||
NAME:=Marvell ESPRESSObin V3-V5 (1GB, 2CS)
|
||||
DEPENDS:=+u-boot-espressobin
|
||||
BUILD_DEVICES:=globalscale_espressobin
|
||||
UBOOT:=espressobin
|
||||
DDR_TOPOLOGY:=2
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/espressobin-v3-v5-2gb
|
||||
NAME:=Marvell ESPRESSObin V3-V5 (2GB)
|
||||
DEPENDS:=+u-boot-espressobin
|
||||
BUILD_DEVICES:=globalscale_espressobin
|
||||
UBOOT:=espressobin
|
||||
DDR_TOPOLOGY:=7
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/espressobin-v7-1gb
|
||||
NAME:=Marvell ESPRESSObin V7 (1GB)
|
||||
DEPENDS:=+u-boot-espressobin
|
||||
BUILD_DEVICES:=globalscale_espressobin-v7
|
||||
UBOOT:=espressobin
|
||||
DDR_TOPOLOGY:=5
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/espressobin-v7-2gb
|
||||
NAME:=Marvell ESPRESSObin V7 (2GB)
|
||||
DEPENDS:=+u-boot-espressobin
|
||||
BUILD_DEVICES:=globalscale_espressobin-v7
|
||||
UBOOT:=espressobin
|
||||
DDR_TOPOLOGY:=6
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/udpu
|
||||
NAME:=Methode uDPU
|
||||
DEPENDS:=+u-boot-uDPU
|
||||
BUILD_DEVICES:=methode_udpu
|
||||
UBOOT:=uDPU
|
||||
DDR_TOPOLOGY:=0
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/edpu
|
||||
NAME:=Methode eDPU
|
||||
DEPENDS:=+u-boot-eDPU
|
||||
BUILD_DEVICES:=methode_edpu
|
||||
UBOOT:=eDPU
|
||||
DDR_TOPOLOGY:=0
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
|
||||
TFA_TARGETS:= \
|
||||
espressobin-512mb \
|
||||
espressobin-v3-v5-1gb-1cs \
|
||||
espressobin-v3-v5-1gb-2cs \
|
||||
espressobin-v3-v5-2gb \
|
||||
espressobin-v7-1gb \
|
||||
espressobin-v7-2gb \
|
||||
udpu \
|
||||
edpu
|
||||
|
||||
TFA_MAKE_FLAGS += \
|
||||
CROSS_CM3=$(BUILD_DIR)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)/bin/arm-none-eabi- \
|
||||
BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
|
||||
MV_DDR_PATH=$(BUILD_DIR)/$(MV_DDR_NAME) \
|
||||
WTP=$(BUILD_DIR)/$(A3700_UTILS_NAME) \
|
||||
WTMI_IMG=$(BUILD_DIR)/$(MOX_BB_NAME)/wtmi_app.bin \
|
||||
CRYPTOPP_PATH=$(BUILD_DIR)/$(CRYPTOPP_NAME) \
|
||||
HOST_LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
|
||||
USE_COHERENT_MEM=0 \
|
||||
FIP_ALIGN=0x100 \
|
||||
DDR_TOPOLOGY=$(DDR_TOPOLOGY) \
|
||||
CLOCKSPRESET=$(CLOCKSPRESET) \
|
||||
A3700_UTILS_COMMIT_ID=$(A3700_UTILS_RELEASE) \
|
||||
MV_DDR_COMMIT_ID=$(MV_DDR_RELEASE) \
|
||||
all \
|
||||
mrvl_flash \
|
||||
mrvl_uart
|
||||
|
||||
A3700_UTILS_NAME:=a3700-utils
|
||||
A3700_UTILS_RELEASE:=a3e1c67
|
||||
A3700_UTILS_SOURCE=$(A3700_UTILS_NAME)-$(A3700_UTILS_RELEASE).tar.bz2
|
||||
|
||||
define Download/a3700-utils
|
||||
FILE:=$(A3700_UTILS_SOURCE)
|
||||
PROTO:=git
|
||||
URL:=https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell.git
|
||||
SOURCE_VERSION:=a3e1c67bb378e1d8a938e1b826cb602af83628d2
|
||||
MIRROR_HASH:=0e6b8ef6423dcb52a5e282669a8aeebc6eea2d45a7c3a2c9a2fc7a749b3275a7
|
||||
SUBDIR:=$(A3700_UTILS_NAME)
|
||||
endef
|
||||
|
||||
CRYPTOPP_NAME:=cryptopp
|
||||
CRYPTOPP_RELEASE:=4d0cad5
|
||||
CRYPTOPP_SOURCE=$(CRYPTOPP_NAME)-$(CRYPTOPP_RELEASE).tar.bz2
|
||||
|
||||
define Download/cryptopp
|
||||
FILE:=$(CRYPTOPP_SOURCE)
|
||||
PROTO:=git
|
||||
URL:=https://github.com/weidai11/cryptopp.git
|
||||
SOURCE_VERSION:=4d0cad5401d1a2c998b314bc89288c9620d3021d
|
||||
MIRROR_HASH:=6c53c8b4dfa07df0c5915a90c20f70c64d150b652cf5ac52e2eae08c5a9cc7cd
|
||||
SUBDIR:=$(CRYPTOPP_NAME)
|
||||
endef
|
||||
|
||||
MV_DDR_NAME:=mv-ddr-marvell
|
||||
MV_DDR_RELEASE:=541616b
|
||||
MV_DDR_SOURCE:=$(MV_DDR_NAME)-$(MV_DDR_RELEASE).tar.bz2
|
||||
|
||||
define Download/mv-ddr-marvell
|
||||
FILE:=$(MV_DDR_SOURCE)
|
||||
PROTO:=git
|
||||
URL:=https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git
|
||||
SOURCE_VERSION:=541616bc5d25a0167c9901546255c55973e2c0f0
|
||||
MIRROR_HASH:=9e86a986c7400ed1a72165a88150b6c494ebd87303b16314b43e5785e3f13068
|
||||
SUBDIR:=$(MV_DDR_NAME)
|
||||
endef
|
||||
|
||||
MOX_BB_NAME:=mox-boot-builder
|
||||
MOX_BB_RELEASE:=604f8f51
|
||||
MOX_BB_SOURCE:=$(MOX_BB_NAME)-$(MOX_BB_RELEASE).tar.bz2
|
||||
|
||||
define Download/mox-boot-builder
|
||||
FILE:=$(MOX_BB_SOURCE)
|
||||
PROTO:=git
|
||||
SUBMODULES:=skip
|
||||
URL:=https://gitlab.nic.cz/turris/mox-boot-builder.git
|
||||
SOURCE_VERSION:=604f8f51d97b4e59fa6d1e579101daa194d6ed2d
|
||||
MIRROR_HASH:=b09337a7dde140f57e40133b6e7b7e1eb338e7cea9b15a3af6874824462f15f7
|
||||
SUBDIR:=$(MOX_BB_NAME)
|
||||
endef
|
||||
|
||||
CM3_GCC_NAME:=arm-gnu-toolchain
|
||||
CM3_GCC_RELEASE:=12.3.rel1
|
||||
CM3_GCC_VERSION:=$(HOST_ARCH)-arm-none-eabi
|
||||
CM3_GCC_SOURCE=$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION).tar.xz
|
||||
|
||||
define Download/cm3-gcc
|
||||
FILE:=$(CM3_GCC_SOURCE)
|
||||
URL:=https://developer.arm.com/-/media/Files/downloads/gnu/$(CM3_GCC_RELEASE)/binrel
|
||||
ifeq ($(HOST_ARCH),aarch64)
|
||||
HASH:=14c0487d5753f6071d24e568881f7c7e67f80dd83165dec5164b3731394af431
|
||||
else
|
||||
HASH:=12a2815644318ebcceaf84beabb665d0924b6e79e21048452c5331a56332b309
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Clean
|
||||
rm -rf \
|
||||
$(BUILD_DIR)/$(CRYPTOPP_NAME) \
|
||||
$(BUILD_DIR)/$(A3700_UTILS_NAME) \
|
||||
$(BUILD_DIR)/$(MV_DDR_NAME) \
|
||||
$(BUILD_DIR)/$(MOX_BB_NAME) \
|
||||
$(BUILD_DIR)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
# Download sources
|
||||
$(eval $(call Download,a3700-utils))
|
||||
$(eval $(call Download,mv-ddr-marvell))
|
||||
$(eval $(call Download,mox-boot-builder))
|
||||
$(eval $(call Download,cryptopp))
|
||||
$(eval $(call Download,cm3-gcc))
|
||||
|
||||
$(call Build/Prepare/Default,)
|
||||
|
||||
$(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(CRYPTOPP_SOURCE)
|
||||
$(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(A3700_UTILS_SOURCE)
|
||||
$(call PatchDir/Default,$(BUILD_DIR)/$(A3700_UTILS_NAME),./patches-a3700-utils)
|
||||
$(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(MV_DDR_SOURCE)
|
||||
$(call PatchDir/Default,$(BUILD_DIR)/$(MV_DDR_NAME),./patches-mv-ddr-marvell)
|
||||
$(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(MOX_BB_SOURCE)
|
||||
$(call PatchDir/Default,$(BUILD_DIR)/$(MOX_BB_NAME),./patches-mox-boot-builder)
|
||||
$(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(CM3_GCC_SOURCE)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) \
|
||||
CROSS_CM3=$(BUILD_DIR)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)/bin/arm-none-eabi- \
|
||||
WTMI_VERSION=$(MOX_BB_RELEASE) \
|
||||
CRYPTOPP_PATH=$PWD/cryptopp/ \
|
||||
-C $(BUILD_DIR)/$(MOX_BB_NAME) \
|
||||
wtmi_app.bin
|
||||
$(call Build/Compile/Default)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/Trusted-Firmware-A))
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/wtmi/sys_init/Makefile b/wtmi/sys_init/Makefile
|
||||
--- a/wtmi/sys_init/Makefile
|
||||
+++ b/wtmi/sys_init/Makefile
|
||||
@@ -51,8 +51,8 @@ ECHO = @echo
|
||||
SED = @sed
|
||||
|
||||
LOCAL_VERSION_STRING ?= -armada
|
||||
-BUILD_STRING := $(shell git log -n 1 --pretty=format:"%h" && (git diff-index --quiet HEAD || echo -dirty))
|
||||
-VERSION_STRING := $(LOCAL_VERSION_STRING)-$(BUILD_STRING)
|
||||
+A3700_UTILS_COMMIT_ID ?= $(shell git log -n 1 --pretty=format:"%h" && (git diff-index --quiet HEAD || echo -dirty))
|
||||
+VERSION_STRING := $(LOCAL_VERSION_STRING)-$(A3700_UTILS_COMMIT_ID)
|
||||
|
||||
CPUOPTS = -mthumb -mcpu=cortex-m3 -mlittle-endian
|
||||
BINPATH = build
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -28,7 +28,7 @@
|
||||
@cp -f ${MV_DDR_PATH}/a3700_tool $(TIM_DDR_PATH)/ddr_tool
|
||||
|
||||
$(TIM_DDR_PATH)/ddr_tool.verstr: $(MV_DDR_PATH)/a3700_tool
|
||||
- @echo mv_ddr-$(shell sed 's/^mv_ddr-//' $(MV_DDR_PATH)/localversion 2>/dev/null || echo 'unknown')$(if $(shell git -C $(MV_DDR_PATH) rev-parse --git-dir 2>/dev/null),-g$(shell git -C $(MV_DDR_PATH) rev-parse --verify --quiet --short HEAD 2>/dev/null)$(shell git -C $(MV_DDR_PATH) diff-index --quiet HEAD || echo -d)) > $@
|
||||
+ @echo mv_ddr-$(shell sed 's/^mv_ddr-//' $(MV_DDR_PATH)/localversion 2>/dev/null || echo 'unknown')-g$(MV_DDR_COMMIT_ID) > $@
|
||||
|
||||
mv_ddr: $(TIM_DDR_PATH)/ddr_tool $(TIM_DDR_PATH)/ddr_tool.verstr
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/wtmi/Makefile b/wtmi/Makefile
|
||||
index 75754dc..3602ec3 100644
|
||||
--- a/wtmi/Makefile
|
||||
+++ b/wtmi/Makefile
|
||||
@@ -41,7 +41,6 @@ else
|
||||
LTO_FLAGS =
|
||||
endif
|
||||
|
||||
-override WTMI_VERSION = $(shell git describe --always --dirty --tags)
|
||||
ifndef WTMI_VERSION
|
||||
$(error Repository is without git tags, please do a full git clone again)
|
||||
endif
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/scripts/localversion.sh b/scripts/localversion.sh
|
||||
--- a/scripts/localversion.sh
|
||||
+++ b/scripts/localversion.sh
|
||||
@@ -103,7 +103,7 @@ MV_DDR_ROOT=$1
|
||||
MV_DDR_VER_CSRC=$2
|
||||
|
||||
# get mv_ddr git commit id
|
||||
-MV_DDR_COMMIT_ID=`git -C $MV_DDR_ROOT rev-parse --verify --quiet --short HEAD 2> /dev/null`
|
||||
+test -z "$MV_DDR_COMMIT_ID" && MV_DDR_COMMIT_ID=`git -C $MV_DDR_ROOT rev-parse --verify --quiet --short HEAD 2> /dev/null`
|
||||
|
||||
# check for uncommitted changes in mv_ddr git
|
||||
MV_DDR_DIRTY_CHK=`git -C $MV_DDR_ROOT diff-index --name-only HEAD 2> /dev/null`
|
||||
@@ -0,0 +1,21 @@
|
||||
We're not building with full fledged git checkouts here, get rid of the
|
||||
overzealous checks.
|
||||
|
||||
--- a/plat/marvell/armada/a3k/common/a3700_common.mk
|
||||
+++ b/plat/marvell/armada/a3k/common/a3700_common.mk
|
||||
@@ -78,7 +78,6 @@ ifdef WTP
|
||||
|
||||
# Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds
|
||||
$(if $(wildcard $(value WTP)/*),,$(error "'WTP=$(value WTP)' was specified, but '$(value WTP)' directory does not exist"))
|
||||
-$(if $(shell git -C $(value WTP) rev-parse --show-cdup 2>&1),$(error "'WTP=$(value WTP)' was specified, but '$(value WTP)' does not contain valid A3700-utils-marvell git repository"))
|
||||
|
||||
TBB := $(WTP)/wtptp/src/TBB_Linux/release/TBB_linux
|
||||
|
||||
@@ -164,7 +163,6 @@ $(TIMDDRTOOL): FORCE
|
||||
# Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds
|
||||
$(if $(value MV_DDR_PATH),,$(error "Platform '${PLAT}' for ddr tool requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
|
||||
$(if $(wildcard $(value MV_DDR_PATH)/*),,$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' directory does not exist"))
|
||||
- $(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
|
||||
$(Q)$(MAKE) --no-print-directory -C $(WTP) MV_DDR_PATH=$(MV_DDR_PATH) DDR_TOPOLOGY=$(DDR_TOPOLOGY) mv_ddr
|
||||
|
||||
$(BUILD_PLAT)/$(UART_IMAGE): $(BUILD_PLAT)/$(BOOT_IMAGE) $(BUILD_PLAT)/wtmi.bin $(TBB) $(TIMBUILD) $(TIMDDRTOOL)
|
||||
@@ -0,0 +1,13 @@
|
||||
Forward the host compiler flags to the compilation of the cryptopp library.
|
||||
|
||||
--- a/plat/marvell/armada/a3k/common/a3700_common.mk
|
||||
+++ b/plat/marvell/armada/a3k/common/a3700_common.mk
|
||||
@@ -149,7 +149,7 @@ $(TBB): FORCE
|
||||
$(if $(wildcard $(CRYPTOPP_LIBDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_LIB' was set to '$(CRYPTOPP_LIBDIR)', but '$(CRYPTOPP_LIBDIR)' does not exist"))
|
||||
$(if $(wildcard $(CRYPTOPP_INCDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_INCDIR' was set to '$(CRYPTOPP_INCDIR)', but '$(CRYPTOPP_INCDIR)' does not exist"))
|
||||
ifdef CRYPTOPP_PATH
|
||||
- $(Q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile
|
||||
+ $(Q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile LDFLAGS="$(HOST_LDFLAGS)" CPPFLAGS="$(HOST_CPPFLAGS)"
|
||||
endif
|
||||
$(Q)$(MAKE) --no-print-directory -C $(WTP)/wtptp/src/TBB_Linux -f TBB_linux.mak LIBDIR=$(CRYPTOPP_LIBDIR) INCDIR=$(CRYPTOPP_INCDIR)
|
||||
|
||||
Reference in New Issue
Block a user