2 * (C) Copyright 2000-2006
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
36 #include <environment.h>
37 #include <asm/byteorder.h>
39 #if defined(CONFIG_OF_LIBFDT)
42 #include <fdt_support.h>
43 #elif defined(CONFIG_OF_FLAT_TREE)
47 DECLARE_GLOBAL_DATA_PTR;
50 extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
52 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
56 #ifdef CFG_HUSH_PARSER
60 #ifdef CONFIG_HAS_DATAFLASH
61 #include <dataflash.h>
64 int gunzip (void *, int, unsigned char *, unsigned long *);
67 extern void bz_internal_error(int);
70 #if defined(CONFIG_CMD_IMI)
71 static int image_info (unsigned long addr);
74 #if defined(CONFIG_CMD_IMLS)
76 extern flash_info_t flash_info[]; /* info for FLASH chips */
77 static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
80 static void print_type (image_header_t *hdr);
83 image_header_t *fake_header(image_header_t *hdr, void *ptr, int size);
87 * Continue booting an OS image; caller already has:
88 * - copied image header to global variable `header'
89 * - checked header magic number, checksums (both header & image),
90 * - verified image architecture (PPC) and type (KERNEL or MULTI),
91 * - loaded (first part of) image to header load address,
92 * - disabled interrupts.
94 typedef void boot_os_Fcn (cmd_tbl_t *cmdtp, int flag,
95 int argc, char *argv[],
96 ulong addr, /* of image to boot */
97 ulong *len_ptr, /* multi-file image length table */
98 int verify); /* getenv("verify")[0] != 'n' */
100 extern boot_os_Fcn do_bootm_linux;
102 #ifdef CONFIG_SILENT_CONSOLE
103 static void fixup_silent_linux (void);
105 static boot_os_Fcn do_bootm_netbsd;
106 static boot_os_Fcn do_bootm_rtems;
107 #if defined(CONFIG_CMD_ELF)
108 static boot_os_Fcn do_bootm_vxworks;
109 static boot_os_Fcn do_bootm_qnxelf;
110 int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
111 int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
113 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
114 static boot_os_Fcn do_bootm_artos;
116 #ifdef CONFIG_LYNXKDI
117 static boot_os_Fcn do_bootm_lynxkdi;
118 extern void lynxkdi_boot( image_header_t * );
121 #ifndef CFG_BOOTM_LEN
122 #define CFG_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */
125 image_header_t header;
127 ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */
129 int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
135 uint unc_len = CFG_BOOTM_LEN;
138 int (*appl)(int, char *[]);
139 image_header_t *hdr = &header;
141 verify = getenv_verify ();
146 addr = simple_strtoul(argv[1], NULL, 16);
149 show_boot_progress (1);
150 printf ("## Booting image at %08lx ...\n", addr);
152 /* Copy header so we can blank CRC field for re-calculation */
153 #ifdef CONFIG_HAS_DATAFLASH
154 if (addr_dataflash(addr)){
155 read_dataflash (addr, image_get_header_size (), (char *)&header);
158 memmove (&header, (char *)addr, image_get_header_size ());
160 if (!image_check_magic (hdr)) {
161 #ifdef __I386__ /* correct image format not implemented yet - fake it */
162 if (fake_header(hdr, (void*)addr, -1) != NULL) {
163 /* to compensate for the addition below */
164 addr -= image_get_header_size ();
166 * fake_header() does not fake the data crc
170 #endif /* __I386__ */
172 puts ("Bad Magic Number\n");
173 show_boot_progress (-1);
177 show_boot_progress (2);
179 if (!image_check_hcrc (hdr)) {
180 puts ("Bad Header Checksum\n");
181 show_boot_progress (-2);
184 show_boot_progress (3);
186 #ifdef CONFIG_HAS_DATAFLASH
187 if (addr_dataflash(addr)){
188 len = image_get_image_size (hdr);
189 read_dataflash(addr, len, (char *)CFG_LOAD_ADDR);
190 addr = CFG_LOAD_ADDR;
195 /* for multi-file images we need the data part, too */
196 print_image_hdr ((image_header_t *)addr);
198 len = image_get_data_size (hdr);
199 data = addr + image_get_header_size ();
200 len_ptr = (ulong *)data;
203 puts (" Verifying Checksum ... ");
204 if (!image_check_dcrc ((image_header_t *)addr)) {
205 printf ("Bad Data CRC\n");
206 show_boot_progress (-3);
211 show_boot_progress (4);
213 if (!image_check_target_arch (hdr)) {
214 printf ("Unsupported Architecture 0x%x\n", image_get_arch (hdr));
215 show_boot_progress (-4);
218 show_boot_progress (5);
220 switch (image_get_type (hdr)) {
221 case IH_TYPE_STANDALONE:
222 name = "Standalone Application";
223 /* A second argument overwrites the load address */
225 image_set_load (hdr, simple_strtoul (argv[2], NULL, 16));
229 name = "Kernel Image";
232 name = "Multi-File Image";
233 len = image_to_cpu (len_ptr[0]);
234 /* OS kernel is always the first image */
235 data += 8; /* kernel_len + terminator */
236 for (i=1; len_ptr[i]; ++i)
239 default: printf ("Wrong Image Type for %s command\n", cmdtp->name);
240 show_boot_progress (-5);
243 show_boot_progress (6);
246 * We have reached the point of no return: we are going to
247 * overwrite all exception vector code, so we cannot easily
248 * recover from any failures any more...
251 iflag = disable_interrupts();
253 #ifdef CONFIG_AMIGAONEG3SE
255 * We've possible left the caches enabled during
256 * bios emulation, so turn them off again
259 invalidate_l1_instruction_cache();
264 switch (image_get_comp (hdr)) {
266 if (image_get_load (hdr) == addr) {
267 printf (" XIP %s ... ", name);
269 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
271 void *to = (void *)image_get_load (hdr);
272 void *from = (void *)data;
274 printf (" Loading %s ... ", name);
277 size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l;
279 memmove (to, from, tail);
284 #else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
285 memmove ((void *)image_get_load (hdr), (uchar *)data, len);
286 #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
290 printf (" Uncompressing %s ... ", name);
291 if (gunzip ((void *)image_get_load (hdr), unc_len,
292 (uchar *)data, &len) != 0) {
293 puts ("GUNZIP ERROR - must RESET board to recover\n");
294 show_boot_progress (-6);
295 do_reset (cmdtp, flag, argc, argv);
300 printf (" Uncompressing %s ... ", name);
302 * If we've got less than 4 MB of malloc() space,
303 * use slower decompression algorithm which requires
304 * at most 2300 KB of memory.
306 i = BZ2_bzBuffToBuffDecompress ((char*)image_get_load (hdr),
307 &unc_len, (char *)data, len,
308 CFG_MALLOC_LEN < (4096 * 1024), 0);
310 printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);
311 show_boot_progress (-6);
312 do_reset (cmdtp, flag, argc, argv);
315 #endif /* CONFIG_BZIP2 */
319 printf ("Unimplemented compression type %d\n", image_get_comp (hdr));
320 show_boot_progress (-7);
324 show_boot_progress (7);
326 switch (image_get_type (hdr)) {
327 case IH_TYPE_STANDALONE:
331 /* load (and uncompress), but don't start if "autostart"
334 if (((s = getenv("autostart")) != NULL) && (strcmp(s,"no") == 0)) {
336 sprintf(buf, "%lX", len);
337 setenv("filesize", buf);
340 appl = (int (*)(int, char *[]))image_get_ep (hdr);
341 (*appl)(argc-1, &argv[1]);
350 printf ("Can't boot image type %d\n", image_get_type (hdr));
351 show_boot_progress (-8);
354 show_boot_progress (8);
356 switch (image_get_os (hdr)) {
357 default: /* handled by (original) Linux case */
359 #ifdef CONFIG_SILENT_CONSOLE
360 fixup_silent_linux();
362 do_bootm_linux (cmdtp, flag, argc, argv,
363 addr, len_ptr, verify);
366 do_bootm_netbsd (cmdtp, flag, argc, argv,
367 addr, len_ptr, verify);
370 #ifdef CONFIG_LYNXKDI
372 do_bootm_lynxkdi (cmdtp, flag, argc, argv,
373 addr, len_ptr, verify);
378 do_bootm_rtems (cmdtp, flag, argc, argv,
379 addr, len_ptr, verify);
382 #if defined(CONFIG_CMD_ELF)
384 do_bootm_vxworks (cmdtp, flag, argc, argv,
385 addr, len_ptr, verify);
388 do_bootm_qnxelf (cmdtp, flag, argc, argv,
389 addr, len_ptr, verify);
394 do_bootm_artos (cmdtp, flag, argc, argv,
395 addr, len_ptr, verify);
400 show_boot_progress (-9);
402 puts ("\n## Control returned to monitor - resetting...\n");
403 do_reset (cmdtp, flag, argc, argv);
409 bootm, CFG_MAXARGS, 1, do_bootm,
410 "bootm - boot application image from memory\n",
411 "[addr [arg ...]]\n - boot application image stored in memory\n"
412 "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
413 "\t'arg' can be the address of an initrd image\n"
414 #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
415 "\tWhen booting a Linux kernel which requires a flat device-tree\n"
416 "\ta third argument is required which is the address of the\n"
417 "\tdevice-tree blob. To boot that kernel without an initrd image,\n"
418 "\tuse a '-' for the second argument. If you do not pass a third\n"
419 "\ta bd_info struct will be passed instead\n"
423 #ifdef CONFIG_SILENT_CONSOLE
425 fixup_silent_linux ()
427 char buf[256], *start, *end;
428 char *cmdline = getenv ("bootargs");
430 /* Only fix cmdline when requested */
431 if (!(gd->flags & GD_FLG_SILENT))
434 debug ("before silent fix-up: %s\n", cmdline);
436 if ((start = strstr (cmdline, "console=")) != NULL) {
437 end = strchr (start, ' ');
438 strncpy (buf, cmdline, (start - cmdline + 8));
440 strcpy (buf + (start - cmdline + 8), end);
442 buf[start - cmdline + 8] = '\0';
444 strcpy (buf, cmdline);
445 strcat (buf, " console=");
448 strcpy (buf, "console=");
451 setenv ("bootargs", buf);
452 debug ("after silent fix-up: %s\n", buf);
454 #endif /* CONFIG_SILENT_CONSOLE */
457 do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
458 int argc, char *argv[],
463 image_header_t *hdr = &header;
465 void (*loader)(bd_t *, image_header_t *, char *, char *);
466 image_header_t *img_addr;
472 * Booting a (NetBSD) kernel image
474 * This process is pretty similar to a standalone application:
475 * The (first part of an multi-) image must be a stage-2 loader,
476 * which in turn is responsible for loading & invoking the actual
477 * kernel. The only differences are the parameters being passed:
478 * besides the board info strucure, the loader expects a command
479 * line, the name of the console device, and (optionally) the
480 * address of the original image header.
484 if ((image_check_type (hdr, IH_TYPE_MULTI)) && (len_ptr[1]))
485 img_addr = (image_header_t *) addr;
489 #if defined (CONFIG_8xx_CONS_SMC1)
491 #elif defined (CONFIG_8xx_CONS_SMC2)
493 #elif defined (CONFIG_8xx_CONS_SCC2)
495 #elif defined (CONFIG_8xx_CONS_SCC3)
503 for (i=2, len=0 ; i<argc ; i+=1)
504 len += strlen (argv[i]) + 1;
505 cmdline = malloc (len);
507 for (i=2, len=0 ; i<argc ; i+=1) {
509 cmdline[len++] = ' ';
510 strcpy (&cmdline[len], argv[i]);
511 len += strlen (argv[i]);
513 } else if ((cmdline = getenv("bootargs")) == NULL) {
517 loader = (void (*)(bd_t *, image_header_t *, char *, char *))image_get_ep (hdr);
519 printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n",
522 show_boot_progress (15);
525 * NetBSD Stage-2 Loader Parameters:
526 * r3: ptr to board info data
529 * r6: boot args string
531 (*loader) (gd->bd, img_addr, consdev, cmdline);
534 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
536 /* Function that returns a character from the environment */
537 extern uchar (*env_get_char)(int);
540 do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
541 int argc, char *argv[],
549 int i, j, nxt, len, envno, envsz;
551 void (*entry)(bd_t *bd, char *cmdline, char **fwenv, ulong top);
552 image_header_t *hdr = &header;
555 * Booting an ARTOS kernel image + application
558 /* this used to be the top of memory, but was wrong... */
560 /* get stack pointer */
561 asm volatile ("mr %0,1" : "=r"(top) );
563 debug ("## Current stack ends at 0x%08lX ", top);
565 top -= 2048; /* just to be sure */
566 if (top > CFG_BOOTMAPSZ)
570 debug ("=> set upper limit to 0x%08lX\n", top);
572 /* first check the artos specific boot args, then the linux args*/
573 if ((s = getenv("abootargs")) == NULL && (s = getenv("bootargs")) == NULL)
576 /* get length of cmdline, and place it */
578 top = (top - (len + 1)) & ~0xF;
579 cmdline = (char *)top;
580 debug ("## cmdline at 0x%08lX ", top);
584 top = (top - sizeof(bd_t)) & ~0xF;
585 debug ("## bd at 0x%08lX ", top);
587 memcpy(kbd, gd->bd, sizeof(bd_t));
589 /* first find number of env entries, and their size */
592 for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
593 for (nxt = i; env_get_char(nxt) != '\0'; ++nxt)
596 envsz += (nxt - i) + 1; /* plus trailing zero */
598 envno++; /* plus the terminating zero */
599 debug ("## %u envvars total size %u ", envno, envsz);
601 top = (top - sizeof(char **)*envno) & ~0xF;
602 fwenv = (char **)top;
603 debug ("## fwenv at 0x%08lX ", top);
605 top = (top - envsz) & ~0xF;
610 for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
611 for (nxt = i; env_get_char(nxt) != '\0'; ++nxt)
614 for (j = i; j < nxt; ++j)
615 *s++ = env_get_char(j);
618 *ss++ = NULL; /* terminate */
620 entry = (void (*)(bd_t *, char *, char **, ulong))image_get_ep (hdr);
621 (*entry)(kbd, cmdline, fwenv, top);
626 #if defined(CONFIG_CMD_BOOTD)
627 int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
630 #ifndef CFG_HUSH_PARSER
631 if (run_command (getenv ("bootcmd"), flag) < 0) rcode = 1;
633 if (parse_string_outer(getenv("bootcmd"),
634 FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0 ) rcode = 1;
640 boot, 1, 1, do_bootd,
641 "boot - boot default, i.e., run 'bootcmd'\n",
645 /* keep old command name "bootd" for backward compatibility */
647 bootd, 1, 1, do_bootd,
648 "bootd - boot default, i.e., run 'bootcmd'\n",
654 #if defined(CONFIG_CMD_IMI)
655 int do_iminfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
662 return image_info (load_addr);
665 for (arg=1; arg <argc; ++arg) {
666 addr = simple_strtoul(argv[arg], NULL, 16);
667 if (image_info (addr) != 0) rcode = 1;
672 static int image_info (ulong addr)
674 image_header_t *hdr = (image_header_t *)addr;
676 printf ("\n## Checking Image at %08lx ...\n", addr);
678 if (!image_check_magic (hdr)) {
679 puts (" Bad Magic Number\n");
683 if (!image_check_hcrc (hdr)) {
684 puts (" Bad Header Checksum\n");
688 print_image_hdr (hdr);
690 puts (" Verifying Checksum ... ");
691 if (!image_check_dcrc (hdr)) {
692 puts (" Bad Data CRC\n");
700 iminfo, CFG_MAXARGS, 1, do_iminfo,
701 "iminfo - print header information for application image\n",
703 " - print header information for application image starting at\n"
704 " address 'addr' in memory; this includes verification of the\n"
705 " image contents (magic number, header and payload checksums)\n"
710 #if defined(CONFIG_CMD_IMLS)
711 /*-----------------------------------------------------------------------
712 * List all images found in flash.
714 int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
720 for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
721 if (info->flash_id == FLASH_UNKNOWN)
723 for (j=0; j<info->sector_count; ++j) {
725 hdr = (image_header_t *)info->start[j];
727 if (!hdr || !image_check_magic (hdr))
730 if (!image_check_hcrc (hdr))
733 printf ("Image at %08lX:\n", (ulong)hdr);
734 print_image_hdr (hdr);
736 puts (" Verifying Checksum ... ");
737 if (!image_check_dcrc (hdr)) {
738 puts ("Bad Data CRC\n");
752 "imls - list all images found in flash\n",
754 " - Prints information about all images found at sector\n"
755 " boundaries in flash.\n"
760 print_image_hdr (image_header_t *hdr)
762 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
763 time_t timestamp = (time_t)image_get_time (hdr);
767 printf (" Image Name: %.*s\n", IH_NMLEN, image_get_name (hdr));
768 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
769 to_tm (timestamp, &tm);
770 printf (" Created: %4d-%02d-%02d %2d:%02d:%02d UTC\n",
771 tm.tm_year, tm.tm_mon, tm.tm_mday,
772 tm.tm_hour, tm.tm_min, tm.tm_sec);
774 puts (" Image Type: "); print_type(hdr);
775 printf ("\n Data Size: %d Bytes = ", image_get_data_size (hdr));
776 print_size (image_get_data_size (hdr), "\n");
777 printf (" Load Address: %08x\n"
778 " Entry Point: %08x\n",
779 image_get_load (hdr), image_get_ep (hdr));
781 if (image_check_type (hdr, IH_TYPE_MULTI)) {
784 ulong *len_ptr = (ulong *)((ulong)hdr + image_get_header_size ());
786 puts (" Contents:\n");
787 for (i=0; (len = image_to_cpu (*len_ptr)); ++i, ++len_ptr) {
788 printf (" Image %d: %8ld Bytes = ", i, len);
789 print_size (len, "\n");
796 print_type (image_header_t *hdr)
798 char *os, *arch, *type, *comp;
800 switch (image_get_os (hdr)) {
801 case IH_OS_INVALID: os = "Invalid OS"; break;
802 case IH_OS_NETBSD: os = "NetBSD"; break;
803 case IH_OS_LINUX: os = "Linux"; break;
804 case IH_OS_VXWORKS: os = "VxWorks"; break;
805 case IH_OS_QNX: os = "QNX"; break;
806 case IH_OS_U_BOOT: os = "U-Boot"; break;
807 case IH_OS_RTEMS: os = "RTEMS"; break;
809 case IH_OS_ARTOS: os = "ARTOS"; break;
811 #ifdef CONFIG_LYNXKDI
812 case IH_OS_LYNXOS: os = "LynxOS"; break;
814 default: os = "Unknown OS"; break;
817 switch (image_get_arch (hdr)) {
818 case IH_ARCH_INVALID: arch = "Invalid CPU"; break;
819 case IH_ARCH_ALPHA: arch = "Alpha"; break;
820 case IH_ARCH_ARM: arch = "ARM"; break;
821 case IH_ARCH_AVR32: arch = "AVR32"; break;
822 case IH_ARCH_BLACKFIN: arch = "Blackfin"; break;
823 case IH_ARCH_I386: arch = "Intel x86"; break;
824 case IH_ARCH_IA64: arch = "IA64"; break;
825 case IH_ARCH_M68K: arch = "M68K"; break;
826 case IH_ARCH_MICROBLAZE:arch = "Microblaze"; break;
827 case IH_ARCH_MIPS64: arch = "MIPS 64 Bit"; break;
828 case IH_ARCH_MIPS: arch = "MIPS"; break;
829 case IH_ARCH_NIOS2: arch = "Nios-II"; break;
830 case IH_ARCH_NIOS: arch = "Nios"; break;
831 case IH_ARCH_PPC: arch = "PowerPC"; break;
832 case IH_ARCH_S390: arch = "IBM S390"; break;
833 case IH_ARCH_SH: arch = "SuperH"; break;
834 case IH_ARCH_SPARC64: arch = "SPARC 64 Bit"; break;
835 case IH_ARCH_SPARC: arch = "SPARC"; break;
836 default: arch = "Unknown Architecture"; break;
839 switch (image_get_type (hdr)) {
840 case IH_TYPE_INVALID: type = "Invalid Image"; break;
841 case IH_TYPE_STANDALONE:type = "Standalone Program"; break;
842 case IH_TYPE_KERNEL: type = "Kernel Image"; break;
843 case IH_TYPE_RAMDISK: type = "RAMDisk Image"; break;
844 case IH_TYPE_MULTI: type = "Multi-File Image"; break;
845 case IH_TYPE_FIRMWARE: type = "Firmware"; break;
846 case IH_TYPE_SCRIPT: type = "Script"; break;
847 case IH_TYPE_FLATDT: type = "Flat Device Tree"; break;
848 default: type = "Unknown Image"; break;
851 switch (image_get_comp (hdr)) {
852 case IH_COMP_NONE: comp = "uncompressed"; break;
853 case IH_COMP_GZIP: comp = "gzip compressed"; break;
854 case IH_COMP_BZIP2: comp = "bzip2 compressed"; break;
855 default: comp = "unknown compression"; break;
858 printf ("%s %s %s (%s)", arch, os, type, comp);
862 do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
863 ulong addr, ulong *len_ptr, int verify)
865 image_header_t *hdr = &header;
866 void (*entry_point)(bd_t *);
868 entry_point = (void (*)(bd_t *))image_get_ep (hdr);
870 printf ("## Transferring control to RTEMS (at address %08lx) ...\n",
873 show_boot_progress (15);
877 * r3: ptr to board info data
880 (*entry_point ) ( gd->bd );
883 #if defined(CONFIG_CMD_ELF)
885 do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
886 ulong addr, ulong *len_ptr, int verify)
888 image_header_t *hdr = &header;
891 sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */
892 setenv("loadaddr", str);
893 do_bootvx(cmdtp, 0, 0, NULL);
897 do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
898 ulong addr, ulong *len_ptr, int verify)
900 image_header_t *hdr = &header;
904 sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */
905 local_args[0] = argv[0];
906 local_args[1] = str; /* and provide it via the arguments */
907 do_bootelf(cmdtp, 0, 2, local_args);
911 #ifdef CONFIG_LYNXKDI
913 do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag,
914 int argc, char *argv[],
919 lynxkdi_boot( &header );
922 #endif /* CONFIG_LYNXKDI */