summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2008-02-29 15:59:59 +0100
committerMarian Balakowicz <m8@semihalf.com>2008-02-29 15:59:59 +0100
commit570abb0ad120f6002bcaa3cf6f32bd4ca2e1b248 (patch)
tree7948979e2750b78181aad30fd699cacb24b3043c /include
parent9a4daad0a35eb5143037eea9f786a3e9d672bdd6 (diff)
downloadu-boot-imx-570abb0ad120f6002bcaa3cf6f32bd4ca2e1b248.zip
u-boot-imx-570abb0ad120f6002bcaa3cf6f32bd4ca2e1b248.tar.gz
u-boot-imx-570abb0ad120f6002bcaa3cf6f32bd4ca2e1b248.tar.bz2
[new uImage] Share common uImage code between mkimage and U-boot
This patch adds the following common routines: 1) Dedicated mkimage print_header() is replaced with common image_print_contents() image_print_contents_noindent() 2) Common os/arch/type/comp fields name <--> id translation routines genimg_get_os_name() genimg_get_arch_name() genimg_get_type_name() genimg_get_comp_name() genimg_get_os_id() genimg_get_arch_id() genimg_get_type_id() genimg_get_comp_id() Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'include')
-rw-r--r--include/image.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/image.h b/include/image.h
index b520691..ed79552 100644
--- a/include/image.h
+++ b/include/image.h
@@ -219,6 +219,15 @@ typedef struct bootm_headers {
#define uimage_to_cpu(x) ntohl(x)
#define cpu_to_uimage(x) htonl(x)
+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);
+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);
+int genimg_get_type_id (const char *name);
+int genimg_get_comp_id (const char *name);
+
#ifndef USE_HOSTCC
/* Image format types, returned by _get_format() routine */
#define IMAGE_FORMAT_INVALID 0x00
@@ -228,11 +237,6 @@ typedef struct bootm_headers {
int genimg_get_format (void *img_addr);
ulong genimg_get_image (ulong img_addr);
-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);
-const char* genimg_get_comp_name (uint8_t comp);
-
int boot_get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
bootm_headers_t *images, uint8_t arch,
ulong *rd_start, ulong *rd_end);
@@ -245,7 +249,7 @@ int boot_get_cmdline (struct lmb *lmb, ulong *cmd_start, ulong *cmd_end,
ulong bootmap_base);
int boot_get_kbd (struct lmb *lmb, bd_t **kbd, ulong bootmap_base);
#endif /* CONFIG_PPC || CONFIG_M68K */
-#endif /* USE_HOSTCC */
+#endif /* !USE_HOSTCC */
/*******************************************************************/
/* Legacy format specific code (prefixed with image_) */
@@ -373,6 +377,9 @@ ulong image_multi_count (image_header_t *hdr);
void image_multi_getimg (image_header_t *hdr, ulong idx,
ulong *data, ulong *len);
+inline void image_print_contents (image_header_t *hdr);
+inline void image_print_contents_noindent (image_header_t *hdr);
+
#ifndef USE_HOSTCC
static inline int image_check_target_arch (image_header_t *hdr)
{
@@ -406,8 +413,6 @@ static inline int image_check_target_arch (image_header_t *hdr)
return 1;
}
-void image_print_contents (image_header_t *hdr);
-
/*******************************************************************/
/* New uImage format specific code (prefixed with fit_) */
/*******************************************************************/