coreboot-kgpe-d16/payloads
Werner Zeh 8088584b37 payloads/external/GRUB2: Check for existing grub2 directory
When 'make clean' is executed and there is no source code cloned for
GRUB2 in payloads/external/GRUB2/grub2 (so GRUB2 has never been used on
this tree) an error message is thrown:
"fatal: cannot change to 'grub2': No such file or directory"

This error happens when there is no grub2 directory and is caused by
line 20 in payloads/external/GRUB2/Makefile where a shell command is
used to check the state of the git repo for grub2. Thought the target
for this code (checkout) is not executed by 'make clean' the shell
evaluates the command as part of the Makefile sourcing and encounters a
missing directory.

This patch fixes this error by checking for the project directory before
the git status of the repo is evaluated.

Change-Id: Ieaa919e1ee5ec2a1ec3c840fa07a6ec16d230e88
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36750
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-11-12 18:22:19 +00:00
..
bayou payloads: Remove/fix trailing whitespace 2018-09-04 12:38:40 +00:00
coreinfo coreinfo/coreinfo.c: Support both lower and upper case alphabets 2019-10-02 11:20:06 +00:00
external payloads/external/GRUB2: Check for existing grub2 directory 2019-11-12 18:22:19 +00:00
libpayload libpayload: usbmsc: update return value of CSW transfer 2019-11-11 10:25:24 +00:00
linuxcheck Makefile.inc, payloads: Enable -Wvla 2019-08-20 20:57:01 +00:00
nvramcui Makefile.inc, payloads: Enable -Wvla 2019-08-20 20:57:01 +00:00
Kconfig arch/riscv: Enable FIT support 2019-08-08 13:03:59 +00:00
Makefile.inc payloads/external: Add yabits payload 2018-09-16 13:10:17 +00:00