[U-Boot] [PATCH v3 03/21] sandbox: Add architecture image support

Simon Glass sjg at chromium.org
Tue Sep 27 02:10:37 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>
---
Changes in v3:
- Add architecture image support for sandbox

 include/image.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/image.h b/include/image.h
index 352e4a0..2cf7243 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
@@ -484,7 +485,9 @@ void image_print_contents (const void *hdr);
 #ifndef USE_HOSTCC
 static inline int image_check_target_arch (const image_header_t *hdr)
 {
-#if defined(__ARM__)
+#if defined(CONFIG_SANDBOX_ARCH)
+	if (!image_check_arch(hdr, IH_ARCH_SANDBOX))
+#elif defined(__ARM__)
 	if (!image_check_arch (hdr, IH_ARCH_ARM))
 #elif defined(__avr32__)
 	if (!image_check_arch (hdr, IH_ARCH_AVR32))
@@ -636,7 +639,9 @@ void fit_conf_print (const void *fit, int noffset, const char *p);
 #ifndef USE_HOSTCC
 static inline int fit_image_check_target_arch (const void *fdt, int node)
 {
-#if defined(__ARM__)
+#if defined(CONFIG_SANDBOX_ARCH)
+	if (!fit_image_check_arch(fdt, node, IH_ARCH_SANDBOX))
+#elif defined(__ARM__)
 	if (!fit_image_check_arch (fdt, node, IH_ARCH_ARM))
 #elif defined(__avr32__)
 	if (!fit_image_check_arch (fdt, node, IH_ARCH_AVR32))
-- 
1.7.3.1



More information about the U-Boot mailing list