2013-11-14 12:10:08 +01:00
|
|
|
TAG-$(CONFIG_GRUB2_MASTER)=
|
2016-09-14 14:41:36 +02:00
|
|
|
TAG-$(CONFIG_GRUB2_REVISION)=$(CONFIG_GRUB2_REVISION_ID)
|
2017-11-20 01:56:41 +01:00
|
|
|
TAG-$(CONFIG_GRUB2_STABLE)=e54c99aaff5e5f6f5d3b06028506c57e66d8ef77
|
2013-11-14 12:10:08 +01:00
|
|
|
NAME-$(CONFIG_GRUB2_MASTER)=HEAD
|
2016-09-14 14:41:36 +02:00
|
|
|
NAME-$(CONFIG_GRUB2_REVISION)=$(CONFIG_GRUB2_REVISION_ID)
|
2017-11-20 01:56:41 +01:00
|
|
|
NAME-$(CONFIG_GRUB2_STABLE)=2.02
|
2013-11-14 12:10:08 +01:00
|
|
|
|
2017-09-02 20:34:53 +02:00
|
|
|
project_git_repo=https://git.savannah.gnu.org/git/grub.git/
|
2016-03-16 19:42:05 +01:00
|
|
|
project_dir=grub2
|
|
|
|
|
2017-08-14 01:38:24 +02:00
|
|
|
unexport HOSTCC CC LD OBJCOPY STRIP
|
|
|
|
MAKEOVERRIDES :=
|
2013-11-14 12:10:08 +01:00
|
|
|
|
|
|
|
all: grub2
|
|
|
|
|
|
|
|
checkout:
|
|
|
|
echo " GIT GRUB2 $(NAME-y)"
|
|
|
|
test -d grub2 || \
|
2016-03-16 19:42:05 +01:00
|
|
|
git clone $(project_git_repo) $(project_dir)
|
2013-11-14 12:10:08 +01:00
|
|
|
cd grub2 && \
|
|
|
|
git checkout master && \
|
|
|
|
git pull; \
|
|
|
|
test -n "$(TAG-y)" && \
|
|
|
|
git branch -f $(NAME-y) $(TAG-y) && \
|
|
|
|
git checkout $(NAME-y) || true
|
|
|
|
|
2017-08-14 01:58:28 +02:00
|
|
|
grub2/build/config.h: $(CONFIG_DEP) | checkout
|
2013-11-14 12:10:08 +01:00
|
|
|
echo " CONFIG GRUB2 $(NAME-y)"
|
|
|
|
rm -rf grub2/build
|
|
|
|
mkdir grub2/build
|
|
|
|
cd grub2 && ./autogen.sh
|
2017-08-14 01:38:24 +02:00
|
|
|
cd grub2/build && ../configure CC="$(HOSTCC)" LD="$(LD)" \
|
|
|
|
TARGET_CC="$(CC)" TARGET_OBJCOPY="$(OBJCOPY)" TARGET_STRIP="$(STRIP)" \
|
|
|
|
CFLAGS=-O2 TARGET_CFLAGS=-Os \
|
|
|
|
--with-platform=coreboot --enable-boot-time --disable-werror
|
2013-11-14 12:10:08 +01:00
|
|
|
|
2017-08-14 01:58:28 +02:00
|
|
|
config: grub2/build/config.h checkout
|
|
|
|
|
2013-11-14 12:10:08 +01:00
|
|
|
grub2: config
|
|
|
|
echo " MAKE GRUB2 $(NAME-y)"
|
2017-08-14 01:38:24 +02:00
|
|
|
$(MAKE) -C grub2/build
|
2016-06-15 21:08:06 +02:00
|
|
|
$(MAKE) -C grub2/build default_payload.elf \
|
|
|
|
EXTRA_PAYLOAD_MODULES="$(CONFIG_GRUB2_EXTRA_MODULES)"
|
2013-11-14 12:10:08 +01:00
|
|
|
|
|
|
|
clean:
|
2017-08-14 01:38:24 +02:00
|
|
|
test -f grub2/build/Makefile && $(MAKE) -C grub2/build clean || exit 0
|
2013-11-14 12:10:08 +01:00
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf grub2
|
|
|
|
|
2016-03-16 19:42:05 +01:00
|
|
|
print-repo-info:
|
|
|
|
echo "$(project_git_repo) $(project_dir)"
|
|
|
|
|
|
|
|
.PHONY: checkout config grub2 clean distclean print-repo-info
|