Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36416 )
Change subject: Makefile, Kconfig: Add AMD dependency for amd_blobs repo ......................................................................
Makefile, Kconfig: Add AMD dependency for amd_blobs repo
Add Kconfig options and a target for cloning and updating the amd_blobs repo. Users should only download the repo after implicitely agreeing to AMD's License text. No formal documented agreement is required.
Users may opt to clone the repo, as well as select the git reference to use. The default is origin/master although any may be used, e.g. to support a development effort or a git bisect.
All makefile targets and dependencies are if'ed with CONFIG_USE_AMD_BLOBS to prevent accidental cloning.
Change-Id: I4ae807659db16756453dc3db2c51848291c681b8 Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- M Makefile.inc M src/Kconfig 2 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/36416/1
diff --git a/Makefile.inc b/Makefile.inc index f7f3708..48f31ff 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -207,6 +207,29 @@ COREBOOT_EXPORTS += UPDATED_SUBMODULES endif
+#ifeq ($(CONFIG_USE_AMD_BLOBS),y) +amd_blobs_name=amd_blobs +amd_blobs_dir=3rdparty/$(amd_blobs_name) +amd_blobs_repo=https://review.coreboot.org/amd_blobs.git + +$(amd_blobs_dir): + $(warning start cd now for clone $(amd_blobs_dir)) + @echo " Cloning $(amd_blobs_name) from Git" + @git clone $(amd_blobs_repo) $(amd_blobs_dir) + +use_amd_blobs: $(amd_blobs_dir) + # if origin/master, always fetch, else fetch only if commit isn't present + if [ "$(CONFIG_AMDBLOBS_REVISION)" = "origin/master" ]; then \ + echo " Fetching new commits from the $(amd_blobs_name) Git repo"; \ + git -C $(amd_blobs_dir) fetch 2>/dev/null; \ + else \ + git -C $(amd_blobs_dir) cat-file -e $(CONFIG_AMDBLOBS_REVISION) || \ + git -C $(amd_blobs_dir) fetch 2>/dev/null; fi + @git -C $(amd_blobs_dir) checkout $(CONFIG_AMDBLOBS_REVISION) 2>/dev/null; + +PHONY+=use_amd_blobs +#endif + postcar-c-deps:=$$(OPTION_TABLE_H) ramstage-c-deps:=$$(OPTION_TABLE_H) romstage-c-deps:=$$(OPTION_TABLE_H) diff --git a/src/Kconfig b/src/Kconfig index 4c71f28..18d35b3 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -235,6 +235,26 @@ might be required for some chipsets or boards. This flag ensures that a "Free" option remains available for users.
+config USE_AMD_BLOBS + bool "Allow AMD blobs repository (with license agreement)" + help + This draws in the amd_blobs repository, which contains binary files + distributed by AMD, including VBIOS, PSP bootloaders, SMU firmwares, + etc. Selecting this item to download or clone the repo implies your + agreement to the AMD license agreement. A copy of the license text + may be reviewed by reading Documentation/soc/amd/amdblobs_license.md, + and your copy of the license is present in the repo once downloaded. + + Note that for some products, omitting PSP, SMU images, or other items + may result in a nonbooting coreboot.rom. + +config AMDBLOBS_REVISION + string "AMD blobs repo Git reference" + depends on USE_AMD_BLOBS + default "origin/master" + help + The specific commit's SHA-1 or branch name to use. + config COVERAGE bool "Code coverage support" depends on COMPILER_GCC