Martin L Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80714?usp=email )
Change subject: util/amdfwtool: build amdfwtool only for all tools or AMD CPUs ......................................................................
util/amdfwtool: build amdfwtool only for all tools or AMD CPUs
When we're building non-AMD processors, don't bother building amdfwtool unless we're specifically building all of the tools like for abuild.
Change-Id: I9021674a06d65a79e24020790d317ab947c505fe Signed-off-by: Martin Roth gaumless@gmail.com --- M Makefile M src/soc/amd/common/block/psp/Kconfig M src/southbridge/amd/pi/hudson/Kconfig M util/amdfwtool/Makefile.mk 4 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/80714/1
diff --git a/Makefile b/Makefile index 4a87d2f..3f0f105 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,10 @@ endif endif
+ifneq ($(filter tools, $(MAKECMDGOALS)), ) +BUILD_ALL_TOOLS:=1 +endif + $(xcompile): util/xcompile/xcompile rm -f $@ $< $(XGCCPATH) > $@.tmp diff --git a/src/soc/amd/common/block/psp/Kconfig b/src/soc/amd/common/block/psp/Kconfig index a52ca0e..5699e8c 100644 --- a/src/soc/amd/common/block/psp/Kconfig +++ b/src/soc/amd/common/block/psp/Kconfig @@ -162,3 +162,9 @@ default 0xe20000 if AMD_FWM_POSITION_E20000 default 0xf20000 if AMD_FWM_POSITION_F20000 default 0xfa0000 if AMD_FWM_POSITION_FA0000 + +config USE_AMDFWTOOL + bool + default y if SOC_AMD_COMMON_BLOCK_PSP + help + Select this if AMDFWTOOL needs to be built diff --git a/src/southbridge/amd/pi/hudson/Kconfig b/src/southbridge/amd/pi/hudson/Kconfig index 4630df9..134b575 100644 --- a/src/southbridge/amd/pi/hudson/Kconfig +++ b/src/southbridge/amd/pi/hudson/Kconfig @@ -24,6 +24,7 @@ select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS_NON_SOC_CODEBASE select SOC_AMD_COMMON_BLOCK_PCI_MMCONF + select USE_AMDFWTOOL
config EHCI_BAR hex diff --git a/util/amdfwtool/Makefile.mk b/util/amdfwtool/Makefile.mk index 6a83cb9..cbc38b7 100644 --- a/util/amdfwtool/Makefile.mk +++ b/util/amdfwtool/Makefile.mk @@ -1,5 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause
+ifneq ($(BUILD_ALL_TOOLS)$(CONFIG_USE_AMDFWTOOL),) + amdfwtoolobj = amdfwtool.o data_parse.o signed_psp.o handle_file.o amdfwreadobj = amdfwread.o
@@ -25,3 +27,5 @@ $(objutil)/amdfwtool/amdfwread: $(addprefix $(objutil)/amdfwtool/,$(amdfwreadobj)) printf " AMDFWREAD\n" $(HOSTCC) $(addprefix $(objutil)/amdfwtool/,$(amdfwreadobj)) $(LDFLAGS) -o $@ + +endif #($(CONFIG_USE_AMDFWTOOL),y)