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>
65 * Some systems (for example LWMON) have very short watchdog periods;
66 * we must make sure to split long operations like memmove() or
67 * crc32() into reasonable chunks.
69 #define CHUNKSZ (64 * 1024)
71 int gunzip (void *, int, unsigned char *, unsigned long *);
74 extern void bz_internal_error(int);
77 #if defined(CONFIG_CMD_IMI)
78 static int image_info (unsigned long addr);
81 #if defined(CONFIG_CMD_IMLS)
83 extern flash_info_t flash_info[]; /* info for FLASH chips */
84 static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
87 static void print_type (image_header_t *hdr);
90 image_header_t *fake_header(image_header_t *hdr, void *ptr, int size);
94 * Continue booting an OS image; caller already has:
95 * - copied image header to global variable `header'
96 * - checked header magic number, checksums (both header & image),
97 * - verified image architecture (PPC) and type (KERNEL or MULTI),
98 * - loaded (first part of) image to header load address,
99 * - disabled interrupts.
101 typedef void boot_os_Fcn (cmd_tbl_t *cmdtp, int flag,
102 int argc, char *argv[],
103 ulong addr, /* of image to boot */
104 ulong *len_ptr, /* multi-file image length table */
105 int verify); /* getenv("verify")[0] != 'n' */
107 extern boot_os_Fcn do_bootm_linux;
109 #ifdef CONFIG_SILENT_CONSOLE
110 static void fixup_silent_linux (void);
112 static boot_os_Fcn do_bootm_netbsd;
113 static boot_os_Fcn do_bootm_rtems;
114 #if defined(CONFIG_CMD_ELF)
115 static boot_os_Fcn do_bootm_vxworks;
116 static boot_os_Fcn do_bootm_qnxelf;
117 int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
118 int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
120 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
121 static boot_os_Fcn do_bootm_artos;
123 #ifdef CONFIG_LYNXKDI
124 static boot_os_Fcn do_bootm_lynxkdi;
125 extern void lynxkdi_boot( image_header_t * );
128 #ifndef CFG_BOOTM_LEN
129 #define CFG_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */
132 image_header_t header;
134 ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */
136 int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
142 uint unc_len = CFG_BOOTM_LEN;
145 int (*appl)(int, char *[]);
146 image_header_t *hdr = &header;
148 verify = getenv_verify ();
153 addr = simple_strtoul(argv[1], NULL, 16);
156 show_boot_progress (1);
157 printf ("## Booting image at %08lx ...\n", addr);
159 /* Copy header so we can blank CRC field for re-calculation */
160 #ifdef CONFIG_HAS_DATAFLASH
161 if (addr_dataflash(addr)){
162 read_dataflash (addr, image_get_header_size (), (char *)&header);
165 memmove (&header, (char *)addr, image_get_header_size ());
167 if (!image_check_magic (hdr)) {
168 #ifdef __I386__ /* correct image format not implemented yet - fake it */
169 if (fake_header(hdr, (void*)addr, -1) != NULL) {
170 /* to compensate for the addition below */
171 addr -= image_get_header_size ();
173 * fake_header() does not fake the data crc
177 #endif /* __I386__ */
179 puts ("Bad Magic Number\n");
180 show_boot_progress (-1);
184 show_boot_progress (2);
186 if (!image_check_hcrc (hdr)) {
187 puts ("Bad Header Checksum\n");
188 show_boot_progress (-2);
191 show_boot_progress (3);
193 #ifdef CONFIG_HAS_DATAFLASH
194 if (addr_dataflash(addr)){
195 len = image_get_image_size (hdr);
196 read_dataflash(addr, len, (char *)CFG_LOAD_ADDR);
197 addr = CFG_LOAD_ADDR;
202 /* for multi-file images we need the data part, too */
203 print_image_hdr ((image_header_t *)addr);
205 len = image_get_data_size (hdr);
206 data = addr + image_get_header_size ();
207 len_ptr = (ulong *)data;
210 puts (" Verifying Checksum ... ");
211 if (!image_check_dcrc ((image_header_t *)addr)) {
212 printf ("Bad Data CRC\n");
213 show_boot_progress (-3);
218 show_boot_progress (4);
220 if (!image_check_target_arch (hdr)) {
221 printf ("Unsupported Architecture 0x%x\n", image_get_arch (hdr));
222 show_boot_progress (-4);
225 show_boot_progress (5);
227 switch (image_get_type (hdr)) {
228 case IH_TYPE_STANDALONE:
229 name = "Standalone Application";
230 /* A second argument overwrites the load address */
232 image_set_load (hdr, simple_strtoul (argv[2], NULL, 16));
236 name = "Kernel Image";
239 name = "Multi-File Image";
240 len = image_to_cpu (len_ptr[0]);
241 /* OS kernel is always the first image */
242 data += 8; /* kernel_len + terminator */
243 for (i=1; len_ptr[i]; ++i)
246 default: printf ("Wrong Image Type for %s command\n", cmdtp->name);
247 show_boot_progress (-5);
250 show_boot_progress (6);
253 * We have reached the point of no return: we are going to
254 * overwrite all exception vector code, so we cannot easily
255 * recover from any failures any more...
258 iflag = disable_interrupts();
260 #ifdef CONFIG_AMIGAONEG3SE
262 * We've possible left the caches enabled during
263 * bios emulation, so turn them off again
266 invalidate_l1_instruction_cache();
271 switch (image_get_comp (hdr)) {
273 if (image_get_load (hdr) == addr) {
274 printf (" XIP %s ... ", name);
276 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
278 void *to = (void *)image_get_load (hdr);
279 void *from = (void *)data;
281 printf (" Loading %s ... ", name);
284 size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l;
286 memmove (to, from, tail);
291 #else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
292 memmove ((void *)image_get_load (hdr), (uchar *)data, len);
293 #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
297 printf (" Uncompressing %s ... ", name);
298 if (gunzip ((void *)image_get_load (hdr), unc_len,
299 (uchar *)data, &len) != 0) {
300 puts ("GUNZIP ERROR - must RESET board to recover\n");
301 show_boot_progress (-6);
302 do_reset (cmdtp, flag, argc, argv);
307 printf (" Uncompressing %s ... ", name);
309 * If we've got less than 4 MB of malloc() space,
310 * use slower decompression algorithm which requires
311 * at most 2300 KB of memory.
313 i = BZ2_bzBuffToBuffDecompress ((char*)image_get_load (hdr),
314 &unc_len, (char *)data, len,
315 CFG_MALLOC_LEN < (4096 * 1024), 0);
317 printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);
318 show_boot_progress (-6);
319 do_reset (cmdtp, flag, argc, argv);
322 #endif /* CONFIG_BZIP2 */
326 printf ("Unimplemented compression type %d\n", image_get_comp (hdr));
327 show_boot_progress (-7);
331 show_boot_progress (7);
333 switch (image_get_type (hdr)) {
334 case IH_TYPE_STANDALONE:
338 /* load (and uncompress), but don't start if "autostart"
341 if (((s = getenv("autostart")) != NULL) && (strcmp(s,"no") == 0)) {
343 sprintf(buf, "%lX", len);
344 setenv("filesize", buf);
347 appl = (int (*)(int, char *[]))image_get_ep (hdr);
348 (*appl)(argc-1, &argv[1]);
357 printf ("Can't boot image type %d\n", image_get_type (hdr));
358 show_boot_progress (-8);
361 show_boot_progress (8);
363 switch (image_get_os (hdr)) {
364 default: /* handled by (original) Linux case */
366 #ifdef CONFIG_SILENT_CONSOLE
367 fixup_silent_linux();
369 do_bootm_linux (cmdtp, flag, argc, argv,
370 addr, len_ptr, verify);
373 do_bootm_netbsd (cmdtp, flag, argc, argv,
374 addr, len_ptr, verify);
377 #ifdef CONFIG_LYNXKDI
379 do_bootm_lynxkdi (cmdtp, flag, argc, argv,
380 addr, len_ptr, verify);
385 do_bootm_rtems (cmdtp, flag, argc, argv,
386 addr, len_ptr, verify);
389 #if defined(CONFIG_CMD_ELF)
391 do_bootm_vxworks (cmdtp, flag, argc, argv,
392 addr, len_ptr, verify);
395 do_bootm_qnxelf (cmdtp, flag, argc, argv,
396 addr, len_ptr, verify);
401 do_bootm_artos (cmdtp, flag, argc, argv,
402 addr, len_ptr, verify);
407 show_boot_progress (-9);
409 puts ("\n## Control returned to monitor - resetting...\n");
410 do_reset (cmdtp, flag, argc, argv);
416 bootm, CFG_MAXARGS, 1, do_bootm,
417 "bootm - boot application image from memory\n",
418 "[addr [arg ...]]\n - boot application image stored in memory\n"
419 "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
420 "\t'arg' can be the address of an initrd image\n"
421 #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
422 "\tWhen booting a Linux kernel which requires a flat device-tree\n"
423 "\ta third argument is required which is the address of the\n"
424 "\tdevice-tree blob. To boot that kernel without an initrd image,\n"
425 "\tuse a '-' for the second argument. If you do not pass a third\n"
426 "\ta bd_info struct will be passed instead\n"
430 #ifdef CONFIG_SILENT_CONSOLE
432 fixup_silent_linux ()
434 char buf[256], *start, *end;
435 char *cmdline = getenv ("bootargs");
437 /* Only fix cmdline when requested */
438 if (!(gd->flags & GD_FLG_SILENT))
441 debug ("before silent fix-up: %s\n", cmdline);
443 if ((start = strstr (cmdline, "console=")) != NULL) {
444 end = strchr (start, ' ');
445 strncpy (buf, cmdline, (start - cmdline + 8));
447 strcpy (buf + (start - cmdline + 8), end);
449 buf[start - cmdline + 8] = '\0';
451 strcpy (buf, cmdline);
452 strcat (buf, " console=");
455 strcpy (buf, "console=");
458 setenv ("bootargs", buf);
459 debug ("after silent fix-up: %s\n", buf);
461 #endif /* CONFIG_SILENT_CONSOLE */
464 do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
465 int argc, char *argv[],
470 image_header_t *hdr = &header;
472 void (*loader)(bd_t *, image_header_t *, char *, char *);
473 image_header_t *img_addr;
479 * Booting a (NetBSD) kernel image
481 * This process is pretty similar to a standalone application:
482 * The (first part of an multi-) image must be a stage-2 loader,
483 * which in turn is responsible for loading & invoking the actual
484 * kernel. The only differences are the parameters being passed:
485 * besides the board info strucure, the loader expects a command
486 * line, the name of the console device, and (optionally) the
487 * address of the original image header.
491 if ((image_check_type (hdr, IH_TYPE_MULTI)) && (len_ptr[1]))
492 img_addr = (image_header_t *) addr;
496 #if defined (CONFIG_8xx_CONS_SMC1)
498 #elif defined (CONFIG_8xx_CONS_SMC2)
500 #elif defined (CONFIG_8xx_CONS_SCC2)
502 #elif defined (CONFIG_8xx_CONS_SCC3)
510 for (i=2, len=0 ; i<argc ; i+=1)
511 len += strlen (argv[i]) + 1;
512 cmdline = malloc (len);
514 for (i=2, len=0 ; i<argc ; i+=1) {
516 cmdline[len++] = ' ';
517 strcpy (&cmdline[len], argv[i]);
518 len += strlen (argv[i]);
520 } else if ((cmdline = getenv("bootargs")) == NULL) {
524 loader = (void (*)(bd_t *, image_header_t *, char *, char *))image_get_ep (hdr);
526 printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n",
529 show_boot_progress (15);
532 * NetBSD Stage-2 Loader Parameters:
533 * r3: ptr to board info data
536 * r6: boot args string
538 (*loader) (gd->bd, img_addr, consdev, cmdline);
541 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
543 /* Function that returns a character from the environment */
544 extern uchar (*env_get_char)(int);
547 do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
548 int argc, char *argv[],
556 int i, j, nxt, len, envno, envsz;
558 void (*entry)(bd_t *bd, char *cmdline, char **fwenv, ulong top);
559 image_header_t *hdr = &header;
562 * Booting an ARTOS kernel image + application
565 /* this used to be the top of memory, but was wrong... */
567 /* get stack pointer */
568 asm volatile ("mr %0,1" : "=r"(top) );
570 debug ("## Current stack ends at 0x%08lX ", top);
572 top -= 2048; /* just to be sure */
573 if (top > CFG_BOOTMAPSZ)
577 debug ("=> set upper limit to 0x%08lX\n", top);
579 /* first check the artos specific boot args, then the linux args*/
580 if ((s = getenv("abootargs")) == NULL && (s = getenv("bootargs")) == NULL)
583 /* get length of cmdline, and place it */
585 top = (top - (len + 1)) & ~0xF;
586 cmdline = (char *)top;
587 debug ("## cmdline at 0x%08lX ", top);
591 top = (top - sizeof(bd_t)) & ~0xF;
592 debug ("## bd at 0x%08lX ", top);
594 memcpy(kbd, gd->bd, sizeof(bd_t));
596 /* first find number of env entries, and their size */
599 for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
600 for (nxt = i; env_get_char(nxt) != '\0'; ++nxt)
603 envsz += (nxt - i) + 1; /* plus trailing zero */
605 envno++; /* plus the terminating zero */
606 debug ("## %u envvars total size %u ", envno, envsz);
608 top = (top - sizeof(char **)*envno) & ~0xF;
609 fwenv = (char **)top;
610 debug ("## fwenv at 0x%08lX ", top);
612 top = (top - envsz) & ~0xF;
617 for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
618 for (nxt = i; env_get_char(nxt) != '\0'; ++nxt)
621 for (j = i; j < nxt; ++j)
622 *s++ = env_get_char(j);
625 *ss++ = NULL; /* terminate */
627 entry = (void (*)(bd_t *, char *, char **, ulong))image_get_ep (hdr);
628 (*entry)(kbd, cmdline, fwenv, top);
633 #if defined(CONFIG_CMD_BOOTD)
634 int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
637 #ifndef CFG_HUSH_PARSER
638 if (run_command (getenv ("bootcmd"), flag) < 0) rcode = 1;
640 if (parse_string_outer(getenv("bootcmd"),
641 FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0 ) rcode = 1;
647 boot, 1, 1, do_bootd,
648 "boot - boot default, i.e., run 'bootcmd'\n",
652 /* keep old command name "bootd" for backward compatibility */
654 bootd, 1, 1, do_bootd,
655 "bootd - boot default, i.e., run 'bootcmd'\n",
661 #if defined(CONFIG_CMD_IMI)
662 int do_iminfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
669 return image_info (load_addr);
672 for (arg=1; arg <argc; ++arg) {
673 addr = simple_strtoul(argv[arg], NULL, 16);
674 if (image_info (addr) != 0) rcode = 1;
679 static int image_info (ulong addr)
681 image_header_t *hdr = (image_header_t *)addr;
683 printf ("\n## Checking Image at %08lx ...\n", addr);
685 if (!image_check_magic (hdr)) {
686 puts (" Bad Magic Number\n");
690 if (!image_check_hcrc (hdr)) {
691 puts (" Bad Header Checksum\n");
695 print_image_hdr (hdr);
697 puts (" Verifying Checksum ... ");
698 if (!image_check_dcrc (hdr)) {
699 puts (" Bad Data CRC\n");
707 iminfo, CFG_MAXARGS, 1, do_iminfo,
708 "iminfo - print header information for application image\n",
710 " - print header information for application image starting at\n"
711 " address 'addr' in memory; this includes verification of the\n"
712 " image contents (magic number, header and payload checksums)\n"
717 #if defined(CONFIG_CMD_IMLS)
718 /*-----------------------------------------------------------------------
719 * List all images found in flash.
721 int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
727 for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
728 if (info->flash_id == FLASH_UNKNOWN)
730 for (j=0; j<info->sector_count; ++j) {
732 hdr = (image_header_t *)info->start[j];
734 if (!hdr || !image_check_magic (hdr))
737 if (!image_check_hcrc (hdr))
740 printf ("Image at %08lX:\n", (ulong)hdr);
741 print_image_hdr (hdr);
743 puts (" Verifying Checksum ... ");
744 if (!image_check_dcrc (hdr)) {
745 puts ("Bad Data CRC\n");
759 "imls - list all images found in flash\n",
761 " - Prints information about all images found at sector\n"
762 " boundaries in flash.\n"
767 print_image_hdr (image_header_t *hdr)
769 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
770 time_t timestamp = (time_t)image_get_time (hdr);
774 printf (" Image Name: %.*s\n", IH_NMLEN, image_get_name (hdr));
775 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
776 to_tm (timestamp, &tm);
777 printf (" Created: %4d-%02d-%02d %2d:%02d:%02d UTC\n",
778 tm.tm_year, tm.tm_mon, tm.tm_mday,
779 tm.tm_hour, tm.tm_min, tm.tm_sec);
781 puts (" Image Type: "); print_type(hdr);
782 printf ("\n Data Size: %d Bytes = ", image_get_data_size (hdr));
783 print_size (image_get_data_size (hdr), "\n");
784 printf (" Load Address: %08x\n"
785 " Entry Point: %08x\n",
786 image_get_load (hdr), image_get_ep (hdr));
788 if (image_check_type (hdr, IH_TYPE_MULTI)) {
791 ulong *len_ptr = (ulong *)((ulong)hdr + image_get_header_size ());
793 puts (" Contents:\n");
794 for (i=0; (len = image_to_cpu (*len_ptr)); ++i, ++len_ptr) {
795 printf (" Image %d: %8ld Bytes = ", i, len);
796 print_size (len, "\n");
803 print_type (image_header_t *hdr)
805 char *os, *arch, *type, *comp;
807 switch (image_get_os (hdr)) {
808 case IH_OS_INVALID: os = "Invalid OS"; break;
809 case IH_OS_NETBSD: os = "NetBSD"; break;
810 case IH_OS_LINUX: os = "Linux"; break;
811 case IH_OS_VXWORKS: os = "VxWorks"; break;
812 case IH_OS_QNX: os = "QNX"; break;
813 case IH_OS_U_BOOT: os = "U-Boot"; break;
814 case IH_OS_RTEMS: os = "RTEMS"; break;
816 case IH_OS_ARTOS: os = "ARTOS"; break;
818 #ifdef CONFIG_LYNXKDI
819 case IH_OS_LYNXOS: os = "LynxOS"; break;
821 default: os = "Unknown OS"; break;
824 switch (image_get_arch (hdr)) {
825 case IH_ARCH_INVALID: arch = "Invalid CPU"; break;
826 case IH_ARCH_ALPHA: arch = "Alpha"; break;
827 case IH_ARCH_ARM: arch = "ARM"; break;
828 case IH_ARCH_AVR32: arch = "AVR32"; break;
829 case IH_ARCH_BLACKFIN: arch = "Blackfin"; break;
830 case IH_ARCH_I386: arch = "Intel x86"; break;
831 case IH_ARCH_IA64: arch = "IA64"; break;
832 case IH_ARCH_M68K: arch = "M68K"; break;
833 case IH_ARCH_MICROBLAZE:arch = "Microblaze"; break;
834 case IH_ARCH_MIPS64: arch = "MIPS 64 Bit"; break;
835 case IH_ARCH_MIPS: arch = "MIPS"; break;
836 case IH_ARCH_NIOS2: arch = "Nios-II"; break;
837 case IH_ARCH_NIOS: arch = "Nios"; break;
838 case IH_ARCH_PPC: arch = "PowerPC"; break;
839 case IH_ARCH_S390: arch = "IBM S390"; break;
840 case IH_ARCH_SH: arch = "SuperH"; break;
841 case IH_ARCH_SPARC64: arch = "SPARC 64 Bit"; break;
842 case IH_ARCH_SPARC: arch = "SPARC"; break;
843 default: arch = "Unknown Architecture"; break;
846 switch (image_get_type (hdr)) {
847 case IH_TYPE_INVALID: type = "Invalid Image"; break;
848 case IH_TYPE_STANDALONE:type = "Standalone Program"; break;
849 case IH_TYPE_KERNEL: type = "Kernel Image"; break;
850 case IH_TYPE_RAMDISK: type = "RAMDisk Image"; break;
851 case IH_TYPE_MULTI: type = "Multi-File Image"; break;
852 case IH_TYPE_FIRMWARE: type = "Firmware"; break;
853 case IH_TYPE_SCRIPT: type = "Script"; break;
854 case IH_TYPE_FLATDT: type = "Flat Device Tree"; break;
855 default: type = "Unknown Image"; break;
858 switch (image_get_comp (hdr)) {
859 case IH_COMP_NONE: comp = "uncompressed"; break;
860 case IH_COMP_GZIP: comp = "gzip compressed"; break;
861 case IH_COMP_BZIP2: comp = "bzip2 compressed"; break;
862 default: comp = "unknown compression"; break;
865 printf ("%s %s %s (%s)", arch, os, type, comp);
869 do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
870 ulong addr, ulong *len_ptr, int verify)
872 image_header_t *hdr = &header;
873 void (*entry_point)(bd_t *);
875 entry_point = (void (*)(bd_t *))image_get_ep (hdr);
877 printf ("## Transferring control to RTEMS (at address %08lx) ...\n",
880 show_boot_progress (15);
884 * r3: ptr to board info data
887 (*entry_point ) ( gd->bd );
890 #if defined(CONFIG_CMD_ELF)
892 do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
893 ulong addr, ulong *len_ptr, int verify)
895 image_header_t *hdr = &header;
898 sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */
899 setenv("loadaddr", str);
900 do_bootvx(cmdtp, 0, 0, NULL);
904 do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
905 ulong addr, ulong *len_ptr, int verify)
907 image_header_t *hdr = &header;
911 sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */
912 local_args[0] = argv[0];
913 local_args[1] = str; /* and provide it via the arguments */
914 do_bootelf(cmdtp, 0, 2, local_args);
918 #ifdef CONFIG_LYNXKDI
920 do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag,
921 int argc, char *argv[],
926 lynxkdi_boot( &header );
929 #endif /* CONFIG_LYNXKDI */