[coreboot-gerrit] Change in coreboot[master]: [WIP] payloads/external/GRUB2: Convert to use Makefile.git
Nico Huber (Code Review)
gerrit at coreboot.org
Thu Aug 24 00:20:04 CEST 2017
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/21164
Change subject: [WIP] payloads/external/GRUB2: Convert to use Makefile.git
......................................................................
[WIP] payloads/external/GRUB2: Convert to use Makefile.git
Change-Id: I837a5e3b107eb82e14dcd0f21a954250f0e9b088
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M payloads/external/GRUB2/Kconfig
M payloads/external/GRUB2/Makefile
M payloads/external/Makefile.inc
3 files changed, 17 insertions(+), 64 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/21164/1
diff --git a/payloads/external/GRUB2/Kconfig b/payloads/external/GRUB2/Kconfig
index 656f7c9..9888df2 100644
--- a/payloads/external/GRUB2/Kconfig
+++ b/payloads/external/GRUB2/Kconfig
@@ -1,31 +1,10 @@
if PAYLOAD_GRUB2
-choice
- prompt "GRUB2 version"
- default GRUB2_MASTER
-
-config GRUB2_MASTER
- bool "HEAD"
- help
- Newest GRUB2 version
-
-config GRUB2_REVISION
- bool "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 GRUB2.
-
- You will be able to specify the name of a branch or a commit id
- later.
-endchoice
-
config GRUB2_REVISION_ID
- string "Insert a commit's SHA-1 or a branch name"
- depends on GRUB2_REVISION
+ string "GIT Revision"
default "origin/master"
help
- The commit's SHA-1 or branch name of the revision to use.
+ The commit's SHA-1, branch or tag name of the revision to use.
config GRUB2_EXTRA_MODULES
string "Extra modules to include in GRUB image"
diff --git a/payloads/external/GRUB2/Makefile b/payloads/external/GRUB2/Makefile
index 4a0a491..942972a 100644
--- a/payloads/external/GRUB2/Makefile
+++ b/payloads/external/GRUB2/Makefile
@@ -1,29 +1,16 @@
-TAG-$(CONFIG_GRUB2_MASTER)=
-TAG-$(CONFIG_GRUB2_REVISION)=$(CONFIG_GRUB2_REVISION_ID)
-NAME-$(CONFIG_GRUB2_MASTER)=HEAD
-NAME-$(CONFIG_GRUB2_REVISION)=$(CONFIG_GRUB2_REVISION_ID)
-
-project_git_repo=git://git.sv.gnu.org/grub.git
-project_dir=grub2
-
unexport HOSTCC CC LD OBJCOPY STRIP
-MAKEOVERRIDES :=
-all: grub2
+project_name := GRUB
+project_repo := git://git.sv.gnu.org/grub.git
+project_rev := $(REVISION_ID)
+project_dir := grub2
+project_output := grub2/build/default_payload.elf
+project_params := default_payload.elf EXTRA_PAYLOAD_MODULES="$(EXTRA_MODULES)"
-checkout:
- echo " GIT GRUB2 $(NAME-y)"
- test -d grub2 || \
- git clone $(project_git_repo) $(project_dir)
- cd grub2 && \
- git checkout master && \
- git pull; \
- test -n "$(TAG-y)" && \
- git branch -f $(NAME-y) $(TAG-y) && \
- git checkout $(NAME-y) || true
+include ../Makefile.git
grub2/build/config.h: $(CONFIG_DEP) | checkout
- echo " CONFIG GRUB2 $(NAME-y)"
+ printf " CONFIG $(project_name) [$(project_rev)]\n"
rm -rf grub2/build
mkdir grub2/build
cd grub2 && ./autogen.sh
@@ -32,21 +19,10 @@
CFLAGS=-O2 TARGET_CFLAGS=-Os \
--with-platform=coreboot --enable-boot-time --disable-werror
-config: grub2/build/config.h checkout
+first_make_call: grub2/build/config.h checkout
+ printf " MAKE $(project_name) [$(project_rev)]\n"
+ $(MAKE) -C"$(dir $(project_output))"
-grub2: config
- echo " MAKE GRUB2 $(NAME-y)"
- $(MAKE) -C grub2/build
- $(MAKE) -C grub2/build default_payload.elf \
- EXTRA_PAYLOAD_MODULES="$(CONFIG_GRUB2_EXTRA_MODULES)"
+$(project_output): first_make_call
-clean:
- test -f grub2/build/Makefile && $(MAKE) -C grub2/build clean || exit 0
-
-distclean:
- rm -rf grub2
-
-print-repo-info:
- echo "$(project_git_repo) $(project_dir)"
-
-.PHONY: checkout config grub2 clean distclean print-repo-info
+.PHONY: first_make_call
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 0a9b3d6..59eb46f 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -158,10 +158,8 @@
CC="$(CC_x86_32)" LD="$(LD_x86_32)" \
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
CONFIG_DEP="$(abspath $(obj)/config.h)" \
- CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) \
- CONFIG_GRUB2_REVISION=$(CONFIG_GRUB2_REVISION) \
- CONFIG_GRUB2_REVISION_ID=$(CONFIG_GRUB2_REVISION_ID) \
- CONFIG_GRUB2_EXTRA_MODULES=$(CONFIG_GRUB2_EXTRA_MODULES)
+ REVISION_ID=$(CONFIG_GRUB2_REVISION_ID) \
+ EXTRA_MODULES=$(CONFIG_GRUB2_EXTRA_MODULES)
payloads/external/GRUB2/grub2/build/default_payload.elf: grub2
--
To view, visit https://review.coreboot.org/21164
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I837a5e3b107eb82e14dcd0f21a954250f0e9b088
Gerrit-Change-Number: 21164
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170823/4212005e/attachment.html>
More information about the coreboot-gerrit
mailing list