payloads: Add an option to compress secondary payloads
Both GRUB and SeaBIOS can chainload lzma compressed payloads. Therefore it is beneficial to compress secondary payloads like Memtest86+, coreinfo, nvramcui,... for both size reasons and often also speed reasons since the limiting factor is generally the IO of the boot device. Tested with SeaBIOS and memtest86+ master on Thinkpad X220. Change-Id: Iddfd6fcf4112d255cc7b2b49b99bf5ea4d6f8db4 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/23639 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
9be42b5953
commit
47dd96db97
|
@ -350,6 +350,11 @@ ifeq ($(CONFIG_COMPRESSED_PAYLOAD_LZ4),y)
|
||||||
CBFS_PAYLOAD_COMPRESS_FLAG:=LZ4
|
CBFS_PAYLOAD_COMPRESS_FLAG:=LZ4
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG:=none
|
||||||
|
ifeq ($(CONFIG_COMPRESS_SECONDARY_PAYLOAD),y)
|
||||||
|
CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG:=LZMA
|
||||||
|
endif
|
||||||
|
|
||||||
CBFS_PRERAM_COMPRESS_FLAG:=none
|
CBFS_PRERAM_COMPRESS_FLAG:=none
|
||||||
ifeq ($(CONFIG_COMPRESS_PRERAM_STAGES),y)
|
ifeq ($(CONFIG_COMPRESS_PRERAM_STAGES),y)
|
||||||
CBFS_PRERAM_COMPRESS_FLAG:=LZ4
|
CBFS_PRERAM_COMPRESS_FLAG:=LZ4
|
||||||
|
|
|
@ -82,6 +82,13 @@ config PAYLOAD_IS_FLAT_BINARY
|
||||||
Add the payload to cbfs as a flat binary type instead of as an
|
Add the payload to cbfs as a flat binary type instead of as an
|
||||||
elf payload
|
elf payload
|
||||||
|
|
||||||
|
config COMPRESS_SECONDARY_PAYLOAD
|
||||||
|
bool "Use LZMA compression for secondary payloads"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
In order to reduce the size secondary payloads take up in the
|
||||||
|
ROM chip they can be compressed using the LZMA algorithm.
|
||||||
|
|
||||||
menu "Secondary Payloads"
|
menu "Secondary Payloads"
|
||||||
|
|
||||||
config COREINFO_SECONDARY_PAYLOAD
|
config COREINFO_SECONDARY_PAYLOAD
|
||||||
|
|
|
@ -16,10 +16,12 @@
|
||||||
cbfs-files-$(CONFIG_COREINFO_SECONDARY_PAYLOAD) += img/coreinfo
|
cbfs-files-$(CONFIG_COREINFO_SECONDARY_PAYLOAD) += img/coreinfo
|
||||||
img/coreinfo-file := payloads/coreinfo/build/coreinfo.elf
|
img/coreinfo-file := payloads/coreinfo/build/coreinfo.elf
|
||||||
img/coreinfo-type := payload
|
img/coreinfo-type := payload
|
||||||
|
img/coreinfo-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
|
||||||
|
|
||||||
cbfs-files-$(CONFIG_NVRAMCUI_SECONDARY_PAYLOAD) += img/nvramcui
|
cbfs-files-$(CONFIG_NVRAMCUI_SECONDARY_PAYLOAD) += img/nvramcui
|
||||||
img/nvramcui-file := payloads/nvramcui/nvramcui.elf
|
img/nvramcui-file := payloads/nvramcui/nvramcui.elf
|
||||||
img/nvramcui-type := payload
|
img/nvramcui-type := payload
|
||||||
|
img/nvramcui-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
|
||||||
|
|
||||||
PAYLOADS_LIST=\
|
PAYLOADS_LIST=\
|
||||||
payloads/coreinfo \
|
payloads/coreinfo \
|
||||||
|
|
|
@ -185,12 +185,14 @@ payloads/external/tint/tint/tint.elf tint:
|
||||||
cbfs-files-$(CONFIG_TINT_SECONDARY_PAYLOAD) += img/tint
|
cbfs-files-$(CONFIG_TINT_SECONDARY_PAYLOAD) += img/tint
|
||||||
img/tint-file := payloads/external/tint/tint/tint.elf
|
img/tint-file := payloads/external/tint/tint/tint.elf
|
||||||
img/tint-type := payload
|
img/tint-type := payload
|
||||||
|
img/tint-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
|
||||||
|
|
||||||
# Memtest86+
|
# Memtest86+
|
||||||
|
|
||||||
cbfs-files-$(CONFIG_MEMTEST_SECONDARY_PAYLOAD) += img/memtest
|
cbfs-files-$(CONFIG_MEMTEST_SECONDARY_PAYLOAD) += img/memtest
|
||||||
img/memtest-file := payloads/external/Memtest86Plus/memtest86plus/memtest
|
img/memtest-file := payloads/external/Memtest86Plus/memtest86plus/memtest
|
||||||
img/memtest-type := payload
|
img/memtest-type := payload
|
||||||
|
img/memtest-compression := $(CBFS_SECONDARY_PAYLOAD_COMPRESS_FLAG)
|
||||||
|
|
||||||
ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
|
ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
|
||||||
MEMTEST_SERIAL_OPTIONS=SERIAL_CONSOLE_DEFAULT=1 \
|
MEMTEST_SERIAL_OPTIONS=SERIAL_CONSOLE_DEFAULT=1 \
|
||||||
|
|
Loading…
Reference in New Issue