payloads/tianocore: Add a proper target for the Boot Splash
edk2's default is to show a Boot Splash with their own logo which looks like it's from the 1960's. Therefore, we replace this image with coreboot's logo, taken from https://coreboot.org unless a custom one is specified. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I1b133e2a2cfd45a6650e4523b267f7508974137b Reviewed-on: https://review.coreboot.org/c/coreboot/+/65881 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Martin L Roth <gaumless@tutanota.com>
This commit is contained in:
parent
b1c9f7fd12
commit
108e537928
|
@ -94,17 +94,25 @@ config TIANOCORE_ABOVE_4G_MEMORY
|
||||||
|
|
||||||
config TIANOCORE_BOOTSPLASH_FILE
|
config TIANOCORE_BOOTSPLASH_FILE
|
||||||
string "Tianocore Bootsplash path and filename"
|
string "Tianocore Bootsplash path and filename"
|
||||||
default "bootsplash.bmp"
|
default "Documentation/coreboot_logo.svg"
|
||||||
help
|
help
|
||||||
Select this option if you have a bootsplash image that you would
|
The path and filename of the file to use as graphical bootsplash
|
||||||
like to be used. If this option is not selected, the default
|
image. If this option is not configured, the default
|
||||||
coreboot logo (European Brown Hare) will used.
|
coreboot logo (European Brown Hare) will used.
|
||||||
|
|
||||||
The path and filename of the file to use as graphical bootsplash
|
You can use any image format supported by imagemagick, a list of which
|
||||||
image. The file must be an uncompressed BMP, in BMP 3 format.
|
can be found [here](https://imagemagick.org/script/formats.php).
|
||||||
|
|
||||||
Linux can create these with the below command:
|
The build process will automatically convert this to the format that
|
||||||
`convert splosh.bmp BMP3:splash.bmp`
|
EDK2 requires, which is an uncompressed BMP, in BMP3 format. It does
|
||||||
|
this using imagemagick (`convert splosh.bmp BMP3:splash.bmp`).
|
||||||
|
|
||||||
|
The newly formatted file will be the dimensions size as the original
|
||||||
|
one.
|
||||||
|
|
||||||
|
The build process will automatically do this conversion, so it can
|
||||||
|
be supplied with any format that imagemagick can process (which is
|
||||||
|
pretty much any!).
|
||||||
|
|
||||||
This image will also be used as the BGRT boot image, which may
|
This image will also be used as the BGRT boot image, which may
|
||||||
persist through your OS boot process.
|
persist through your OS boot process.
|
||||||
|
|
|
@ -136,18 +136,36 @@ update: $(project_dir)
|
||||||
fi; \
|
fi; \
|
||||||
git submodule update --init --checkout
|
git submodule update --init --checkout
|
||||||
|
|
||||||
|
logo: $(project_dir)/edk2
|
||||||
|
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
|
||||||
|
/*) convert -background None $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
|
||||||
|
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
|
||||||
|
*) convert -background None $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
|
||||||
|
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
|
||||||
|
esac \
|
||||||
|
|
||||||
checktools:
|
checktools:
|
||||||
echo "Checking uuid-dev..."
|
echo -n "EDK2: Checking uuid-dev:"
|
||||||
echo "#include <uuid/uuid.h>" > libtest.c
|
echo "#include <uuid/uuid.h>" > libtest.c
|
||||||
echo "int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }" >> libtest.c
|
echo "int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }" >> libtest.c
|
||||||
$(HOSTCC) $(HOSTCCFLAGS) libtest.c -o libtest >/dev/null 2>&1 && echo " found uuid-dev." || \
|
$(HOSTCC) $(HOSTCCFLAGS) libtest.c -o libtest >/dev/null 2>&1 && echo " Found!" || \
|
||||||
( echo " Not found."; echo "ERROR: please_install uuid-dev (libuuid-devel)"; exit 1 )
|
( echo " Not found!"; \
|
||||||
|
echo "ERROR: please_install uuid-dev (libuuid-devel)"; exit 1 )
|
||||||
rm -rf libtest.c libtest
|
rm -rf libtest.c libtest
|
||||||
echo "Checking nasm..."
|
echo -n "EDK2: Checking nasm:"
|
||||||
type nasm > /dev/null 2>&1 && echo " found nasm." || \
|
type nasm > /dev/null 2>&1 && echo " Found!" || \
|
||||||
( echo " Not found."; echo "Error: Please install nasm."; exit 1 )
|
( echo " Not found!"; echo "ERROR: Please install nasm."; exit 1 )
|
||||||
|
echo -n "EDK2: Checking imagemagick:"
|
||||||
|
-convert -size 1x1 xc: test.png &> /dev/null;
|
||||||
|
if [ -f test.png ]; then \
|
||||||
|
rm test.png && echo " Found!"; \
|
||||||
|
else \
|
||||||
|
echo " Not found!"; \
|
||||||
|
echo "ERROR: Please install imagemagick"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
build: update checktools
|
build: update logo checktools
|
||||||
echo " ##### $(project_name) Build Summary #####"
|
echo " ##### $(project_name) Build Summary #####"
|
||||||
echo " Repository: $(CONFIG_TIANOCORE_REPOSITORY)"
|
echo " Repository: $(CONFIG_TIANOCORE_REPOSITORY)"
|
||||||
echo " Branch: $(CONFIG_TIANOCORE_TAG_OR_REV)"
|
echo " Branch: $(CONFIG_TIANOCORE_TAG_OR_REV)"
|
||||||
|
@ -160,15 +178,6 @@ build: update checktools
|
||||||
-e 's/q /Build: Quiet/' \
|
-e 's/q /Build: Quiet/' \
|
||||||
-e 's/t /Toolchain: /'
|
-e 's/t /Toolchain: /'
|
||||||
unset CC; $(MAKE) -C $(project_dir)/BaseTools 2>&1
|
unset CC; $(MAKE) -C $(project_dir)/BaseTools 2>&1
|
||||||
if [ -n "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" ]; then \
|
|
||||||
echo " Copying custom bootsplash image"; \
|
|
||||||
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
|
|
||||||
/*) convert $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
|
|
||||||
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
|
|
||||||
*) convert $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
|
|
||||||
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
|
|
||||||
esac \
|
|
||||||
fi; \
|
|
||||||
cd $(project_dir); \
|
cd $(project_dir); \
|
||||||
export EDK_TOOLS_PATH=$(project_dir)/BaseTools; \
|
export EDK_TOOLS_PATH=$(project_dir)/BaseTools; \
|
||||||
export WORKSPACE=$(project_dir); \
|
export WORKSPACE=$(project_dir); \
|
||||||
|
@ -188,4 +197,4 @@ clean:
|
||||||
distclean:
|
distclean:
|
||||||
rm -rf */
|
rm -rf */
|
||||||
|
|
||||||
.PHONY: all update checktools config build clean distclean
|
.PHONY: all update checktools config build clean distclean logo
|
||||||
|
|
Loading…
Reference in New Issue