Don't include LZMA in romstage if ramstage is not compressed.

If ramstage is not compressed, the CBFS module in romstage doesn't
need to support LZMA. Removing the LZMA module in this case can save
about 3000 bytes in romstage.

Change-Id: Id6f7869e32979080e2985c07029edcb39eee9106
Signed-off-by: Andrew Wu <arw@dmp.com.tw>
Reviewed-on: http://review.coreboot.org/3878
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Andrew Wu 2013-08-19 11:43:36 +08:00 committed by Patrick Georgi
parent 4159a8012e
commit eabfd3a7c1
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ endif
romstage-y += memcmp.c romstage-y += memcmp.c
rmodules-y += memcmp.c rmodules-y += memcmp.c
romstage-y += cbfs.c romstage-y += cbfs.c
romstage-y += lzma.c romstage-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c
#romstage-y += lzmadecode.c #romstage-y += lzmadecode.c
romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c
romstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c romstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c

View File

@ -29,6 +29,8 @@
# define CBFS_MINI_BUILD # define CBFS_MINI_BUILD
#elif defined(__BOOT_BLOCK__) #elif defined(__BOOT_BLOCK__)
/* No LZMA in boot block. */ /* No LZMA in boot block. */
#elif defined(__PRE_RAM__) && !CONFIG_COMPRESS_RAMSTAGE
/* No LZMA in romstage if ramstage is not compressed. */
#else #else
# define CBFS_CORE_WITH_LZMA # define CBFS_CORE_WITH_LZMA
# include <lib.h> # include <lib.h>