[coreboot-gerrit] Patch merged into coreboot/master: cbfstool: allow compression at file header level
gerrit at coreboot.org
gerrit at coreboot.org
Tue Sep 1 14:51:24 CET 2015
the following patch was just integrated into master:
commit 8984a637c121d06a408a5f2b3b9d5233a7aa0e6e
Author: Daisuke Nojiri <dnojiri at chromium.org>
Date: Thu Jul 9 15:07:45 2015 -0700
cbfstool: allow compression at file header level
Currently, compression is only allowed at subheader level (e.g. cbfs_stage,
cbfs_payload_segment). This change adds compression field to each file's
header so that any cbfs file can be compressed.
With the necessary additions in coreboot and libpayload, the following sample
code can load a compressed file:
const char *name = "foo.bmp";
struct cbfs_file *file = cbfs_get_file(media, name);
void *dst = malloc(ntohl(file->uncompressed_size));
dst = cbfs_get_file_content(media, name, type, file, dst);
cbfs_stage and cbfs_payload_segment continue to support compression at
subheader level because stages and payloads have to be decompressed to the load
address, which is stored in the subheader. For these, file level compression
should be turned off.
Change-Id: I9a00ec99dfc68ffb2771bb4a3cc5ba6ba8a326f4
Signed-off-by: Daisuke Nojiri <dnojiri at chromium.org>
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Reviewed-on: http://review.coreboot.org/10935
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
See http://review.coreboot.org/10935 for details.
-gerrit
More information about the coreboot-gerrit
mailing list