From c13e4bf3e16080993fb42399327501201c4f9f13 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Tue, 29 Jan 2013 15:22:11 +0800 Subject: 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 Reviewed-on: http://review.coreboot.org/2220 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/cbfstool/common.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'util/cbfstool/common.h') 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); -- cgit v1.2.3