summaryrefslogtreecommitdiff
path: root/util/cbfstool/common.h
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-08-15 16:05:50 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-08 19:38:26 +0100
commita90bd527d9c450974a7c3a45be026331927823cc (patch)
treef9714d759b7dc4b704ccf363f5a9f50fa0d64f8f /util/cbfstool/common.h
parent86bf3f518f445f686bb7405f052a0a93cddba16a (diff)
downloadcoreboot-a90bd527d9c450974a7c3a45be026331927823cc.tar.xz
cbfstool: add offset parameter to create command
CBFS allows coreboot rom images that are only partially covered by the filesystem itself. The intention of this feature was to allow EC / ME / IMC firmware to be inserted easily at the beginning of the image. However, this was never implemented in cbfstool. This patch implements an additional parameter for cbfstool. If you call cbfstool like this: cbfstool coreboot.rom create 8192K bootblock.bin 64 0x700000 it will now create an 8M image with CBFS covering the last 1M of that image. Test: cbfstool coreboot.rom create 8192K bootblock.bin 64 0x700000 creates an 8M image that is 7M of 0xff and 1M of CBFS. Change-Id: I5c016b4bf32433f160b43f4df2dd768276f4c70b Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1708 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r--util/cbfstool/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 296ab2dd05..7ef50c41e1 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -64,9 +64,10 @@ void *create_cbfs_file(const char *filename, void *data, uint32_t * datasize,
uint32_t type, uint32_t * location);
int create_cbfs_image(const char *romfile, uint32_t romsize,
- const char *bootblock, uint32_t align);
+ const char *bootblock, uint32_t align, uint32_t offs);
int add_file_to_cbfs(void *content, uint32_t contentsize, uint32_t location);
+int remove_file_from_cbfs(const char *filename);
void print_cbfs_directory(const char *filename);
int extract_file_from_cbfs(const char *filename, const char *payloadname, const char *outpath);
int remove_file_from_cbfs(const char *filename);