[U-Boot] [RFC PATCH v2 09/20] sandbox: Add bootm support
Simon Glass
sjg at chromium.org
Fri Sep 23 18:22:11 CEST 2011
This adds sandbox architecture support to bootm, although it is probably
not useful to load sandbox code into the address space and execute it.
This change at least make the file build correctly on 64-bit machines.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Fix cast of int to pointer instead of just removing the code
common/cmd_bootm.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 8909ee7..47bd505 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -187,6 +187,8 @@ void arch_preboot_os(void) __attribute__((weak, alias("__arch_preboot_os")));
#define IH_INITRD_ARCH IH_ARCH_SH
#elif defined(__sparc__)
#define IH_INITRD_ARCH IH_ARCH_SPARC
+#elif defined(CONFIG_SANDBOX_ARCH)
+ #define IH_INITRD_ARCH IH_ARCH_SANDBOX
#else
# error Unknown CPU type
#endif
@@ -462,9 +464,8 @@ static int bootm_start_standalone(ulong iflag, int argc, char * const argv[])
setenv("filesize", buf);
return 0;
}
- appl = (int (*)(int, char * const []))ntohl(images.ep);
+ appl = (int (*)(int, char * const []))(ulong)ntohl(images.ep);
(*appl)(argc-1, &argv[1]);
-
return 0;
}
@@ -488,14 +489,14 @@ static cmd_tbl_t cmd_bootm_sub[] = {
int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int ret = 0;
- int state;
+ long state;
cmd_tbl_t *c;
boot_os_fn *boot_fn;
c = find_cmd_tbl(argv[1], &cmd_bootm_sub[0], ARRAY_SIZE(cmd_bootm_sub));
if (c) {
- state = (int)c->cmd;
+ state = (long)c->cmd;
/* treat start special since it resets the state machine */
if (state == BOOTM_STATE_START) {
--
1.7.3.1
More information about the U-Boot
mailing list