Martin L Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69277 )
Change subject: [WIP] Payloads: Add memtest86+ v6 to the build ......................................................................
[WIP] Payloads: Add memtest86+ v6 to the build
Signed-off-by: Martin Roth gaumless@gmail.com Change-Id: Ie0eedc25fcf37b925b072ca809c019a599a20392 --- M payloads/external/Memtest86Plus/Kconfig.secondary M payloads/external/Memtest86Plus/Makefile 2 files changed, 62 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/69277/1
diff --git a/payloads/external/Memtest86Plus/Kconfig.secondary b/payloads/external/Memtest86Plus/Kconfig.secondary index 7c4da9e..2852867a 100644 --- a/payloads/external/Memtest86Plus/Kconfig.secondary +++ b/payloads/external/Memtest86Plus/Kconfig.secondary @@ -1,30 +1,44 @@ if MEMTEST_SECONDARY_PAYLOAD
+comment "Memtest86+" + choice - prompt "Memtest86+ version" - default MEMTEST_STABLE + prompt "Memtest86+ 5/6" depends on MEMTEST_SECONDARY_PAYLOAD
-config MEMTEST_STABLE - bool "Stable" - help - Stable Memtest86+ version. +config MEMTEST86PLUS_V5 + bool "Memtest86+ V5"
- For reproducible builds, this option must be selected. -config MEMTEST_MASTER - bool "Master" +config MEMTEST86PLUS_V6 + bool "Memtest86+ V6" + +endchoice + +choice + prompt "Memtest86+ revision" + depends on MEMTEST_SECONDARY_PAYLOAD + +config MEMTEST_5_STABLE + bool "Memtest86+ Stable" + depends on MEMTEST86PLUS_V5 help - Newest Memtest86+ version. + Stable Memtest86+ 5 version from coreboot.org + +config MEMTEST_MASTER + bool "Memtest86+ Master" + help + Newest Memtest86+ version
This option will fetch the newest version of the Memtest86+ code, updating as new changes are committed. This makes the build non-reproducible, as it can fetch different code each time. + config MEMTEST_REVISION - bool "git revision" + bool "Memtest86+ git revision" help Select this option if you have a specific commit or branch that you want to use as the revision from which to - build Memtest86+. This makes the build + build Memtest86+. Using a branch version may the build non-reproducible, as it can fetch different code each time.
You will be able to specify the name of a branch or a commit id @@ -33,9 +47,10 @@ endchoice
config MEMTEST_REVISION_ID - string "Insert a commit's SHA-1 or a branch name" + string "Insert a Memtest86+ 5 or 6 commit's SHA-1 or a branch name" depends on MEMTEST_REVISION - default "origin/master" + default "origin/main" if MEMTEST86PLUS_V6 + default "origin/master" if MEMTEST86PLUS_V5 help The commit's SHA-1 or branch name of the revision to use.
diff --git a/payloads/external/Memtest86Plus/Makefile b/payloads/external/Memtest86Plus/Makefile index 3853cb9..e205149 100644 --- a/payloads/external/Memtest86Plus/Makefile +++ b/payloads/external/Memtest86Plus/Makefile @@ -1,25 +1,38 @@ ## SPDX-License-Identifier: GPL-2.0-only
-TAG-$(CONFIG_MEMTEST_MASTER)=origin/master -NAME-$(CONFIG_MEMTEST_MASTER)=Master -TAG-$(CONFIG_MEMTEST_STABLE)=0bd34c22604660e4283316331f3e7bf8a3863753 -NAME-$(CONFIG_MEMTEST_STABLE)=Stable -TAG-$(CONFIG_MEMTEST_REVISION)=$(CONFIG_MEMTEST_REVISION_ID) - project_name=Memtest86+ project_dir=$(CURDIR)/memtest86plus -project_git_repo=https://review.coreboot.org/memtest86plus.git + +ifeq ($(MEMTEST86PLUS_V6),y) + project_git_repo=https://github.com/memtest86plus/memtest86plus.git + TAG-$(CONFIG_MEMTEST_MASTER)=origin/main + NAME-$(CONFIG_MEMTEST_MASTER)=Main + TAG-$(CONFIG_MEMTEST_REVISION)=$(CONFIG_MEMTEST_REVISION_ID) +else + project_git_repo=https://review.coreboot.org/memtest86plus.git + TAG-$(CONFIG_MEMTEST_MASTER)=origin/master + NAME-$(CONFIG_MEMTEST_MASTER)=Master + TAG-$(CONFIG_MEMTEST_STABLE)=0bd34c22604660e4283316331f3e7bf8a3863753 + NAME-$(CONFIG_MEMTEST_STABLE)=Stable + TAG-$(CONFIG_MEMTEST_REVISION)=$(CONFIG_MEMTEST_REVISION_ID) +endif +
all: build
-$(project_dir): +check_version: + if [ ! "$$(cd $(project_dir) git config remote.origin.url)" = "$(project_git_repo)" ]; then \ + rm -rf $(project_dir); \ + fi + +$(project_dir): check_version echo " Cloning $(project_name) from Git" git clone $(project_git_repo) $(project_dir)
fetch: $(project_dir) ifeq ($(TAG-y),) echo "Error: The specified tag is invalid" -ifeq ($(CONFIG_MEMTEST_REVISION),y) +ifeq ($(CONFIG_MEMTEST_5_REVISION)$(CONFIG_MEMTEST_6_REVISION),y) echo "Error: There is no revision specified for $(project_name)" false endif @@ -50,4 +63,4 @@ print-repo-info: echo "$(project_git_repo) $(project_dir)"
-.PHONY: all build checkout clean distclean fetch print-repo-info +.PHONY: all build checkout check_version clean distclean fetch print-repo-info