summaryrefslogtreecommitdiff
path: root/util/cbfstool/common.h
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2013-01-29 15:22:11 +0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-02-05 22:27:20 +0100
commitc13e4bf3e16080993fb42399327501201c4f9f13 (patch)
tree40eaf22d9c69ea3409bfb812e9aff61a5f3e4902 /util/cbfstool/common.h
parent5f3eb26d857628615e6c92180a2dc2213011dd09 (diff)
downloadcoreboot-c13e4bf3e16080993fb42399327501201c4f9f13.tar.xz
cbfstool: Use cbfs_image API for "add-*" (add-payload, add-stage, ...) commands.
add-payload, add-stage, and add-flat-binary are now all using cbfs_image API. To test: cbfstool coreboot.rom add-stage -f FILE -n fallback/romstage -b 0xXXXX cbfstool coreboot.rom add-payload -f FILE -n fallback/pyload And compare with old cbfstool. Verified to boot on ARM(snow) and X86(qemu-i386). Change-Id: If65cb495c476ef6f9d90c778531f0c3caf178281 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: http://review.coreboot.org/2220 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r--util/cbfstool/common.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index a859e103f2..16c04c9c8e 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -98,14 +98,16 @@ comp_func_ptr compression_function(comp_algo algo);
uint64_t intfiletype(const char *name);
/* cbfs-mkpayload.c */
-int parse_elf_to_payload(unsigned char *input, unsigned char **output,
- comp_algo algo);
-int parse_flat_binary_to_payload(unsigned char *input, unsigned char **output,
- int32_t input_size, uint32_t loadaddress,
- uint32_t entrypoint, comp_algo algo);
+int parse_elf_to_payload(const struct buffer *input,
+ struct buffer *output, comp_algo algo);
+int parse_flat_binary_to_payload(const struct buffer *input,
+ struct buffer *output,
+ uint32_t loadaddress,
+ uint32_t entrypoint,
+ comp_algo algo);
/* cbfs-mkstage.c */
-int parse_elf_to_stage(unsigned char *input, unsigned char **output,
- comp_algo algo, uint32_t * location);
+int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
+ comp_algo algo, uint32_t *location);
void *create_cbfs_file(const char *filename, void *data, uint32_t * datasize,
uint32_t type, uint32_t * location);