[coreboot-gerrit] New patch to review for coreboot: lib: Don't require ULZMA compression for ramstage

Lee Leahy (leroy.p.leahy@intel.com) gerrit at coreboot.org
Mon Jul 25 21:39:10 CEST 2016


Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15841

-gerrit

commit c244e4773dadee54f958d55d2af10443c0dcd944
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date:   Mon Jul 25 09:53:35 2016 -0700

    lib: Don't require ULZMA compression for ramstage
    
    The build fails for postcar when ULZMA compression is not selected.
    Fix cbfs.c to support LZ compression for ramstage as well.
    
    TEST=Build and run on Galileo Gen2
    
    Change-Id: I7fa8ff33c0d32e0c5ff5de7918e13e6efb1df38e
    Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
 src/lib/cbfs.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index aa652c2..2933aee 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -104,14 +104,16 @@ 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 (!IS_ENABLED(CONFIG_COMPRESS_RAMSTAGE))
 			return 0;
-
 		void *map = rdev_mmap(rdev, offset, in_size);
+
 		if (map == NULL)
 			return 0;
 
-		/* Note: timestamp not useful for memory-mapped media (x86) */
+		/* Note: timestamp not useful for memory-mapped media
+		 * (x86)
+		 */
 		timestamp_add_now(TS_START_ULZMA);
 		out_size = ulzman(map, in_size, buffer, buffer_size);
 		timestamp_add_now(TS_END_ULZMA);



More information about the coreboot-gerrit mailing list