From d950f5191d1f7a0bd3a495cb630deda647d4245c Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Mon, 25 Jul 2016 09:53:35 -0700 Subject: lib: Don't require ULZMA compression for postcar The build fails during postcar when ULZMA compression is not selected. Fix cbfs.c to support LZ compression for ramstage as well. The build error is: build/postcar/lib/cbfs.o: In function `cbfs_load_and_decompress': /home/lee/coreboot/public/src/lib/cbfs.c:116: undefined reference to `ulzman' make: *** [build/cbfs/fallback/postcar.debug] Error 1 TEST=Build and run on Galileo Gen2 Change-Id: I7fa8ff33c0d32e0c5ff5de7918e13e6efb1df38e Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/15841 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/lib/cbfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index aa652c2ee4..b8575f31d1 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -104,9 +104,9 @@ size_t cbfs_load_and_decompress(const struct region_device *rdev, size_t offset, case CBFS_COMPRESS_LZMA: if (ENV_BOOTBLOCK || ENV_VERSTAGE) return 0; - if (ENV_ROMSTAGE && !IS_ENABLED(CONFIG_COMPRESS_RAMSTAGE)) + if ((ENV_ROMSTAGE || ENV_POSTCAR) + && !IS_ENABLED(CONFIG_COMPRESS_RAMSTAGE)) return 0; - void *map = rdev_mmap(rdev, offset, in_size); if (map == NULL) return 0; -- cgit v1.2.3