summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-04-20 21:38:11 +0000
committerMyles Watson <mylesgw@gmail.com>2009-04-20 21:38:11 +0000
commitfeaaedc1cf99c12b8d1ab4bb233a311044d7f8b0 (patch)
tree0cfe0d7189dbc3351ac08daae8422246a1bf7012 /util/cbfstool/cbfstool.c
parent2cecce5740a23327a1095c6cba6e295e4b4d2963 (diff)
This patch adds
cbfstool extract [FILE] [NAME] It also factors out the csize calculation in rom_add, and fixes rom_delete so that it can handle deleting the last entry. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4144 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool/cbfstool.c')
-rw-r--r--util/cbfstool/cbfstool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index b9915e3fac..cbf448163f 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -20,6 +20,7 @@
/* v2 compat: First, assumes a 64K bootblock.
* cbfstool coreboot.rom create 0x80000 coreboot.strip
* cbfstool coreboot.rom add-payload /tmp/filo.elf payload
+ * cbfstool coreboot.rom extract new_filo.elf payload
* cbfstool coreboot.rom print
*/
@@ -34,6 +35,7 @@ extern int create_handler(struct rom *, int, char **);
extern int bootblock_handler(struct rom *, int, char **);
extern int print_handler(struct rom *, int, char **);
extern int add_handler(struct rom *, int, char **);
+extern int extract_handler(struct rom *, int, char **);
extern int delete_handler(struct rom *, int, char **);
extern int resize_handler(struct rom *, int, char **);
extern int add_payload_handler(struct rom *, int, char **);
@@ -44,6 +46,7 @@ extern void bootblock_usage(void);
extern void print_usage(void);
extern void add_usage(void);
extern void delete_usage(void);
+extern void extract_usage(void);
extern void resize_usage(void);
extern void add_payload_usage(void);
extern void add_stage_usage(void);
@@ -60,6 +63,7 @@ struct {
"bootblock", bootblock_handler, bootblock_usage}, {
"create", create_handler, create_usage}, {
"delete", delete_handler, delete_usage}, {
+ "extract", extract_handler, extract_usage}, {
"print", print_handler, print_usage}, {
"resize", resize_handler, resize_usage}, {
"", NULL},};