summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/cbfs-mkstage.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-03-13 16:43:34 -0700
committerJulius Werner <jwerner@chromium.org>2020-12-03 00:00:33 +0000
commitd477565dbd6e9b6467f49c84a4f05047ffa22682 (patch)
tree864556875c6b3e15b5cb35193db29af542ae7e8e /util/cbfstool/cbfs-mkstage.c
parent9d0cc2aea918eced42dc3825c1ac94d0d4fbc380 (diff)
downloadcoreboot-d477565dbd6e9b6467f49c84a4f05047ffa22682.tar.gz
coreboot-d477565dbd6e9b6467f49c84a4f05047ffa22682.tar.bz2
coreboot-d477565dbd6e9b6467f49c84a4f05047ffa22682.zip
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index bfdffbfeea04..bfe7bf8c33a9 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;