diff options
author | Julius Werner <jwerner@chromium.org> | 2020-03-13 16:43:34 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2020-12-03 00:00:33 +0000 |
commit | d477565dbd6e9b6467f49c84a4f05047ffa22682 (patch) | |
tree | 864556875c6b3e15b5cb35193db29af542ae7e8e /util/cbfstool/cbfs-payload-linux.c | |
parent | 9d0cc2aea918eced42dc3825c1ac94d0d4fbc380 (diff) |
cbfstool: Use cbfs_serialized.h and standard vboot helpers
This patch reduces some code duplication in cbfstool by switching it to
use the CBFS data structure definitions in commonlib rather than its own
private copy. In addition, replace a few custom helpers related to hash
algorithms with the official vboot APIs of the same purpose.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I22eae1bcd76d85fff17749617cfe4f1de55603f4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41117
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Diffstat (limited to 'util/cbfstool/cbfs-payload-linux.c')
-rw-r--r-- | util/cbfstool/cbfs-payload-linux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/cbfstool/cbfs-payload-linux.c b/util/cbfstool/cbfs-payload-linux.c index 706f3a0253..9a29e68d9e 100644 --- a/util/cbfstool/cbfs-payload-linux.c +++ b/util/cbfstool/cbfs-payload-linux.c @@ -34,14 +34,14 @@ struct bzpayload { struct buffer cmdline; struct buffer initrd; /* Output variables. */ - enum comp_algo algo; + enum cbfs_compression algo; comp_func_ptr compress; struct buffer output; size_t offset; struct cbfs_payload_segment *out_seg; }; -static int bzp_init(struct bzpayload *bzp, enum comp_algo algo) +static int bzp_init(struct bzpayload *bzp, enum cbfs_compression algo) { memset(bzp, 0, sizeof(*bzp)); @@ -186,7 +186,7 @@ static void bzp_output_segment(struct bzpayload *bzp, struct buffer *b, */ int parse_bzImage_to_payload(const struct buffer *input, struct buffer *output, const char *initrd_name, - char *cmdline, enum comp_algo algo) + char *cmdline, enum cbfs_compression algo) { struct bzpayload bzp; unsigned int initrd_base = 64*1024*1024; |