Add option 'compress ramstage'
authorSven Schnelle <svens@stackframe.org>
Mon, 2 May 2011 19:53:04 +0000 (19:53 +0000)
committerSven Schnelle <svens@stackframe.org>
Mon, 2 May 2011 19:53:04 +0000 (19:53 +0000)
Add an option to make compression of ramstage configurable. Right now
it is always compressed. On my Thinkpad, the complete boot to grub takes
4s, with around 1s required for decompressing ramstage. This is probably
caused by the fact the decompression does a lot of single byte/word/qword
accesses, which are really slow on SPI buses. So give the user the option
to store ramstage uncompressed, if he has enough memory.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6552 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

Makefile.inc
src/Kconfig

index 6c4a16ac0cbc93aef451d06967d1a13d1692ef7c..62675398841c8e96832ea7546bed876735d29917 100644 (file)
@@ -85,7 +85,11 @@ cbfs-files-handler= \
 
 #######################################################################
 # a variety of flags for our build
+CBFS_COMPRESS_FLAG:=
+ifeq ($(CONFIG_COMPRESS_RAMSTAGE),y)
 CBFS_COMPRESS_FLAG:=l
+endif
+
 CBFS_PAYLOAD_COMPRESS_FLAG:=
 CBFS_PAYLOAD_COMPRESS_NAME:=none
 ifeq ($(CONFIG_COMPRESSED_PAYLOAD_LZMA),y)
index 76e77f84014edb0c3abb44429d29e8590b00629a..9abbc2169da546a56dbd0830961875dbfd77ad85 100644 (file)
@@ -98,6 +98,14 @@ config USE_OPTION_TABLE
          Enable this option if coreboot shall read options from the "CMOS"
          NVRAM instead of using hard coded values.
 
+config COMPRESS_RAMSTAGE
+       bool "Compress ramstage with LZMA"
+       default y
+       help
+         Compress ramstage to save memory in the flash image. Note
+         that decompression might slow down booting if the boot flash
+         is connected through a slow Link (i.e. SPI)
+
 endmenu
 
 source src/mainboard/Kconfig