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-mkpayload.c | |
parent | 9d0cc2aea918eced42dc3825c1ac94d0d4fbc380 (diff) | |
download | coreboot-d477565dbd6e9b6467f49c84a4f05047ffa22682.tar.xz |
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-mkpayload.c')
-rw-r--r-- | util/cbfstool/cbfs-mkpayload.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c index 86aa8e54a3..ae875f3634 100644 --- a/util/cbfstool/cbfs-mkpayload.c +++ b/util/cbfstool/cbfs-mkpayload.c @@ -51,7 +51,7 @@ void xdr_get_seg(struct cbfs_payload_segment *out, } int parse_elf_to_payload(const struct buffer *input, struct buffer *output, - enum comp_algo algo) + enum cbfs_compression algo) { Elf64_Phdr *phdr; Elf64_Ehdr ehdr; @@ -232,7 +232,7 @@ int parse_flat_binary_to_payload(const struct buffer *input, struct buffer *output, uint32_t loadaddress, uint32_t entrypoint, - enum comp_algo algo) + enum cbfs_compression algo) { comp_func_ptr compress; struct cbfs_payload_segment segs[2] = { {0} }; @@ -277,7 +277,7 @@ int parse_flat_binary_to_payload(const struct buffer *input, } int parse_fv_to_payload(const struct buffer *input, struct buffer *output, - enum comp_algo algo) + enum cbfs_compression algo) { comp_func_ptr compress; struct cbfs_payload_segment segs[2] = { {0} }; @@ -405,7 +405,7 @@ int parse_fv_to_payload(const struct buffer *input, struct buffer *output, } int parse_fit_to_payload(const struct buffer *input, struct buffer *output, - enum comp_algo algo) + enum cbfs_compression algo) { struct fdt_header *fdt_h; |