From e6476e051bc6c113a8ece23ec4d790e27e2ac704 Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Sun, 24 Sep 2023 09:10:17 +0000 Subject: [PATCH] clang3 Signed-off-by: luofeng14 --- 0001-1.patch | 286 ++++++++++++++++++++++++++++++++++++++ arm-trusted-firmware.spec | 2 + 2 files changed, 288 insertions(+) create mode 100644 0001-1.patch diff --git a/0001-1.patch b/0001-1.patch new file mode 100644 index 0000000..2865794 --- /dev/null +++ b/0001-1.patch @@ -0,0 +1,286 @@ +From cbbe5418607d3555608eae25e97be84546197d93 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Sun, 24 Sep 2023 16:55:32 +0800 +Subject: [PATCH] 1 + +--- + Makefile | 19 +++++++++++++++++-- + .../marvell/armada/a3k/common/a3700_common.mk | 2 ++ + plat/marvell/armada/a8k/common/a8k_common.mk | 1 + + plat/marvell/armada/common/marvell_common.mk | 1 + + plat/nxp/common/fip_handler/fuse_fip/fuse.mk | 1 + + plat/nxp/soc-lx2160a/ddr_fip.mk | 2 ++ + plat/rpi/rpi3/platform.mk | 1 + + plat/st/common/common_rules.mk | 1 + + tools/amlogic/Makefile | 1 + + tools/fiptool/Makefile | 1 + + tools/marvell/doimage/Makefile | 1 + + tools/nxp/create_pbl/Makefile | 2 ++ + tools/sptool/Makefile | 1 + + tools/stm32image/Makefile | 1 + + 14 files changed, 33 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2c5748f..4f8343e 100644 +--- a/Makefile ++++ b/Makefile +@@ -186,10 +186,10 @@ endif + # Toolchain + ################################################################################ + +-HOSTCC := gcc ++HOSTCC := ${CC} + export HOSTCC + +-CC := ${CROSS_COMPILE}gcc ++# CC := ${CROSS_COMPILE}gcc + CPP := ${CROSS_COMPILE}cpp + AS := ${CROSS_COMPILE}gcc + AR := ${CROSS_COMPILE}ar +@@ -206,6 +206,15 @@ ifneq ($(strip $(wildcard ${LD}.bfd) \ + LINKER := ${LINKER}.bfd + endif + ++PATH_TO_FILE := /usr/local/lib64/libssp.so ++ifneq ("$(wildcard $(PATH_TO_FILE))","") ++$(warning "=======exist========${LINKER} == ${LDFLAGS}") ++else ++$(warning "=======no========${LINKER} == ${LDFLAGS}") ++endif ++INC := $(dir $(shell find / -name "ld.bfd*" 2>/dev/null | head -n 1)) ++$(warning "=======libssp.so*========== ${INC}") ++ + ifeq (${ARM_ARCH_MAJOR},7) + target32-directive = -target arm-none-eabi + # Will set march32-directive from platform configuration +@@ -1598,6 +1607,7 @@ checkpatch: locate-checkpatch + certtool: ${CRTTOOL} + + ${CRTTOOL}: FORCE ++ @echo "1====================" + ${Q}${MAKE} PLAT=${PLAT} USE_TBBR_DEFS=${USE_TBBR_DEFS} COT=${COT} OPENSSL_DIR=${OPENSSL_DIR} CRTTOOL=${CRTTOOL} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${CRTTOOLPATH} all + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" +@@ -1605,6 +1615,7 @@ ${CRTTOOL}: FORCE + + ifneq (${GENERATE_COT},0) + certificates: ${CRT_DEPS} ${CRTTOOL} ++ @echo "2====================" + ${Q}${CRTTOOL} ${CRT_ARGS} + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" +@@ -1613,6 +1624,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL} + endif + + ${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL} ++ @echo "3====================" + $(eval ${CHECK_FIP_CMD}) + ${Q}${FIPTOOL} create ${FIP_ARGS} $@ + ${Q}${FIPTOOL} info $@ +@@ -1622,6 +1634,7 @@ ${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL} + + ifneq (${GENERATE_COT},0) + fwu_certificates: ${FWU_CRT_DEPS} ${CRTTOOL} ++ @echo "4====================" + ${Q}${CRTTOOL} ${FWU_CRT_ARGS} + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" +@@ -1630,6 +1643,7 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTTOOL} + endif + + ${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL} ++ @echo "5====================" + $(eval ${CHECK_FWU_FIP_CMD}) + ${Q}${FIPTOOL} create ${FWU_FIP_ARGS} $@ + ${Q}${FIPTOOL} info $@ +@@ -1664,6 +1678,7 @@ doc: + enctool: ${ENCTOOL} + + ${ENCTOOL}: FORCE ++ @echo "6====================" + ${Q}${MAKE} PLAT=${PLAT} BUILD_INFO=0 OPENSSL_DIR=${OPENSSL_DIR} ENCTOOL=${ENCTOOL} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${ENCTOOLPATH} all + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" +diff --git a/plat/marvell/armada/a3k/common/a3700_common.mk b/plat/marvell/armada/a3k/common/a3700_common.mk +index b9c28de..7db2b6b 100644 +--- a/plat/marvell/armada/a3k/common/a3700_common.mk ++++ b/plat/marvell/armada/a3k/common/a3700_common.mk +@@ -184,6 +184,7 @@ endif + ifeq ($(MARVELL_SECURE_BOOT),1) + $(Q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TBB) -r $(TIMN_UART_CFG) + endif ++ @echo "9999====================" + $(Q)tar czf $(BUILD_PLAT)/$(UART_IMAGE) -C $(BUILD_PLAT) $(UART_IMAGES) + @$(ECHO_BLANK_LINE) + @echo "Built $@ successfully" +@@ -221,6 +222,7 @@ ifeq ($(MARVELL_SECURE_BOOT),1) + $(Q)sed -i 's|wtmi.bin|$(WTMI_ENC_IMG)|1' $(TIMN_CFG) + $(Q)sed -i 's|$(BOOT_IMAGE)|$(BOOT_ENC_IMAGE)|1' $(TIMN_CFG) + endif ++ @echo "9999====================" + $(Q)cd $(BUILD_PLAT) && $(TIM2IMG) $(TIM2IMGARGS) -o $(BUILD_PLAT)/$(FLASH_IMAGE) + @$(ECHO_BLANK_LINE) + @echo "Built $@ successfully" +diff --git a/plat/marvell/armada/a8k/common/a8k_common.mk b/plat/marvell/armada/a8k/common/a8k_common.mk +index 4d8a87f..44f7158 100644 +--- a/plat/marvell/armada/a8k/common/a8k_common.mk ++++ b/plat/marvell/armada/a8k/common/a8k_common.mk +@@ -184,6 +184,7 @@ ${DOIMAGETOOL}: FORCE + ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} + + ${BUILD_PLAT}/${FLASH_IMAGE}: ${ROM_BIN_EXT} ${BUILD_PLAT}/${BOOT_IMAGE} ${DOIMAGETOOL} ++ @echo "9999====================" + @${ECHO_BLANK_LINE} + @echo "Building flash image" + ${Q}${DOIMAGETOOL} ${DOIMAGE_FLAGS} ${BUILD_PLAT}/${BOOT_IMAGE} ${BUILD_PLAT}/${FLASH_IMAGE} +diff --git a/plat/marvell/armada/common/marvell_common.mk b/plat/marvell/armada/common/marvell_common.mk +index f0e6edf..637150a 100644 +--- a/plat/marvell/armada/common/marvell_common.mk ++++ b/plat/marvell/armada/common/marvell_common.mk +@@ -83,6 +83,7 @@ include $(MARVELL_PLAT_BASE)/common/mss/mss_common.mk + endif + + $(BUILD_PLAT)/$(BOOT_IMAGE): $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(FIP_NAME) ++ @echo "9999====================" + $(if $(shell find $(BUILD_PLAT)/bl1.bin -type f -size +128k),$(error "Image '$(BUILD_PLAT)/bl1.bin' is bigger than 128kB")) + @cp $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; } + @truncate -s %128K $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; } +diff --git a/plat/nxp/common/fip_handler/fuse_fip/fuse.mk b/plat/nxp/common/fip_handler/fuse_fip/fuse.mk +index 4e84d02..c504315 100644 +--- a/plat/nxp/common/fip_handler/fuse_fip/fuse.mk ++++ b/plat/nxp/common/fip_handler/fuse_fip/fuse.mk +@@ -92,6 +92,7 @@ ${BUILD_PLAT}/${FUSE_FIP_NAME}: fiptool ${FUSE_FIP_DEPS} + ifeq (${FUSE_FIP_DEPS},) + $(error "Error: FUSE_PROV_FILE or/and FUSE_UP_FILE needs to point to the right file") + endif ++ @echo "9999====================" + ${FIPTOOL} create ${FUSE_FIP_ARGS} $@ + ${FIPTOOL} info $@ + @${ECHO_BLANK_LINE} +diff --git a/plat/nxp/soc-lx2160a/ddr_fip.mk b/plat/nxp/soc-lx2160a/ddr_fip.mk +index f14a9e8..d4f375b 100644 +--- a/plat/nxp/soc-lx2160a/ddr_fip.mk ++++ b/plat/nxp/soc-lx2160a/ddr_fip.mk +@@ -73,6 +73,7 @@ CRTTOOL ?= ${CRTTOOLPATH}/cert_create${BIN_EXT} + + ifneq (${GENERATE_COT},0) + ddr_certificates: ${DDR_CRT_DEPS} ${CRTTOOL} ++ @echo "9999====================" + ${Q}${CRTTOOL} ${DDR_CRT_ARGS} + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" +@@ -87,6 +88,7 @@ FIPTOOLPATH ?= tools/fiptool + FIPTOOL ?= ${FIPTOOLPATH}/fiptool${BIN_EXT} + + ${BUILD_PLAT}/${DDR_FIP_NAME}: ${DDR_FIP_DEPS} ${FIPTOOL} ++ @echo "9999====================" + $(eval ${CHECK_DDR_FIP_CMD}) + ${Q}${FIPTOOL} create ${DDR_FIP_ARGS} $@ + ${Q}${FIPTOOL} info $@ +diff --git a/plat/rpi/rpi3/platform.mk b/plat/rpi/rpi3/platform.mk +index 53c97e2..08b4251 100644 +--- a/plat/rpi/rpi3/platform.mk ++++ b/plat/rpi/rpi3/platform.mk +@@ -71,6 +71,7 @@ all: armstub + # This target concatenates BL1 and the FIP so that the base addresses match the + # ones defined in the memory map + armstub: bl1 fip ++ @echo "9999====================" + @echo " CAT $@" + ${Q}cp ${BUILD_PLAT}/bl1.bin ${RPI3_BL1_PAD_BIN} + ${Q}truncate --size=131072 ${RPI3_BL1_PAD_BIN} +diff --git a/plat/st/common/common_rules.mk b/plat/st/common/common_rules.mk +index fa48dfc..c26402a 100644 +--- a/plat/st/common/common_rules.mk ++++ b/plat/st/common/common_rules.mk +@@ -60,6 +60,7 @@ tf-a-%.elf: $(PLAT)-%.o ${STM32_TF_LINKERFILE} + ${Q}${LD} -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $< + + tf-a-%.bin: tf-a-%.elf ++ @echo "9999====================" + ${Q}${OC} -O binary $< $@ + @echo + @echo "Built $@ successfully" +diff --git a/tools/amlogic/Makefile b/tools/amlogic/Makefile +index 1a1d1f8..e9e9bb2 100644 +--- a/tools/amlogic/Makefile ++++ b/tools/amlogic/Makefile +@@ -33,6 +33,7 @@ HOSTCC := gcc + all: ${PROJECT} + + ${PROJECT}: ${OBJECTS} Makefile ++ @echo "9999====================" + @echo " HOSTLD $@" + ${Q}${HOSTCC} ${OBJECTS} -o $@ + @${ECHO_BLANK_LINE} +diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile +index 2ebee33..a9229e1 100644 +--- a/tools/fiptool/Makefile ++++ b/tools/fiptool/Makefile +@@ -71,6 +71,7 @@ DEPS := $(patsubst %.o,%.d,$(OBJECTS)) + all: ${PROJECT} + + ${PROJECT}: --openssl ${OBJECTS} Makefile ++ @echo "9999====================" + @echo " HOSTLD $@" + ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} + @${ECHO_BLANK_LINE} +diff --git a/tools/marvell/doimage/Makefile b/tools/marvell/doimage/Makefile +index 9f0d89d..38d7f93 100644 +--- a/tools/marvell/doimage/Makefile ++++ b/tools/marvell/doimage/Makefile +@@ -33,6 +33,7 @@ RM := rm -rf + all: ${PROJECT} + + ${PROJECT}: ${OBJECTS} Makefile ++ @echo "9999====================" + @echo " HOSTLD $@" + ${Q}${HOSTCC} ${OBJECTS} ${DOIMAGE_LD_FLAGS} -o $@ + @echo +diff --git a/tools/nxp/create_pbl/Makefile b/tools/nxp/create_pbl/Makefile +index f971a74..c756a44 100644 +--- a/tools/nxp/create_pbl/Makefile ++++ b/tools/nxp/create_pbl/Makefile +@@ -39,6 +39,7 @@ CC = gcc + all: create_pbl byte_swap + + ${PROJECT_1}: ${OBJECTS_1} Makefile ++ @echo "9999====================" + @echo " LD $@" + ${Q}${HOSTCC} ${OBJECTS_1} -o $@ ${LDLIBS} + @${ECHO_BLANK_LINE} +@@ -46,6 +47,7 @@ ${PROJECT_1}: ${OBJECTS_1} Makefile + @${ECHO_BLANK_LINE} + + ${PROJECT_2}: ${OBJECTS_2} Makefile ++ @echo "9999====================" + @echo " LD $@" + ${Q}${HOSTCC} ${OBJECTS_2} -o $@ ${LDLIBS} + @${ECHO_BLANK_LINE} +diff --git a/tools/sptool/Makefile b/tools/sptool/Makefile +index 1fa85fb..20377db 100644 +--- a/tools/sptool/Makefile ++++ b/tools/sptool/Makefile +@@ -36,6 +36,7 @@ HOSTCC ?= gcc + all: ${PROJECT} + + ${PROJECT}: ${OBJECTS} Makefile ++ @echo "9999====================" + @echo " HOSTLD $@" + ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} + @${ECHO_BLANK_LINE} +diff --git a/tools/stm32image/Makefile b/tools/stm32image/Makefile +index 9c9b7b5..68052a7 100644 +--- a/tools/stm32image/Makefile ++++ b/tools/stm32image/Makefile +@@ -33,6 +33,7 @@ HOSTCC := gcc + all: ${PROJECT} + + ${PROJECT}: ${OBJECTS} Makefile ++ @echo "9999====================" + @echo " HOSTLD $@" + ${Q}${HOSTCC} ${OBJECTS} -o $@ + @${ECHO_BLANK_LINE} +-- +2.19.1 + diff --git a/arm-trusted-firmware.spec b/arm-trusted-firmware.spec index 5bbb5bd..367da8f 100644 --- a/arm-trusted-firmware.spec +++ b/arm-trusted-firmware.spec @@ -10,6 +10,8 @@ Source0: https://github.com/ARM-software/arm-trusted-firmware/archive/v%{v ExclusiveArch: aarch64 BuildRequires: dtc +Patch001: 0001-1.patch + %description Trusted Firmware-A is a reference implementation of secure world software for Arm A-Profile architectures (Armv8-A and Armv7-A), including an Exception Level 3 (EL3) Secure Monitor. -- Gitee