From: Thomas Richard Date: Fri, 29 Nov 2024 10:36:46 +0000 (+0100) Subject: include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c117d7a37a74f8b4c06828a4549d500288a124a7;p=openwrt%2Fstaging%2Fstintel.git include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack Since v2.12, TF-A automatically selects the no-warn-rwx-segments option if needed. So move this hack to the package Makefiles. Signed-off-by: Thomas Richard Link: https://github.com/openwrt/openwrt/pull/17243 Signed-off-by: Hauke Mehrtens --- diff --git a/include/trusted-firmware-a.mk b/include/trusted-firmware-a.mk index e469dae984..b44cec8d07 100644 --- a/include/trusted-firmware-a.mk +++ b/include/trusted-firmware-a.mk @@ -83,7 +83,6 @@ define Build/Compile/Trusted-Firmware-A $(if $(DTC),DTC="$(DTC)") \ PLAT=$(PLAT) \ BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \ - $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ $(TFA_MAKE_FLAGS) endef diff --git a/package/boot/arm-trusted-firmware-bcm63xx/Makefile b/package/boot/arm-trusted-firmware-bcm63xx/Makefile index bcb5ce9892..385776ff59 100644 --- a/package/boot/arm-trusted-firmware-bcm63xx/Makefile +++ b/package/boot/arm-trusted-firmware-bcm63xx/Makefile @@ -33,6 +33,7 @@ TFA_TARGETS:= \ bcm4908 TFA_MAKE_FLAGS += \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ BRCM_CHIP=$(BRCM_CHIP) define Package/trusted-firmware-a/install diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile index c8988fa400..3046a01a58 100644 --- a/package/boot/arm-trusted-firmware-mediatek/Makefile +++ b/package/boot/arm-trusted-firmware-mediatek/Makefile @@ -569,6 +569,7 @@ TFA_TARGETS:= \ mt7988-spim-nand-ubi-comb TFA_MAKE_FLAGS += \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ BOOT_DEVICE=$(BOOT_DEVICE) \ USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \ $(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \ diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 047c8db55e..7dd0f11d52 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -119,6 +119,7 @@ TFA_TARGETS:= \ edpu TFA_MAKE_FLAGS += \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ 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) \ diff --git a/package/boot/arm-trusted-firmware-rockchip/Makefile b/package/boot/arm-trusted-firmware-rockchip/Makefile index 38a644efa3..9073afe365 100644 --- a/package/boot/arm-trusted-firmware-rockchip/Makefile +++ b/package/boot/arm-trusted-firmware-rockchip/Makefile @@ -37,6 +37,9 @@ TFA_TARGETS:= \ rk3328 \ rk3399 +TFA_MAKE_FLAGS+= \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") + ifeq ($(BUILD_VARIANT),rk3399) M0_GCC_NAME:=gcc-arm M0_GCC_RELEASE:=11.2-2022.02 diff --git a/package/boot/arm-trusted-firmware-stm32/Makefile b/package/boot/arm-trusted-firmware-stm32/Makefile index 75a92f15af..9d36d39b0c 100644 --- a/package/boot/arm-trusted-firmware-stm32/Makefile +++ b/package/boot/arm-trusted-firmware-stm32/Makefile @@ -41,6 +41,7 @@ endef TFA_TARGETS := stm32mp135f-dk TFA_MAKE_FLAGS += \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ ARCH=aarch32 AARCH32_SP=optee \ BL32=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-header_v2.bin \ BL32_EXTRA1=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-pager_v2.bin \ diff --git a/package/boot/arm-trusted-firmware-sunxi/Makefile b/package/boot/arm-trusted-firmware-sunxi/Makefile index 4b007f8b03..4903c98cde 100644 --- a/package/boot/arm-trusted-firmware-sunxi/Makefile +++ b/package/boot/arm-trusted-firmware-sunxi/Makefile @@ -46,6 +46,9 @@ TFA_TARGETS:= \ sunxi-h6 \ sunxi-h616 +TFA_MAKE_FLAGS+= \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") + define Package/trusted-firmware-a/install $(INSTALL_DIR) $(STAGING_DIR_IMAGE) $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31.bin $(STAGING_DIR_IMAGE)/bl31_$(BUILD_VARIANT).bin diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile index d895c06547..fef19de7dc 100644 --- a/package/boot/rkbin/Makefile +++ b/package/boot/rkbin/Makefile @@ -71,6 +71,9 @@ TFA_TARGETS:= \ rk3568-e25 \ rk3588 +TFA_MAKE_FLAGS+= \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") + ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s) TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin define Download/rk3308-tpl-rock-pi-s diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index 7304df55c7..1302e35c40 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -161,6 +161,7 @@ TFA_TARGETS := \ lx2160a-rdb-sdboot TFA_MAKE_FLAGS += \ + $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ fip pbl \ BOOT_MODE=$(BOOT_MODE) \ RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \