Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31561
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
payloads/tianocore: Add option for custom bootsplash
Add Kconfig options to use custom bootsplash file, dependent on using MrChromebox's stable branch, with help info conveying required file format.
Adjust Makefile to copy the custom bootsplash and overwrite the default Logo.bmp file, handling both absolute and relative paths, and restore the original logo file after building so as to keep the working directory clean.
Test: build with and without custom bootsplash, ensure correct bootsplash displayed
Change-Id: I164f46777169801cff56633fd920bc81b7c8129a Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M payloads/external/Makefile.inc M payloads/external/tianocore/Kconfig M payloads/external/tianocore/Makefile 3 files changed, 32 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/31561/1
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 4fda725..7249553 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -135,6 +135,7 @@ CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \ CONFIG_TIANOCORE_TARGET_IA32=$(CONFIG_TIANOCORE_TARGET_IA32) \ CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \ + CONFIG_TIANOCORE_BOOTSPLASH_FILE="$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" \ GCC_CC_x86_32=$(GCC_CC_x86_32) \ GCC_CC_x86_64=$(GCC_CC_x86_64) \ GCC_CC_arm=$(GCC_CC_arm) \ diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index 79e09e6..12010ea 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -87,4 +87,24 @@ help Use 8254 Timer for legacy support.
+config TIANOCORE_BOOTSPLASH_IMAGE + bool "Use a custom bootsplash image" + depends on TIANOCORE_STABLE + help + Select this option if you have a bootsplash image that you would + like to be used. If this option is not selected, the default + coreboot logo (European Brown Hare) will used. + +config TIANOCORE_BOOTSPLASH_FILE + string "Tianocore Bootsplash path and filename" + depends on TIANOCORE_BOOTSPLASH_IMAGE + default "bootsplash.bmp" + help + The path and filename of the file to use as graphical bootsplash + screen. The file format must be uncompressed BMP, and the file's + resolution must be less than the native resolution of the display. + + If an absolute path is not given, the path will assumed to be + relative to the coreboot root directory. + endif diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index e4f395f..989f723 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -87,6 +87,15 @@ build: $(project_dir)/.version_$(TAG-y) checktools unset CC; $(MAKE) -C $(project_dir)/BaseTools echo " build $(project_name) $(TAG-y)" + if [ -n "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" ]; then \ + echo " Copying custom bootsplash image"; \ + if [[ "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" = /* ]]; then \ + cp "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" "$(project_dir)/CorebootPayloadPkg/Logo/Logo.bmp"; \ + else \ + cp "$$(dirname "$$(dirname "$$(dirname "$(CURDIR)")")")/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" \ + "$(project_dir)/CorebootPayloadPkg/Logo/Logo.bmp"; \ + fi; \ + fi; \ cd $(project_dir); \ export EDK_TOOLS_PATH=$(project_dir)/BaseTools; \ export WORKSPACE=$(project_dir); \ @@ -96,7 +105,8 @@ cat ../tools_def.txt >> $(project_dir)/Conf/tools_def.txt; \ fi; \ build $(BUILD_STR); \ - mv $(project_dir)/Build/CorebootPayloadPkg*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd + mv $(project_dir)/Build/CorebootPayloadPkg*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \ + git checkout CorebootPayloadPkg/Logo/Logo.bmp > /dev/null 2>&1
clean: test -d $(project_dir) && (cd $(project_dir); rm -rf Build; rm -f Conf/tools_def.txt) || exit 0
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31561 )
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile File payloads/external/tianocore/Makefile:
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile... PS1, Line 109: git checkout CorebootPayloadPkg/Logo/Logo.bmp > /dev/null 2>&1 It’s unlikely, but if changes were staged already, then this wouldn’t do anything. So, you could do `git checkout HEAD -- CorebootPayloadPkg/Logo/Logo.bmp` to get the version in the git repository.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31561 )
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
Patch Set 1:
(3 comments)
just some comments, not through yet
https://review.coreboot.org/#/c/31561/1/payloads/external/Makefile.inc File payloads/external/Makefile.inc:
https://review.coreboot.org/#/c/31561/1/payloads/external/Makefile.inc@138 PS1, Line 138: CONFIG_TIANOCORE_BOOTSPLASH_FILE="$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" \ CONFIG_* values should already contain quotes
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile File payloads/external/tianocore/Makefile:
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile... PS1, Line 92: if [[ "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" = /* ]]; then \ [[ is non-standard, iirc
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile... PS1, Line 95: $$(dirname "$$(dirname "$$(dirname "$(CURDIR)")")") Isn't $(top) available here?
Matt DeVillier has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31561 )
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile File payloads/external/tianocore/Makefile:
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile... PS1, Line 92: if [[ "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" = /* ]]; then \
[[ is non-standard, iirc
recommended substitution?
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile... PS1, Line 95: $$(dirname "$$(dirname "$$(dirname "$(CURDIR)")")")
Isn't $(top) available here?
will check, was looking for something like that but couldn't find it at the time :)
https://review.coreboot.org/#/c/31561/1/payloads/external/tianocore/Makefile... PS1, Line 109: git checkout CorebootPayloadPkg/Logo/Logo.bmp > /dev/null 2>&1
It’s unlikely, but if changes were staged already, then this wouldn’t do anything. […]
I'd assume if there are staged changes, then the user doesn't want them overwritten. This is just to clear the bootslpash copied as part of the build process, which will definitely not be staged
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31561 )
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
Patch Set 1: Code-Review+1
Tested on GA-H61M-S2PV with a picture of a sunflower, it displayed properly.
Not +2'ing because of the pending comments, though.
Hello Patrick Rudolph, Angel Pons, Paul Menzel, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31561
to look at the new patch set (#3).
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
payloads/tianocore: Add option for custom bootsplash
Add Kconfig options to use custom bootsplash file, dependent on using MrChromebox's stable branch, with help info conveying required file format.
Adjust Makefile to copy the custom bootsplash and overwrite the default Logo.bmp file, handling both absolute and relative paths, and restore the original logo file after building so as to keep the working directory clean.
Test: build with and without custom bootsplash, ensure correct bootsplash displayed
Change-Id: I164f46777169801cff56633fd920bc81b7c8129a Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M payloads/external/Makefile.inc M payloads/external/tianocore/Kconfig M payloads/external/tianocore/Makefile 3 files changed, 32 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/31561/3
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31561 )
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31561 )
Change subject: payloads/tianocore: Add option for custom bootsplash ......................................................................
payloads/tianocore: Add option for custom bootsplash
Add Kconfig options to use custom bootsplash file, dependent on using MrChromebox's stable branch, with help info conveying required file format.
Adjust Makefile to copy the custom bootsplash and overwrite the default Logo.bmp file, handling both absolute and relative paths, and restore the original logo file after building so as to keep the working directory clean.
Test: build with and without custom bootsplash, ensure correct bootsplash displayed
Change-Id: I164f46777169801cff56633fd920bc81b7c8129a Signed-off-by: Matt DeVillier matt.devillier@gmail.com Reviewed-on: https://review.coreboot.org/c/31561 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M payloads/external/Makefile.inc M payloads/external/tianocore/Kconfig M payloads/external/tianocore/Makefile 3 files changed, 32 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 4fda725..5f9d800 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -135,6 +135,7 @@ CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \ CONFIG_TIANOCORE_TARGET_IA32=$(CONFIG_TIANOCORE_TARGET_IA32) \ CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \ + CONFIG_TIANOCORE_BOOTSPLASH_FILE=$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \ GCC_CC_x86_32=$(GCC_CC_x86_32) \ GCC_CC_x86_64=$(GCC_CC_x86_64) \ GCC_CC_arm=$(GCC_CC_arm) \ diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index 4347edb..d8b7d92 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -87,4 +87,24 @@ help Use 8254 Timer for legacy support.
+config TIANOCORE_BOOTSPLASH_IMAGE + bool "Use a custom bootsplash image" + depends on TIANOCORE_STABLE + help + Select this option if you have a bootsplash image that you would + like to be used. If this option is not selected, the default + coreboot logo (European Brown Hare) will used. + +config TIANOCORE_BOOTSPLASH_FILE + string "Tianocore Bootsplash path and filename" + depends on TIANOCORE_BOOTSPLASH_IMAGE + default "bootsplash.bmp" + help + The path and filename of the file to use as graphical bootsplash + screen. The file format must be uncompressed BMP, and the file's + resolution must be less than the native resolution of the display. + + If an absolute path is not given, the path will assumed to be + relative to the coreboot root directory. + endif diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index 87c48b1..06e8b68 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -81,6 +81,15 @@ build: update checktools unset CC; $(MAKE) -C $(project_dir)/BaseTools echo " build $(project_name) $(TAG-y)" + if [ -n $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) ]; then \ + echo " Copying custom bootsplash image"; \ + case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \ + /*) cp $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \ + $(project_dir)/CorebootPayloadPkg/Logo/Logo.bmp;; \ + *) cp $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \ + $(project_dir)/CorebootPayloadPkg/Logo/Logo.bmp;; \ + esac \ + fi; \ cd $(project_dir); \ export EDK_TOOLS_PATH=$(project_dir)/BaseTools; \ export WORKSPACE=$(project_dir); \ @@ -90,7 +99,8 @@ cat ../tools_def.txt >> $(project_dir)/Conf/tools_def.txt; \ fi; \ build $(BUILD_STR); \ - mv $(project_dir)/Build/CorebootPayloadPkg*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd + mv $(project_dir)/Build/CorebootPayloadPkg*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \ + git checkout CorebootPayloadPkg/Logo/Logo.bmp > /dev/null 2>&1
clean: test -d $(project_dir) && (cd $(project_dir); rm -rf Build; rm -f Conf/tools_def.txt) || exit 0