* - loaded (first part of) image to header load address,
* - disabled interrupts.
*/
-typedef void boot_os_fn (cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+typedef int boot_os_fn (int flag, int argc, char *argv[],
bootm_headers_t *images); /* pointers to os/initrd/fdt */
extern boot_os_fn do_bootm_linux;
#ifdef CONFIG_SILENT_CONSOLE
fixup_silent_linux();
#endif
- do_bootm_linux (cmdtp, flag, argc, argv, &images);
+ do_bootm_linux (0, argc, argv, &images);
break;
case IH_OS_NETBSD:
- do_bootm_netbsd (cmdtp, flag, argc, argv, &images);
+ do_bootm_netbsd (0, argc, argv, &images);
break;
#ifdef CONFIG_LYNXKDI
case IH_OS_LYNXOS:
- do_bootm_lynxkdi (cmdtp, flag, argc, argv, &images);
+ do_bootm_lynxkdi (0, argc, argv, &images);
break;
#endif
case IH_OS_RTEMS:
- do_bootm_rtems (cmdtp, flag, argc, argv, &images);
+ do_bootm_rtems (0, argc, argv, &images);
break;
#if defined(CONFIG_CMD_ELF)
case IH_OS_VXWORKS:
- do_bootm_vxworks (cmdtp, flag, argc, argv, &images);
+ do_bootm_vxworks (0, argc, argv, &images);
break;
case IH_OS_QNX:
- do_bootm_qnxelf (cmdtp, flag, argc, argv, &images);
+ do_bootm_qnxelf (0, argc, argv, &images);
break;
#endif
#ifdef CONFIG_ARTOS
case IH_OS_ARTOS:
- do_bootm_artos (cmdtp, flag, argc, argv, &images);
+ do_bootm_artos (0, argc, argv, &images);
break;
#endif
}
show_boot_progress (-9);
#ifdef DEBUG
puts ("\n## Control returned to monitor - resetting...\n");
- do_reset (cmdtp, flag, argc, argv);
#endif
- if (iflag)
- enable_interrupts();
+ do_reset (cmdtp, flag, argc, argv);
return 1;
}
/* OS booting routines */
/*******************************************************************/
-static void do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+static int do_bootm_netbsd (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
void (*loader)(bd_t *, image_header_t *, char *, char *);
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("NetBSD");
- do_reset (cmdtp, flag, argc, argv);
+ return 1;
}
#endif
hdr = images->legacy_hdr_os;
* r6: boot args string
*/
(*loader) (gd->bd, os_hdr, consdev, cmdline);
+
+ return 1;
}
#ifdef CONFIG_LYNXKDI
-static void do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
image_header_t *hdr = &images->legacy_hdr_os_copy;
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("Lynx");
- do_reset (cmdtp, flag, argc, argv);
+ return 1;
}
#endif
lynxkdi_boot ((image_header_t *)hdr);
+
+ return 1;
}
#endif /* CONFIG_LYNXKDI */
-static void do_bootm_rtems (cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+static int do_bootm_rtems (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
void (*entry_point)(bd_t *);
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("RTEMS");
- do_reset (cmdtp, flag, argc, argv);
+ return 1;
}
#endif
* r3: ptr to board info data
*/
(*entry_point)(gd->bd);
+
+ return 1;
}
#if defined(CONFIG_CMD_ELF)
-static void do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+static int do_bootm_vxworks (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
char str[80];
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("VxWorks");
- do_reset (cmdtp, flag, argc, argv);
+ return 1;
}
#endif
sprintf(str, "%lx", images->ep); /* write entry-point into string */
setenv("loadaddr", str);
- do_bootvx(cmdtp, 0, 0, NULL);
+ do_bootvx(NULL, 0, 0, NULL);
+
+ return 1;
}
-static void do_bootm_qnxelf(cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+static int do_bootm_qnxelf(int flag, int argc, char *argv[],
bootm_headers_t *images)
{
char *local_args[2];
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("QNX");
- do_reset (cmdtp, flag, argc, argv);
+ return 1;
}
#endif
sprintf(str, "%lx", images->ep); /* write entry-point into string */
local_args[0] = argv[0];
local_args[1] = str; /* and provide it via the arguments */
- do_bootelf(cmdtp, 0, 2, local_args);
+ do_bootelf(NULL, 0, 2, local_args);
+
+ return 1;
}
#endif
#if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
-static void do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
- int argc, char *argv[],
+static int do_bootm_artos (int flag, int argc, char *argv[],
bootm_headers_t *images)
{
ulong top;
#if defined(CONFIG_FIT)
if (!images->legacy_hdr_valid) {
fit_unsupported_reset ("ARTOS");
- do_reset (cmdtp, flag, argc, argv);
+ return 1;
}
#endif
entry = (void (*)(bd_t *, char *, char **, ulong))images->ep;
(*entry) (kbd, cmdline, fwenv, top);
+
+ return 1;
}
#endif
static struct tag *params;
#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
-void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
bd_t *bd = gd->bd;
char *s;
theKernel (0, machid, bd->bi_boot_params);
/* does not return */
- return;
-
error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
/* CPU-specific hook to allow flushing of caches, etc. */
extern void prepare_to_boot(void);
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
static struct tag *setup_start_tag(struct tag *params)
{
params->hdr.tag = ATAG_CORE;
params->hdr.size = 0;
}
-void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
void (*theKernel)(int magic, void *tagtable);
struct tag *params, *params_start;
theKernel(ATAG_MAGIC, params_start);
/* does not return */
- return;
-
error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
#include <image.h>
#include <asm/blackfin.h>
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
#ifdef SHARED_RESOURCES
extern void swap_to(int device_id);
#endif
return dest;
}
-void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
int (*appl) (char *cmdline);
char *cmdline;
dcache_disable();
(*appl) (cmdline);
/* does not return */
- return;
-
- error:
- do_reset (cmdtp, flag, argc, argv);
+error:
+ return 1;
}
#include <asm/zimage.h>
/*cmd_boot.c*/
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
-void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
void *base_ptr;
ulong os_data, os_len;
boot_zimage(base_ptr);
/* does not return */
- return;
error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
static ulong get_sp (void);
static void set_clocks_in_mhz (bd_t *kbd);
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
- int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
ulong sp;
*/
(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
/* does not return */
- return ;
-
error:
- do_reset (cmdtp, flag, argc, argv);
- return ;
+ return 1;
}
static ulong get_sp (void)
DECLARE_GLOBAL_DATA_PTR;
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
-void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
/* First parameter is mapped to $r5 for kernel boot args */
void (*theKernel) (char *);
theKernel (commandline);
/* does not return */
- return;
-
error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
static void linux_params_init (ulong start, char * commandline);
static void linux_env_set (char * env_name, char * env_val);
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
-void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
void (*theKernel) (int, char **, char **, int *);
char *commandline = getenv ("bootargs");
char env_buf[12];
- int ret;
char *cp;
/* find kernel entry point */
theKernel (linux_argc, linux_argv, linux_env, 0);
/* does not return */
- return;
-
-error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
static void linux_params_init (ulong start, char *line)
* we can get this working. ;-)
*
*/
-void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
+ return 1;
}
#include <command.h>
#include <asm/byteorder.h>
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
-void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
void (*kernel)(void) = (void (*)(void))images->ep;
*/
kernel ();
/* does not return */
- return;
error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
DECLARE_GLOBAL_DATA_PTR;
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
extern ulong get_effective_memsize(void);
static ulong get_sp (void);
static void set_clocks_in_mhz (bd_t *kbd);
#define CFG_LINUX_LOWMEM_MAX_SIZE (768*1024*1024)
#endif
-void __attribute__((noinline))
-do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+__attribute__((noinline))
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
ulong sp;
cmd_start, cmd_end, 0, 0);
/* does not return */
}
- return ;
+ return 1;
error:
- do_reset (cmdtp, flag, argc, argv);
- return ;
+ return 1;
}
static ulong get_sp (void)
#define RAMDISK_IMAGE_START_MASK 0x07FF
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
#ifdef CFG_DEBUG
static void hexdump (unsigned char *buf, int len)
{
}
#endif
-void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
char *bootargs = getenv("bootargs");
kernel();
/* does not return */
- return;
error:
- do_reset (cmdtp, flag, argc, argv);
- return;
+ return 1;
}
extern image_header_t header;
extern void srmmu_init_cpu(unsigned int entry);
extern void prepare_bootargs(char *bootargs);
-extern int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]);
#ifdef CONFIG_USB_UHCI
extern int usb_lowlevel_stop(void);
image_header_t ihdr;
/* boot the linux kernel */
-void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
- bootm_headers_t * images)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images)
{
char *bootargs;
ulong initrd_start, initrd_end;
while (1) ;
error:
- do_reset(cmdtp, flag, argc, argv);
- return;
+ return 1;
}