Initial Commit
- initial default booting image
This commit is contained in:
303
boot/arm-trusted-firmware/Config.in
Normal file
303
boot/arm-trusted-firmware/Config.in
Normal file
@@ -0,0 +1,303 @@
|
||||
menuconfig BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
bool "ARM Trusted Firmware (ATF)"
|
||||
depends on (BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A)
|
||||
help
|
||||
Enable this option if you want to build the ATF for your ARM
|
||||
based embedded device.
|
||||
|
||||
https://github.com/ARM-software/arm-trusted-firmware
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE
|
||||
choice
|
||||
prompt "ATF Version"
|
||||
help
|
||||
Select the specific ATF version you want to use
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
bool "v2.12"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_12_VERSION
|
||||
bool "latest lts-v2.12.x"
|
||||
help
|
||||
Select the latest LTS v2.12.x version available
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_10_VERSION
|
||||
bool "latest lts-v2.10.x"
|
||||
help
|
||||
Select the latest LTS v2.10.x version available
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_8_VERSION
|
||||
bool "latest lts-v2.8.x"
|
||||
help
|
||||
Select the latest LTS v2.8.x version available
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
help
|
||||
This option allows to use a specific official versions
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom ATF tarball"
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE
|
||||
string "ATF version"
|
||||
depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
|
||||
string
|
||||
default "v2.12" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
default "lts-v2.12.1" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_12_VERSION
|
||||
default "lts-v2.10.5" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_10_VERSION
|
||||
default "lts-v2.8.20" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_8_VERSION
|
||||
default "custom" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE \
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
|
||||
string "Custom repository version"
|
||||
help
|
||||
Revision to use in the typical format used by Git
|
||||
E.G. a sha id, a tag, ..
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LICENSE_FILES
|
||||
string "ATF license files" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT || \
|
||||
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
default "docs/license.rst"
|
||||
help
|
||||
A space-separated list of license files related to the ATF
|
||||
package.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
|
||||
string "ATF platform"
|
||||
help
|
||||
Target platform to build for.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD
|
||||
string "ATF target board"
|
||||
help
|
||||
Target board to build for. In many cases, this can be left
|
||||
empty.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
|
||||
string "Device Tree Source file paths"
|
||||
help
|
||||
Space-separated list of paths to device tree source files
|
||||
that will be copied to fdts/ before starting the build.
|
||||
|
||||
To use this device tree source file, the ATF configuration
|
||||
file must refer to it.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
|
||||
bool "Build FIP image"
|
||||
help
|
||||
This option enables building the FIP image (Firmware Image
|
||||
Package). This is typically the image format used by
|
||||
platforms were ATF encapsulates the second stage bootloader
|
||||
(such as U-Boot).
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
|
||||
bool "Build BL31 image"
|
||||
help
|
||||
This option enables building the BL31 image. This is
|
||||
typically used on platforms where another bootloader (e.g
|
||||
U-Boot) encapsulates ATF BL31.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT
|
||||
bool "Build BL31 U-Boot image"
|
||||
select BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
|
||||
help
|
||||
Generates a U-Boot image named atf-uboot.ub containing
|
||||
bl31.bin. This is used for example by the Xilinx version of
|
||||
U-Boot SPL to load ATF on the ZynqMP SoC.
|
||||
|
||||
choice
|
||||
prompt "BL32"
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_DEFAULT
|
||||
help
|
||||
Select BL32 stage for the trusted firmware
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_DEFAULT
|
||||
bool "Default"
|
||||
help
|
||||
With this option selected, ATF will not use any BL32 stage,
|
||||
unless if one is explicitly chosen using the SPD (for
|
||||
AArch64) or AARCH32_SP (for AArch32) variables, which can be
|
||||
passed through
|
||||
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
|
||||
bool "OP-TEE OS"
|
||||
depends on BR2_TARGET_OPTEE_OS
|
||||
help
|
||||
This option allows to embed OP-TEE OS as the BL32 part of
|
||||
the ARM Trusted Firmware boot sequence.
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "BL33"
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
|
||||
help
|
||||
Select the image to include as BL33.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
|
||||
bool "None"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
|
||||
bool "Barebox"
|
||||
depends on BR2_TARGET_BAREBOX
|
||||
help
|
||||
This option allows to embed the Barebox generic BL33 image in
|
||||
the ARM Trusted Firmware. It ensures that the Barebox package
|
||||
gets built before ATF, and that the appropriate BL33
|
||||
variable pointing to the generic bl33 image is passed
|
||||
when building ATF.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
|
||||
bool "U-Boot"
|
||||
depends on BR2_TARGET_UBOOT
|
||||
help
|
||||
This option allows to embed u-boot.bin as the BL33 part of
|
||||
the ARM Trusted Firmware. It ensures that the u-boot package
|
||||
gets built before ATF, and that the appropriate BL33
|
||||
variable pointing to u-boot.bin is passed when building ATF.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
|
||||
bool "EDK2"
|
||||
depends on BR2_TARGET_EDK2
|
||||
help
|
||||
This option allows to embed EDK2 as the BL33 part of
|
||||
the ARM Trusted Firmware. It ensures that the EDK2 package
|
||||
gets built before ATF, and that the appropriate BL33
|
||||
variable pointing to the EDK2 is passed when building ATF.
|
||||
|
||||
Do not choose this option if you intend to build ATF and EDK2
|
||||
for the 'qemu_sbsa' platform. In this case, due to the EDK2
|
||||
build system, the dependency between ATF and EDK is reversed.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LINUX_AS_BL33
|
||||
bool "Linux kernel"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
depends on (BR2_arm || BR2_armeb)
|
||||
depends on (BR2_LINUX_KERNEL_ZIMAGE || BR2_LINUX_KERNEL_APPENDED_ZIMAGE)
|
||||
help
|
||||
This option allows to embed the Linux kernel as the BL33
|
||||
part of the ARM Trusted Firmware.
|
||||
|
||||
Do not choose this option if you intend to use U-Boot or
|
||||
another second-stage bootloader. With this option, TF-A
|
||||
starts Linux directly.
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
|
||||
string "Barebox BL33 image name"
|
||||
default "*-generic-bl33.img"
|
||||
help
|
||||
Name of the Barebox BL33 image to include in ATF, it must
|
||||
have been installed to BINARIES_DIR by the Barebox package.
|
||||
|
||||
endif
|
||||
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
|
||||
string "U-Boot BL33 image name"
|
||||
default "u-boot.bin"
|
||||
help
|
||||
Name of the U-Boot BL33 image to include in ATF, it must
|
||||
have been installed to BINARIES_DIR by the U-Boot package.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW
|
||||
bool "Include NXP RCW in BL2"
|
||||
depends on BR2_PACKAGE_HOST_QORIQ_RCW
|
||||
help
|
||||
Include the NXP RCW (Reset Control Word) in BL2. See
|
||||
package/qoriq-rcw/ for more details. This is mostly useful
|
||||
on NXP LayerScape platforms.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
|
||||
string "Additional ATF make targets"
|
||||
help
|
||||
Additional targets for the ATF build
|
||||
E.G. When using the QorIQ custom ATF repository from NXP,
|
||||
the target 'pbl' can be used to build the pbl binary.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
|
||||
string "Additional ATF build variables"
|
||||
help
|
||||
Additional parameters for the ATF build
|
||||
E.G. 'DEBUG=1 LOG_LEVEL=20'
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG
|
||||
bool "Build in debug mode"
|
||||
help
|
||||
Enable this option to build ATF with DEBUG=1.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES
|
||||
string "Binary boot images"
|
||||
default "*.bin"
|
||||
help
|
||||
Names of generated image files that are installed in the
|
||||
output images/ directory.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC
|
||||
bool "Needs dtc"
|
||||
select BR2_PACKAGE_HOST_DTC
|
||||
help
|
||||
Select this option if your ATF board configuration
|
||||
requires the Device Tree compiler to be available.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
|
||||
bool "Needs arm-none-eabi toolchain"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_PACKAGE_HOST_ARM_GNU_TOOLCHAIN_SUPPORTS
|
||||
help
|
||||
Select this option if your ATF board configuration requires
|
||||
an ARM32 bare metal toolchain to be available.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
|
||||
bool "Build with SSP"
|
||||
depends on BR2_TOOLCHAIN_HAS_SSP
|
||||
depends on !BR2_SSP_NONE
|
||||
help
|
||||
Say 'y' here if you want to build ATF with SSP.
|
||||
|
||||
Your board must have SSP support in ATF: it must have an
|
||||
implementation for plat_get_stack_protector_canary().
|
||||
|
||||
If you say 'y', the SSP level will be the level selected
|
||||
by the global SSP setting.
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP_LEVEL
|
||||
string
|
||||
default "default" if BR2_SSP_REGULAR
|
||||
default "strong" if BR2_SSP_STRONG
|
||||
default "all" if BR2_SSP_ALL
|
||||
|
||||
endif
|
||||
244
boot/arm-trusted-firmware/arm-trusted-firmware.mk
Normal file
244
boot/arm-trusted-firmware/arm-trusted-firmware.mk
Normal file
@@ -0,0 +1,244 @@
|
||||
################################################################################
|
||||
#
|
||||
# arm-trusted-firmware
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION))
|
||||
ARM_TRUSTED_FIRMWARE_CPE_ID_PREFIX = cpe:2.3:o
|
||||
ARM_TRUSTED_FIRMWARE_CPE_ID_VENDOR = trustedfirmware
|
||||
ARM_TRUSTED_FIRMWARE_CPE_ID_PRODUCT = trusted_firmware-a
|
||||
ARM_TRUSTED_FIRMWARE_CPE_ID_VERSION = $(patsubst v%,%,$(patsubst lts-%,%,$(ARM_TRUSTED_FIRMWARE_VERSION)))
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL),y)
|
||||
# Handle custom ATF tarballs as specified by the configuration
|
||||
ARM_TRUSTED_FIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))
|
||||
ARM_TRUSTED_FIRMWARE_SITE = $(patsubst %/,%,$(dir $(ARM_TRUSTED_FIRMWARE_TARBALL)))
|
||||
ARM_TRUSTED_FIRMWARE_SOURCE = $(notdir $(ARM_TRUSTED_FIRMWARE_TARBALL))
|
||||
else ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
|
||||
ARM_TRUSTED_FIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL))
|
||||
ARM_TRUSTED_FIRMWARE_SITE_METHOD = git
|
||||
else
|
||||
# Handle stable official ATF versions
|
||||
ARM_TRUSTED_FIRMWARE_SITE = https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
|
||||
ARM_TRUSTED_FIRMWARE_SITE_METHOD = git
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_LICENSE = BSD-3-Clause
|
||||
ARM_TRUSTED_FIRMWARE_LICENSE_FILES = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LICENSE_FILES))
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE):$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y:y)
|
||||
BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-toolchain
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD))
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1
|
||||
ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug
|
||||
else
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug
|
||||
endif
|
||||
else
|
||||
ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),)
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release
|
||||
else
|
||||
ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release
|
||||
endif
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
$(if $(VERBOSE),V=1) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
BUILD_STRING=$(ARM_TRUSTED_FIRMWARE_VERSION) \
|
||||
$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
|
||||
PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
|
||||
TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD) \
|
||||
HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)"
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
ENABLE_STACK_PROTECTOR=$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP_LEVEL))
|
||||
else
|
||||
ARM_TRUSTED_FIRMWARE_CFLAGS += -fno-stack-protector
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PIC_PIE),y)
|
||||
ARM_TRUSTED_FIRMWARE_CFLAGS += -fno-PIE
|
||||
ARM_TRUSTED_FIRMWARE_LDFLAGS += -no-pie
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_ENV += \
|
||||
$(TARGET_MAKE_ENV) \
|
||||
CFLAGS="$(ARM_TRUSTED_FIRMWARE_CFLAGS)" \
|
||||
LDFLAGS="$(ARM_TRUSTED_FIRMWARE_LDFLAGS)"
|
||||
|
||||
ifeq ($(BR2_ARM_CPU_ARMV7A),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_ARCH_MAJOR=7
|
||||
else ifeq ($(BR2_ARM_CPU_ARMV8A),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_ARCH_MAJOR=8
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_arm),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARCH=aarch32
|
||||
else ifeq ($(BR2_aarch64),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARCH=aarch64
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += optee-os
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
BL32=$(BINARIES_DIR)/tee-header_v2.bin \
|
||||
BL32_EXTRA1=$(BINARIES_DIR)/tee-pager_v2.bin \
|
||||
BL32_EXTRA2=$(BINARIES_DIR)/tee-pageable_v2.bin
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SPD=opteed
|
||||
endif
|
||||
ifeq ($(BR2_arm),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee
|
||||
endif
|
||||
endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33),y)
|
||||
ARM_TRUSTED_FIRMWARE_BAREBOX_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE))
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_BAREBOX_BIN)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += barebox
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2
|
||||
# Since the flash device name vary between platforms, we use the variable
|
||||
# provided by the EDK2 package for this. Using this variable here is OK
|
||||
# as it will expand after all dependencies are resolved, inside _BUILD_CMDS.
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
|
||||
BL33=$(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_EDK2_FD_NAME).fd)
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y)
|
||||
ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE))
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LINUX_AS_BL33),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/zImage
|
||||
ifeq ($(ARM_TRUSTED_FIRMWARE_PLATFORM),stm32mp1)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33_CFG=$(BINARIES_DIR)/$(LINUX_DTBS)
|
||||
endif
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += linux
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_VEXPRESS_FIRMWARE),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_BINARIES_MARVELL),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += binaries-marvell
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_MV_DDR_MARVELL),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += MV_DDR_PATH=$(MV_DDR_MARVELL_DIR)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += mv-ddr-marvell
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW),y)
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-qoriq-rcw
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += pbl
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += RCW=$(BINARIES_DIR)/PBL.bin
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31),y)
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += bl31
|
||||
# Avoid BL31 environment variable from polluting the build
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL31=
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT),y)
|
||||
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD
|
||||
# Get the entry point address from the elf.
|
||||
BASE_ADDR=$$($(TARGET_READELF) -h $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf | \
|
||||
sed -r '/^ Entry point address:\s*(.*)/!d; s//\1/') && \
|
||||
$(MKIMAGE) \
|
||||
-A $(MKIMAGE_ARCH) -O arm-trusted-firmware -C none \
|
||||
-a $${BASE_ADDR} -e $${BASE_ADDR} \
|
||||
-d $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31.bin \
|
||||
$(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub
|
||||
endef
|
||||
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL
|
||||
$(INSTALL) -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub \
|
||||
$(BINARIES_DIR)/atf-uboot.ub
|
||||
endef
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += RESET_TO_BL31=1
|
||||
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-uboot-tools
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)
|
||||
define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF
|
||||
$(INSTALL) -D -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf \
|
||||
$(BINARIES_DIR)/bl31.elf
|
||||
endef
|
||||
endif
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += \
|
||||
$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS))
|
||||
|
||||
ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH))
|
||||
|
||||
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
|
||||
$(if $(ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH),
|
||||
cp -f $(ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH) $(@D)/fdts/
|
||||
)
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
|
||||
$(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS)
|
||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD)
|
||||
endef
|
||||
|
||||
define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS
|
||||
$(foreach f,$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES)), \
|
||||
cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/$(f) $(BINARIES_DIR)/
|
||||
)
|
||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL)
|
||||
$(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF)
|
||||
endef
|
||||
|
||||
# Configuration check
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR_BUILDING),yy)
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION)),)
|
||||
$(error No tarball location specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
|
||||
ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)),)
|
||||
$(error No repository specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
$(eval $(generic-package))
|
||||
@@ -0,0 +1,34 @@
|
||||
From 70be9272d8d8b8e205fc60b41704d470a6798e36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 752ab419d2..78de01686c 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 62af6f1f2e9406d761ace03025f6bf22a0670578b1d0b76092dc1db455746dad arm-trusted-firmware-lts-v2.10.5-git4.tar.gz
|
||||
sha256 130d0c6e5159fa454b1e969fd281fa1d388819aefb203f65dd282544b5ab7ba9 docs/license.rst
|
||||
@@ -0,0 +1,34 @@
|
||||
From 83487cb4f74aa25cc3a03cbfa784d7b410cc3d07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 5ab6123904..654f291732 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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 -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 3ab7e90d6fc3364815ad7770d7aa7af9cfd68edde43da7123f5f38f80e034c44 arm-trusted-firmware-lts-v2.12.1-git4.tar.gz
|
||||
sha256 b2c79635797bafcde84c6edadadde290b9d5e05deb3ea16a847210fd2ca83669 docs/license.rst
|
||||
@@ -0,0 +1,77 @@
|
||||
From aa57ce632c629fe72ff417e261e0f5bfd8db6bab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 4 Jul 2023 16:14:02 +0200
|
||||
Subject: [PATCH] build(tools): avoid unnecessary link
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In their respective makefiles, cert_create, encrypt_fw and fiptool
|
||||
depend on the --openssl phony target as a prerequisite. This forces
|
||||
those tools to be re-linked each time.
|
||||
|
||||
Move the dependencies on the --openssl target from the tools to their
|
||||
makefiles all targets, to avoid unnecessary linking while preserving the
|
||||
OpenSSL version printing done in the --openssl targets when in debug.
|
||||
|
||||
Fixes: cf2dd17ddda2 ("refactor(security): add OpenSSL 1.x compatibility")
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
|
||||
Upstream: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=aa57ce632c629fe72ff417e261e0f5bfd8db6bab
|
||||
---
|
||||
tools/cert_create/Makefile | 4 ++--
|
||||
tools/encrypt_fw/Makefile | 4 ++--
|
||||
tools/fiptool/Makefile | 4 ++--
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile
|
||||
index 042e844626..b911d19d2b 100644
|
||||
--- a/tools/cert_create/Makefile
|
||||
+++ b/tools/cert_create/Makefile
|
||||
@@ -85,9 +85,9 @@ HOSTCC ?= gcc
|
||||
|
||||
.PHONY: all clean realclean --openssl
|
||||
|
||||
-all: ${BINARY}
|
||||
+all: --openssl ${BINARY}
|
||||
|
||||
-${BINARY}: --openssl ${OBJECTS} Makefile
|
||||
+${BINARY}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
|
||||
const char platform_msg[] = "${PLAT_MSG}";' | \
|
||||
diff --git a/tools/encrypt_fw/Makefile b/tools/encrypt_fw/Makefile
|
||||
index 2939b142be..924e5febab 100644
|
||||
--- a/tools/encrypt_fw/Makefile
|
||||
+++ b/tools/encrypt_fw/Makefile
|
||||
@@ -65,9 +65,9 @@ HOSTCC ?= gcc
|
||||
|
||||
.PHONY: all clean realclean --openssl
|
||||
|
||||
-all: ${BINARY}
|
||||
+all: --openssl ${BINARY}
|
||||
|
||||
-${BINARY}: --openssl ${OBJECTS} Makefile
|
||||
+${BINARY}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
|
||||
${HOSTCC} -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o
|
||||
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
|
||||
index 2ebee33931..4bdebd9235 100644
|
||||
--- a/tools/fiptool/Makefile
|
||||
+++ b/tools/fiptool/Makefile
|
||||
@@ -68,9 +68,9 @@ DEPS := $(patsubst %.o,%.d,$(OBJECTS))
|
||||
|
||||
.PHONY: all clean distclean --openssl
|
||||
|
||||
-all: ${PROJECT}
|
||||
+all: --openssl ${PROJECT}
|
||||
|
||||
-${PROJECT}: --openssl ${OBJECTS} Makefile
|
||||
+${PROJECT}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
|
||||
@${ECHO_BLANK_LINE}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 26073dca5982e86b45d6ff82176418f8624315f5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 160e98f12a..569f5f1552 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 a90617cc2c1791c98d36b9e3d9a7f3f77029897e00c4279ff4ef559b769e9d7b arm-trusted-firmware-lts-v2.8.20-git4.tar.gz
|
||||
sha256 130d0c6e5159fa454b1e969fd281fa1d388819aefb203f65dd282544b5ab7ba9 docs/license.rst
|
||||
@@ -0,0 +1,34 @@
|
||||
From ea879d9dcb7f22b9a0921613bf2f530e2787d0db Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 752ab419d2..78de01686c 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From f0f29a693064915f5df7ab9369f93353c6c692cc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 752ab419d2..78de01686c 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From afa038938b5bc54703a10f9103e6b85e07fd562f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 5ab6123904..654f291732 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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 -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 06b35a3596b8417bf66f7bfdd7acd181bcb53fc36dc13216227b5cae154e0219 arm-trusted-firmware-v2.12-git4.tar.gz
|
||||
sha256 b2c79635797bafcde84c6edadadde290b9d5e05deb3ea16a847210fd2ca83669 docs/license.rst
|
||||
@@ -0,0 +1,59 @@
|
||||
From 5e1beb793c06352e87c46eca1144ff1fe8555103 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Date: Mon, 10 Jul 2023 10:43:03 +0200
|
||||
Subject: [PATCH] [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 721246d51..5893cf422 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -297,11 +297,16 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
TF_LDFLAGS += --remove --info=unused,unusedsymbols
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
endif
|
||||
TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From e94c6513bad0a2cdb2a2266129c06e5a55826d74 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 160e98f12a..569f5f1552 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From bbb06a551951a96b738f1aac70f8c2fc44b39e50 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 160e98f12a..569f5f1552 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
From aa57ce632c629fe72ff417e261e0f5bfd8db6bab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 4 Jul 2023 16:14:02 +0200
|
||||
Subject: [PATCH] build(tools): avoid unnecessary link
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In their respective makefiles, cert_create, encrypt_fw and fiptool
|
||||
depend on the --openssl phony target as a prerequisite. This forces
|
||||
those tools to be re-linked each time.
|
||||
|
||||
Move the dependencies on the --openssl target from the tools to their
|
||||
makefiles all targets, to avoid unnecessary linking while preserving the
|
||||
OpenSSL version printing done in the --openssl targets when in debug.
|
||||
|
||||
Fixes: cf2dd17ddda2 ("refactor(security): add OpenSSL 1.x compatibility")
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
|
||||
Upstream: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=aa57ce632c629fe72ff417e261e0f5bfd8db6bab
|
||||
---
|
||||
tools/cert_create/Makefile | 4 ++--
|
||||
tools/encrypt_fw/Makefile | 4 ++--
|
||||
tools/fiptool/Makefile | 4 ++--
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile
|
||||
index 042e844626..b911d19d2b 100644
|
||||
--- a/tools/cert_create/Makefile
|
||||
+++ b/tools/cert_create/Makefile
|
||||
@@ -85,9 +85,9 @@ HOSTCC ?= gcc
|
||||
|
||||
.PHONY: all clean realclean --openssl
|
||||
|
||||
-all: ${BINARY}
|
||||
+all: --openssl ${BINARY}
|
||||
|
||||
-${BINARY}: --openssl ${OBJECTS} Makefile
|
||||
+${BINARY}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
|
||||
const char platform_msg[] = "${PLAT_MSG}";' | \
|
||||
diff --git a/tools/encrypt_fw/Makefile b/tools/encrypt_fw/Makefile
|
||||
index 2939b142be..924e5febab 100644
|
||||
--- a/tools/encrypt_fw/Makefile
|
||||
+++ b/tools/encrypt_fw/Makefile
|
||||
@@ -65,9 +65,9 @@ HOSTCC ?= gcc
|
||||
|
||||
.PHONY: all clean realclean --openssl
|
||||
|
||||
-all: ${BINARY}
|
||||
+all: --openssl ${BINARY}
|
||||
|
||||
-${BINARY}: --openssl ${OBJECTS} Makefile
|
||||
+${BINARY}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
|
||||
${HOSTCC} -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o
|
||||
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
|
||||
index 2ebee33931..4bdebd9235 100644
|
||||
--- a/tools/fiptool/Makefile
|
||||
+++ b/tools/fiptool/Makefile
|
||||
@@ -68,9 +68,9 @@ DEPS := $(patsubst %.o,%.d,$(OBJECTS))
|
||||
|
||||
.PHONY: all clean distclean --openssl
|
||||
|
||||
-all: ${PROJECT}
|
||||
+all: --openssl ${PROJECT}
|
||||
|
||||
-${PROJECT}: --openssl ${OBJECTS} Makefile
|
||||
+${PROJECT}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
|
||||
@${ECHO_BLANK_LINE}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From e349eb61b8b5f058ad9d54fc063b66ca26cf5a5b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 160e98f12a..569f5f1552 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
From aa57ce632c629fe72ff417e261e0f5bfd8db6bab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 4 Jul 2023 16:14:02 +0200
|
||||
Subject: [PATCH] build(tools): avoid unnecessary link
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In their respective makefiles, cert_create, encrypt_fw and fiptool
|
||||
depend on the --openssl phony target as a prerequisite. This forces
|
||||
those tools to be re-linked each time.
|
||||
|
||||
Move the dependencies on the --openssl target from the tools to their
|
||||
makefiles all targets, to avoid unnecessary linking while preserving the
|
||||
OpenSSL version printing done in the --openssl targets when in debug.
|
||||
|
||||
Fixes: cf2dd17ddda2 ("refactor(security): add OpenSSL 1.x compatibility")
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
|
||||
Upstream: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=aa57ce632c629fe72ff417e261e0f5bfd8db6bab
|
||||
---
|
||||
tools/cert_create/Makefile | 4 ++--
|
||||
tools/encrypt_fw/Makefile | 4 ++--
|
||||
tools/fiptool/Makefile | 4 ++--
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile
|
||||
index 042e844626..b911d19d2b 100644
|
||||
--- a/tools/cert_create/Makefile
|
||||
+++ b/tools/cert_create/Makefile
|
||||
@@ -85,9 +85,9 @@ HOSTCC ?= gcc
|
||||
|
||||
.PHONY: all clean realclean --openssl
|
||||
|
||||
-all: ${BINARY}
|
||||
+all: --openssl ${BINARY}
|
||||
|
||||
-${BINARY}: --openssl ${OBJECTS} Makefile
|
||||
+${BINARY}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
|
||||
const char platform_msg[] = "${PLAT_MSG}";' | \
|
||||
diff --git a/tools/encrypt_fw/Makefile b/tools/encrypt_fw/Makefile
|
||||
index 2939b142be..924e5febab 100644
|
||||
--- a/tools/encrypt_fw/Makefile
|
||||
+++ b/tools/encrypt_fw/Makefile
|
||||
@@ -65,9 +65,9 @@ HOSTCC ?= gcc
|
||||
|
||||
.PHONY: all clean realclean --openssl
|
||||
|
||||
-all: ${BINARY}
|
||||
+all: --openssl ${BINARY}
|
||||
|
||||
-${BINARY}: --openssl ${OBJECTS} Makefile
|
||||
+${BINARY}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
|
||||
${HOSTCC} -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o
|
||||
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
|
||||
index 2ebee33931..4bdebd9235 100644
|
||||
--- a/tools/fiptool/Makefile
|
||||
+++ b/tools/fiptool/Makefile
|
||||
@@ -68,9 +68,9 @@ DEPS := $(patsubst %.o,%.d,$(OBJECTS))
|
||||
|
||||
.PHONY: all clean distclean --openssl
|
||||
|
||||
-all: ${PROJECT}
|
||||
+all: --openssl ${PROJECT}
|
||||
|
||||
-${PROJECT}: --openssl ${OBJECTS} Makefile
|
||||
+${PROJECT}: ${OBJECTS} Makefile
|
||||
@echo " HOSTLD $@"
|
||||
${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
|
||||
@${ECHO_BLANK_LINE}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 51d35780d42b53c5215019c9d6ffe28ce768e886 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
|
||||
Date: Tue, 8 Apr 2025 13:27:53 +0200
|
||||
Subject: [PATCH] build(plat/marvell): allow building with non-git
|
||||
mv-ddr-marvell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the mv-ddr-marvell folder is not a git tree the build fails
|
||||
complaining that it "does not contain valid mv-ddr-marvell git
|
||||
repository".
|
||||
|
||||
Remove this check to allow building in Buildroot.
|
||||
|
||||
Upstream: Not applicable. Buildroot specific.
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
|
||||
---
|
||||
plat/marvell/armada/a8k/common/ble/ble.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
index 752ab419d2..78de01686c 100644
|
||||
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
|
||||
@@ -31,5 +31,4 @@ $(MV_DDR_LIB): 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 BLE 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"))
|
||||
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user