]> git.sur5r.net Git - u-boot/blobdiff - include/image.h
dtoc: Add a way for tests to request the fallback library
[u-boot] / include / image.h
index 5879ebcd7a567d483a2b7c7c92327553b0ce4c1d..2b1296c86c9407d13e2126f99ebfac85b2d1fece 100644 (file)
@@ -134,6 +134,9 @@ enum ih_category {
 
 /*
  * Operating System Codes
+ *
+ * The following are exposed to uImage header.
+ * Do not change values for backward compatibility.
  */
 enum {
        IH_OS_INVALID           = 0,    /* Invalid OS   */
@@ -167,6 +170,9 @@ enum {
 
 /*
  * CPU Architecture Codes (supported by Linux)
+ *
+ * The following are exposed to uImage header.
+ * Do not change values for backward compatibility.
  */
 enum {
        IH_ARCH_INVALID         = 0,    /* Invalid CPU  */
@@ -182,6 +188,7 @@ enum {
        IH_ARCH_SPARC,                  /* Sparc        */
        IH_ARCH_SPARC64,                /* Sparc 64 Bit */
        IH_ARCH_M68K,                   /* M68K         */
+       IH_ARCH_NIOS,                   /* Nios-32      */
        IH_ARCH_MICROBLAZE,             /* MicroBlaze   */
        IH_ARCH_NIOS2,                  /* Nios-II      */
        IH_ARCH_BLACKFIN,               /* Blackfin     */
@@ -193,6 +200,7 @@ enum {
        IH_ARCH_ARM64,                  /* ARM64        */
        IH_ARCH_ARC,                    /* Synopsys DesignWare ARC */
        IH_ARCH_X86_64,                 /* AMD x86_64, Intel and Via */
+       IH_ARCH_XTENSA,                 /* Xtensa       */
 
        IH_ARCH_COUNT,
 };
@@ -234,6 +242,9 @@ enum {
  *     U-Boot's command interpreter; this feature is especially
  *     useful when you configure U-Boot to use a real shell (hush)
  *     as command interpreter (=> Shell Scripts).
+ *
+ * The following are exposed to uImage header.
+ * Do not change values for backward compatibility.
  */
 
 enum {
@@ -267,12 +278,16 @@ enum {
        IH_TYPE_ZYNQIMAGE,              /* Xilinx Zynq Boot Image */
        IH_TYPE_ZYNQMPIMAGE,            /* Xilinx ZynqMP Boot Image */
        IH_TYPE_FPGA,                   /* FPGA Image */
+       IH_TYPE_VYBRIDIMAGE,    /* VYBRID .vyb Image */
 
        IH_TYPE_COUNT,                  /* Number of image types */
 };
 
 /*
  * Compression Types
+ *
+ * The following are exposed to uImage header.
+ * Do not change values for backward compatibility.
  */
 enum {
        IH_COMP_NONE            = 0,    /*  No   Compression Used       */
@@ -478,6 +493,40 @@ const char *genimg_get_comp_name(uint8_t comp);
  */
 const char *genimg_get_comp_short_name(uint8_t comp);
 
+/**
+ * genimg_get_cat_name() - Get the name of an item in a category
+ *
+ * @category:  Category of item
+ * @id:                Item ID
+ * @return name of item, or "Unknown ..." if unknown
+ */
+const char *genimg_get_cat_name(enum ih_category category, uint id);
+
+/**
+ * genimg_get_cat_short_name() - Get the short name of an item in a category
+ *
+ * @category:  Category of item
+ * @id:                Item ID
+ * @return short name of item, or "Unknown ..." if unknown
+ */
+const char *genimg_get_cat_short_name(enum ih_category category, uint id);
+
+/**
+ * genimg_get_cat_count() - Get the number of items in a category
+ *
+ * @category:  Category to check
+ * @return the number of items in the category (IH_xxx_COUNT)
+ */
+int genimg_get_cat_count(enum ih_category category);
+
+/**
+ * genimg_get_cat_desc() - Get the description of a category
+ *
+ * @return the description of a category, e.g. "architecture". This
+ * effectively converts the enum to a string.
+ */
+const char *genimg_get_cat_desc(enum ih_category category);
+
 int genimg_get_os_id(const char *name);
 int genimg_get_arch_id(const char *name);
 int genimg_get_type_id(const char *name);