coreboot-kgpe-d16/payloads/external/GRUB2/Makefile
Paul Menzel 3555389a8c payloads: Update GRUB stable from 2.02 to 2.04
GRUB 2.04 was released on July 5th, 2019, so update. The only change-log
is the git history. Some coreboot related changes are listed below.

1.  coreboot: Changed cbmemc to support updated console format from
    coreboot.
2.  ahci: Increase time-out from 10 s to 32 s
3.  normal/menu: Do not treat error values as key presses

When building from the git repository, `./bootstrap.sh` needs to be run
to set up Gnulib. Ignore the exit code, as older versions might not have
this script.

Change-Id: Iab0b87164ed86f15d3415af935998b59e0d76c45
Signed-off-by: Pablo <42.pablo.ms@gmail.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34104
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-13 12:58:24 +00:00

55 lines
1.5 KiB
Makefile

TAG-$(CONFIG_GRUB2_MASTER)=
TAG-$(CONFIG_GRUB2_REVISION)=$(CONFIG_GRUB2_REVISION_ID)
TAG-$(CONFIG_GRUB2_STABLE)=grub-2.04
NAME-$(CONFIG_GRUB2_MASTER)=HEAD
NAME-$(CONFIG_GRUB2_REVISION)=$(CONFIG_GRUB2_REVISION_ID)
NAME-$(CONFIG_GRUB2_STABLE)=2.04
project_git_repo=https://git.savannah.gnu.org/git/grub.git/
project_dir=grub2
unexport HOSTCC CC LD OBJCOPY STRIP
MAKEOVERRIDES :=
all: grub2
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
grub2/build/config.h: $(CONFIG_DEP) | checkout
echo " CONFIG GRUB2 $(NAME-y)"
rm -rf grub2/build
mkdir grub2/build
cd grub2 && ./bootstrap.sh ; ./autogen.sh
cd grub2/build && ../configure CC="$(HOSTCC)" LD="$(LD)" \
FREETYPE="pkg-config freetype2" BUILD_FREETYPE="pkg-config freetype2" \
TARGET_CC="$(CC)" TARGET_OBJCOPY="$(OBJCOPY)" TARGET_STRIP="$(STRIP)" \
CFLAGS=-O2 TARGET_CFLAGS=-Os \
--with-platform=coreboot --enable-boot-time --disable-werror
config: grub2/build/config.h checkout
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)"
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