summaryrefslogtreecommitdiff
path: root/include/image.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-06-23 15:38:25 -0600
committerSimon Glass <sjg@chromium.org>2015-07-21 17:39:20 -0600
commit5b9d44df2307fc882b2ae666fd28fb2c7c2d5b11 (patch)
treef4ca52645425ea7121c524895d9f4a7c484970f9 /include/image.h
parenta3c3cff06c392aa2226ae67b160c80a43c28656a (diff)
mkimage: Display a better list of available image types
Offer to display the available image types in help. Also, rather than hacking the genimg_get_type_id() function to display a list of types, do this in the tool. Also, sort the list. The list of image types is quite long, and hard to discover. Print it out when we show help information. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h
index b6eb57e1878..63c3d37f20f 100644
--- a/include/image.h
+++ b/include/image.h
@@ -246,6 +246,8 @@ struct lmb;
#define IH_TYPE_LPC32XXIMAGE 21 /* x86 setup.bin Image */
#define IH_TYPE_LOADABLE 22 /* A list of typeless images */
+#define IH_TYPE_COUNT 23 /* Number of image types */
+
/*
* Compression Types
*/
@@ -411,6 +413,15 @@ char *get_table_entry_name(const table_entry_t *table, char *msg, int id);
const char *genimg_get_os_name(uint8_t os);
const char *genimg_get_arch_name(uint8_t arch);
const char *genimg_get_type_name(uint8_t type);
+
+/**
+ * genimg_get_type_short_name() - get the short name for an image type
+ *
+ * @param type Image type (IH_TYPE_...)
+ * @return image short name, or "unknown" if unknown
+ */
+const char *genimg_get_type_short_name(uint8_t type);
+
const char *genimg_get_comp_name(uint8_t comp);
int genimg_get_os_id(const char *name);
int genimg_get_arch_id(const char *name);