diff options
author | Fred Reitberger <reitbergerfred@gmail.com> | 2023-02-10 12:31:22 -0500 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-02-13 14:53:35 +0000 |
commit | 552d287cc9c558a4818b7454777808fa2cf3386c (patch) | |
tree | 015b6f38f22a09f3db030b1690ac2332970c1ae9 /src/soc | |
parent | fd8854ec0f51cf1107c8e001fc01da63ceff6110 (diff) |
soc/amd/common/Makefile: Only run amdfwread once
By saving the results of amdfwread into a file, it only needs to be run
once instead of every time amdfwread-offset-size-cmd is called.
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: I1afaf65b9b2f9fb856aefc3ff37fb3a3442f6369
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72924
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/Makefile.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc index dc782c99d8..ec434e0734 100644 --- a/src/soc/amd/common/Makefile.inc +++ b/src/soc/amd/common/Makefile.inc @@ -28,10 +28,13 @@ add_bootblock = \ endif # ifeq ($(CONFIG_RESET_VECTOR_IN_RAM),y) ifeq ($(CONFIG_VBOOT_GSCVD),y) -build_complete:: $(AMDFWREAD) +build_complete:: $(obj)/ro-amdfw-list -amdfwread-offset-size-cmd = $(AMDFWREAD) --ro-list $(obj)/coreboot.rom | \ - awk --non-decimal-data '/$(1)/ {printf "%x:%x", $$3, $$4}' +$(obj)/ro-amdfw-list: $(AMDFWREAD) + $(AMDFWREAD) --ro-list $(obj)/coreboot.rom > $@ + +amdfwread-offset-size-cmd = grep '$(1)' $(obj)/ro-amdfw-list | \ + sed 's/^.* 0x0*\(.*\) 0x0*\(.*\)$$/\1:\2/' amdfwread-range-cmd = $(shell ( \ range=$$($(call amdfwread-offset-size-cmd,$(1))) ;\ |