[U-Boot] [RFC PATCH 02/20] sandbox: Add architecture image support

Simon Glass sjg at chromium.org
Sat Sep 17 18:48:41 CEST 2011


We won't actually load an image with this architecture, but we still need to
define it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
 common/image.c  |    5 +++--
 include/image.h |    3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/image.c b/common/image.c
index d38ce4a..8283561 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1581,7 +1581,7 @@ int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *imag
 			goto error;
 		}
 
-		printf ("   Booting using the fdt blob at 0x%x\n", (int)fdt_blob);
+		printf("   Booting using the fdt blob at 0x%p\n", fdt_blob);
 
 	} else if (images->legacy_hdr_valid &&
 			image_check_type (&images->legacy_hdr_os_copy, IH_TYPE_MULTI)) {
@@ -1600,7 +1600,8 @@ int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *imag
 		if (fdt_len) {
 
 			fdt_blob = (char *)fdt_data;
-			printf ("   Booting using the fdt at 0x%x\n", (int)fdt_blob);
+			printf("   Booting using the fdt at 0x%p\n",
+				fdt_blob);
 
 			if (fdt_check_header (fdt_blob) != 0) {
 				fdt_error ("image is not a fdt");
diff --git a/include/image.h b/include/image.h
index 352e4a0..c7fbb88 100644
--- a/include/image.h
+++ b/include/image.h
@@ -106,6 +106,7 @@
 #define IH_ARCH_BLACKFIN	16	/* Blackfin	*/
 #define IH_ARCH_AVR32		17	/* AVR32	*/
 #define IH_ARCH_ST200	        18	/* STMicroelectronics ST200  */
+#define IH_ARCH_SANDBOX		19	/* Sandbox architecture (test only) */
 
 /*
  * Image Types
@@ -506,6 +507,8 @@ static inline int image_check_target_arch (const image_header_t *hdr)
 	if (!image_check_arch (hdr, IH_ARCH_SH))
 #elif defined(__sparc__)
 	if (!image_check_arch (hdr, IH_ARCH_SPARC))
+#elif defined(CONFIG_SANDBOX_ARCH)
+	if (0)
 #else
 # error Unknown CPU type
 #endif
-- 
1.7.3.1



More information about the U-Boot mailing list