Attention is currently required from: Martin L Roth.
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78831?usp=email )
Change subject: Makefile.inc: Add filter_dupes macro ......................................................................
Makefile.inc: Add filter_dupes macro
Add a macro to sort and filter out duplicate tokens from a string variable. This will be used in a subsequent patch to correct the calculation of the soft fuse bitmask value passed to amdfwtool.
TEST=tested with follow-on patch
Change-Id: Ic947b445efe44af9fcbaef52f6c5a5d949878bc9 Signed-off-by: Matt DeVillier matt.devillier@amd.corp-partner.google.com --- M Makefile.inc 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/78831/1
diff --git a/Makefile.inc b/Makefile.inc index 22a4646..49e1657 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -147,6 +147,7 @@ # toupper: returns the value in all uppercase # ws_to_under: returns the value with any whitespace changed to underscores # get_fmap_value returns the value of a given FMAP field from fmap_config.h +# remove_dupes sorts and filters out duplicate tokens from a whitespace-separated string _toint=$(shell printf "%d" $1) _tohex=$(shell printf 0x"%x" $1) _int-add2=$(shell expr $(call _toint,$1) + $(call _toint,$2)) @@ -167,6 +168,7 @@ toupper=$(shell echo '$1' | tr '[:lower:]' '[:upper:]') ws_to_under=$(shell echo '$1' | tr ' \t' '_') get_fmap_value=$(shell awk '$$2 == "$1" {print $$3}' $(obj)/fmap_config.h) +remove_dupes=$(shell echo $1 | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
####################################################################### # Helper functions for ramstage postprocess