diff --git a/Kconfig b/Kconfig index 295c30a0c0..c889de8670 100644 --- a/Kconfig +++ b/Kconfig @@ -148,5 +148,13 @@ config PAYLOAD_PREPARSE_ELF payload in, coreboot can not parse it. We hope to remove ELF entirely in the future. +config ZERO_AFTER_PAYLOAD + bool "Zero fill lar after adding the payload" + depends PAYLOAD_ELF + default n + help + This option speeds booting but makes it so that no further files may + be added to the lar. + endmenu diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f95d465674..31a6222b93 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -86,6 +86,10 @@ else $(Q)cd $(obj)/lar.tmp && \ ../util/lar/lar $(PARSEELF) $(COMPRESSFLAG) -a \ ../coreboot.rom normal/payload; +endif +ifeq ($(CONFIG_ZERO_AFTER_PAYLOAD),y) + $(Q)printf " ZEROING lar -z ./coreboot.rom\n" + $(Q)cd $(obj) && ./util/lar/lar -z ./coreboot.rom endif $(Q)# QEMU wants bios.bin: $(Q)# Run "qemu -L build/ -serial stdio -hda /dev/zero".