Martin Roth (gaumless@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10604
-gerrit
commit 6463ea4d815c4430c661dd1c86ad015587c083d9 Author: Martin Roth gaumless@gmail.com Date: Fri Jun 19 20:11:07 2015 -0600
SeaBIOS: Allow an expert local-managed build
This tries to address many of the issues I have with the current coreboot-managed SeaBIOS builds: 1) SeaBIOS is re-built on every build, even when nothing changed. If you set SeaBIOS as a payload, and run two makes in a row, the only thing that gets built the second time is SeaBIOS. 2) SeaBIOS is checked out again on every build, so if something in the seabios directory is modified, the coreboot build fails. If the user is building on a system that doesn't have git installed, the build fails. 3) The SeaBIOS configuration is updated on every build, so even if I wanted to customize my SeaBIOS configuration, it would get overwritten on the next build.
This change addresses each of these issues. 1) SeaBIOS only gets rebuilt if seabios/out/bios.bin.elf is missing. 2) This doesn't ever check-out SeaBIOS, and doesn't use git. It throws an error and fails if the seabios directory is missing. 3) This doesn't modify the SeaBIOS .config. It throws an error if there is no seabios/.config file.
In an attempt to cut down on issues and complaints about the option, it's set it to an 'EXPERT' level config option, so most people won't even ever see it.
Similar to the PAYLOAD_ELF or PAYLOAD_LINUX options, this is not reproducable, so it probably shouldn't be used when building for board-status.
Change-Id: I85ccc193cbf7bc0675af1ce6cbd6276dfdb6de0d Signed-off-by: Martin Roth gaumless@gmail.com --- payloads/external/SeaBIOS/Makefile.inc | 31 +++++++++++++++++++++++++++---- src/Kconfig | 16 ++++++++++++---- src/arch/x86/Makefile.inc | 1 + 3 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/payloads/external/SeaBIOS/Makefile.inc b/payloads/external/SeaBIOS/Makefile.inc index 4d2367e..7cd2b03 100644 --- a/payloads/external/SeaBIOS/Makefile.inc +++ b/payloads/external/SeaBIOS/Makefile.inc @@ -10,10 +10,6 @@ unexport KCONFIG_NEGATIVES
all: build
-seabios: - echo " Cloning SeaBIOS from Git" - git clone http://review.coreboot.org/p/seabios.git seabios - fetch: seabios cd seabios; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \ then echo " Fetching new commits from the SeaBIOS git repo"; git fetch; fi @@ -45,10 +41,37 @@ endif #echo "# CONFIG_SMBIOS is not set" >> seabios/.config $(MAKE) -C seabios olddefconfig OUT=out/
+ifeq ($(CONFIG_SEABIOS_USER_MANAGED),) + +seabios: + echo " Cloning SeaBIOS from Git" + git clone http://review.coreboot.org/p/seabios.git seabios + build: config echo " MAKE SeaBIOS $(TAG-y)" $(MAKE) -C seabios OUT=out/
+else # User-managed SeaBIOS configuration + +seabios: + @printf "\nError: No local version of SeaBIOS exists in:\n" + @printf " $$(pwd)/seabios\n" + @printf " Please select a different version of SeaBIOS in Kconfig\n" + @printf " or put a copy of SeaBIOS in that location.\n\n" + false # halt the build. + +seabios/.config: + @printf "\nError: SeaBIOS .config does not exist. Run the SeaBIOS 'make menuconfig'.\n\n" + false # halt the build. + +seabios/out/bios.bin.elf: seabios/.config + echo " MAKE SeaBIOS" + $(MAKE) -C seabios OUT=out/ + +build: seabios seabios/out/bios.bin.elf + +endif # User-managed SeaBIOS configuration + clean: test -d seabios && $(MAKE) -C seabios clean OUT=out/ || exit 0
diff --git a/src/Kconfig b/src/Kconfig index b7d2e67..d4e0012 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -715,11 +715,19 @@ config SEABIOS_MASTER bool "master" help Newest SeaBIOS version +config SEABIOS_USER_MANAGED + bool "User-managed local version" if EXPERT + help + Use the SeaBIOS version in payloads/external/Seabios/seabios + This option will not update the seabios directory with git. + It will only rebuild SeaBIOS if there is no bios.bin.elf + already built. The user will need to set up their own SeaBIOS + .config.
endchoice
config SEABIOS_PS2_TIMEOUT - prompt "PS/2 keyboard controller initialization timeout (milliseconds)" if PAYLOAD_SEABIOS + prompt "PS/2 keyboard controller initialization timeout (milliseconds)" if PAYLOAD_SEABIOS && !SEABIOS_USER_MANAGED default 0 depends on EXPERT int @@ -729,7 +737,7 @@ config SEABIOS_PS2_TIMEOUT keyboard controller to become ready before giving up.
config SEABIOS_THREAD_OPTIONROMS - prompt "Hardware init during option ROM execution" if PAYLOAD_SEABIOS + prompt "Hardware init during option ROM execution" if PAYLOAD_SEABIOS && !SEABIOS_USER_MANAGED default n bool help @@ -742,7 +750,7 @@ config SEABIOS_THREAD_OPTIONROMS config SEABIOS_MALLOC_UPPERMEMORY bool default y - depends on PAYLOAD_SEABIOS + depends on PAYLOAD_SEABIOS && !SEABIOS_USER_MANAGED help Use the "Upper Memory Block" area (0xc0000-0xf0000) for internal "low memory" allocations. If this is not selected, the memory is @@ -753,7 +761,7 @@ config SEABIOS_MALLOC_UPPERMEMORY set to 'N' by the chipset Kconfig.
config SEABIOS_VGA_COREBOOT - prompt "Include generated option rom that implements legacy VGA BIOS compatibility" if PAYLOAD_SEABIOS + prompt "Include generated option rom that implements legacy VGA BIOS compatibility" if PAYLOAD_SEABIOS && !SEABIOS_USER_MANAGED default n depends on !VGA_BIOS && (MAINBOARD_DO_NATIVE_VGA_INIT || MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG) bool diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 4c00162..cd5d2b3 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -319,6 +319,7 @@ seabios: AS="$(AS_x86_32)" \ CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \ CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \ + CONFIG_SEABIOS_USER_MANAGED=$(CONFIG_SEABIOS_USER_MANAGED) \ CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \ CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \ CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \