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-mkstage.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-mkstage.c')
-rw-r--r-- | util/cbfstool/cbfs-mkstage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c index bfdffbfeea..bfe7bf8c33 100644 --- a/util/cbfstool/cbfs-mkstage.c +++ b/util/cbfstool/cbfs-mkstage.c @@ -73,7 +73,7 @@ static Elf64_Shdr *find_ignored_section_header(struct parsed_elf *pelf, return NULL; } -static void fill_cbfs_stage(struct buffer *outheader, enum comp_algo algo, +static void fill_cbfs_stage(struct buffer *outheader, enum cbfs_compression algo, uint64_t entry, uint64_t loadaddr, uint32_t filesize, uint32_t memsize) { @@ -93,7 +93,7 @@ static void fill_cbfs_stage(struct buffer *outheader, enum comp_algo algo, * works for all elf files, not just the restricted set. */ int parse_elf_to_stage(const struct buffer *input, struct buffer *output, - enum comp_algo algo, uint32_t *location, + enum cbfs_compression algo, uint32_t *location, const char *ignore_section) { struct parsed_elf pelf; |