summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/cbfstool.c7
-rw-r--r--util/cbfstool/common.c12
-rw-r--r--util/cbfstool/common.h1
3 files changed, 17 insertions, 3 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 1f71906ef621..7156e00bc63a 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -1350,10 +1350,11 @@ static void usage(char *name)
" in two possible formats: if their value is greater than\n"
" 0x80000000, they are interpreted as a top-aligned x86 memory\n"
" address; otherwise, they are treated as an offset into flash.\n"
- "ARCHes:\n"
- " arm64, arm, mips, x86\n"
- "TYPEs:\n", name, name
+ "ARCHes:\n", name, name
);
+ print_supported_architectures();
+
+ printf("TYPEs:\n");
print_supported_filetypes();
printf(
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 72ff745f1d05..14ccaa95842d 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -168,6 +168,18 @@ const char *arch_to_string(uint32_t a)
return ret;
}
+void print_supported_architectures(void)
+{
+ size_t i;
+
+ for (i = 0; i < ARRAY_SIZE(arch_names); i++) {
+ printf(i == 0? " ":", ");
+ printf("%s", arch_names[i].name);
+ }
+
+ printf("\n");
+}
+
void print_supported_filetypes(void)
{
int i, number = ARRAY_SIZE(filetypes);
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 85dfdeb5894a..8bae63e08ef1 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -204,6 +204,7 @@ int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
int parse_elf_to_xip_stage(const struct buffer *input, struct buffer *output,
uint32_t *location, const char *ignore_section);
+void print_supported_architectures(void);
void print_supported_filetypes(void);
/* lzma/lzma.c */