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 * Continue booting an OS image; caller already has:
84 * - copied image header to global variable `header'
85 * - checked header magic number, checksums (both header & image),
86 * - verified image architecture (PPC) and type (KERNEL or MULTI),
87 * - loaded (first part of) image to header load address,
88 * - disabled interrupts.
90 typedef void boot_os_Fcn (cmd_tbl_t *cmdtp, int flag,
91 int argc, char *argv[],
92 ulong addr, /* of image to boot */
93 ulong *len_ptr, /* multi-file image length table */
94 int verify); /* getenv("verify")[0] != 'n' */
96 extern boot_os_Fcn do_bootm_linux;
98 #ifdef CONFIG_SILENT_CONSOLE
99 static void fixup_silent_linux (void);
101 static boot_os_Fcn do_bootm_netbsd;
102 static boot_os_Fcn do_bootm_rtems;
103 #if defined(CONFIG_CMD_ELF)
104 static boot_os_Fcn do_bootm_vxworks;
105 static boot_os_Fcn do_bootm_qnxelf;
106 int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
107 int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
109 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
110 static boot_os_Fcn do_bootm_artos;
112 #ifdef CONFIG_LYNXKDI
113 static boot_os_Fcn do_bootm_lynxkdi;
114 extern void lynxkdi_boot( image_header_t * );
117 #ifndef CFG_BOOTM_LEN
118 #define CFG_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */
121 image_header_t header;
123 ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */
125 int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
131 uint unc_len = CFG_BOOTM_LEN;
134 int (*appl)(int, char *[]);
135 image_header_t *hdr = &header;
137 verify = getenv_verify ();
142 addr = simple_strtoul(argv[1], NULL, 16);
145 show_boot_progress (1);
146 printf ("## Booting image at %08lx ...\n", addr);
148 /* Copy header so we can blank CRC field for re-calculation */
149 #ifdef CONFIG_HAS_DATAFLASH
150 if (addr_dataflash(addr)){
151 read_dataflash (addr, image_get_header_size (), (char *)&header);
154 memmove (&header, (char *)addr, image_get_header_size ());
156 if (!image_check_magic(hdr)) {
157 puts ("Bad Magic Number\n");
158 show_boot_progress (-1);
161 show_boot_progress (2);
163 if (!image_check_hcrc (hdr)) {
164 puts ("Bad Header Checksum\n");
165 show_boot_progress (-2);
168 show_boot_progress (3);
170 #ifdef CONFIG_HAS_DATAFLASH
171 if (addr_dataflash(addr)){
172 len = image_get_image_size (hdr);
173 read_dataflash(addr, len, (char *)CFG_LOAD_ADDR);
174 addr = CFG_LOAD_ADDR;
179 /* for multi-file images we need the data part, too */
180 print_image_hdr ((image_header_t *)addr);
182 len = image_get_data_size (hdr);
183 data = addr + image_get_header_size ();
184 len_ptr = (ulong *)data;
187 puts (" Verifying Checksum ... ");
188 if (!image_check_dcrc ((image_header_t *)addr)) {
189 printf ("Bad Data CRC\n");
190 show_boot_progress (-3);
195 show_boot_progress (4);
197 if (!image_check_target_arch (hdr)) {
198 printf ("Unsupported Architecture 0x%x\n", image_get_arch (hdr));
199 show_boot_progress (-4);
202 show_boot_progress (5);
204 switch (image_get_type (hdr)) {
205 case IH_TYPE_STANDALONE:
206 name = "Standalone Application";
207 /* A second argument overwrites the load address */
209 image_set_load (hdr, simple_strtoul (argv[2], NULL, 16));
213 name = "Kernel Image";
216 name = "Multi-File Image";
217 len = image_to_cpu (len_ptr[0]);
218 /* OS kernel is always the first image */
219 data += 8; /* kernel_len + terminator */
220 for (i=1; len_ptr[i]; ++i)
223 default: printf ("Wrong Image Type for %s command\n", cmdtp->name);
224 show_boot_progress (-5);
227 show_boot_progress (6);
230 * We have reached the point of no return: we are going to
231 * overwrite all exception vector code, so we cannot easily
232 * recover from any failures any more...
235 iflag = disable_interrupts();
237 #ifdef CONFIG_AMIGAONEG3SE
239 * We've possible left the caches enabled during
240 * bios emulation, so turn them off again
243 invalidate_l1_instruction_cache();
248 switch (image_get_comp (hdr)) {
250 if (image_get_load (hdr) == addr) {
251 printf (" XIP %s ... ", name);
253 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
255 void *to = (void *)image_get_load (hdr);
256 void *from = (void *)data;
258 printf (" Loading %s ... ", name);
261 size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l;
263 memmove (to, from, tail);
268 #else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
269 memmove ((void *)image_get_load (hdr), (uchar *)data, len);
270 #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
274 printf (" Uncompressing %s ... ", name);
275 if (gunzip ((void *)image_get_load (hdr), unc_len,
276 (uchar *)data, &len) != 0) {
277 puts ("GUNZIP ERROR - must RESET board to recover\n");
278 show_boot_progress (-6);
279 do_reset (cmdtp, flag, argc, argv);
284 printf (" Uncompressing %s ... ", name);
286 * If we've got less than 4 MB of malloc() space,
287 * use slower decompression algorithm which requires
288 * at most 2300 KB of memory.
290 i = BZ2_bzBuffToBuffDecompress ((char*)image_get_load (hdr),
291 &unc_len, (char *)data, len,
292 CFG_MALLOC_LEN < (4096 * 1024), 0);
294 printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);
295 show_boot_progress (-6);
296 do_reset (cmdtp, flag, argc, argv);
299 #endif /* CONFIG_BZIP2 */
303 printf ("Unimplemented compression type %d\n", image_get_comp (hdr));
304 show_boot_progress (-7);
308 show_boot_progress (7);
310 switch (image_get_type (hdr)) {
311 case IH_TYPE_STANDALONE:
315 /* load (and uncompress), but don't start if "autostart"
318 if (((s = getenv("autostart")) != NULL) && (strcmp(s,"no") == 0)) {
320 sprintf(buf, "%lX", len);
321 setenv("filesize", buf);
324 appl = (int (*)(int, char *[]))image_get_ep (hdr);
325 (*appl)(argc-1, &argv[1]);
334 printf ("Can't boot image type %d\n", image_get_type (hdr));
335 show_boot_progress (-8);
338 show_boot_progress (8);
340 switch (image_get_os (hdr)) {
341 default: /* handled by (original) Linux case */
343 #ifdef CONFIG_SILENT_CONSOLE
344 fixup_silent_linux();
346 do_bootm_linux (cmdtp, flag, argc, argv,
347 addr, len_ptr, verify);
350 do_bootm_netbsd (cmdtp, flag, argc, argv,
351 addr, len_ptr, verify);
354 #ifdef CONFIG_LYNXKDI
356 do_bootm_lynxkdi (cmdtp, flag, argc, argv,
357 addr, len_ptr, verify);
362 do_bootm_rtems (cmdtp, flag, argc, argv,
363 addr, len_ptr, verify);
366 #if defined(CONFIG_CMD_ELF)
368 do_bootm_vxworks (cmdtp, flag, argc, argv,
369 addr, len_ptr, verify);
372 do_bootm_qnxelf (cmdtp, flag, argc, argv,
373 addr, len_ptr, verify);
378 do_bootm_artos (cmdtp, flag, argc, argv,
379 addr, len_ptr, verify);
384 show_boot_progress (-9);
386 puts ("\n## Control returned to monitor - resetting...\n");
387 do_reset (cmdtp, flag, argc, argv);
393 bootm, CFG_MAXARGS, 1, do_bootm,
394 "bootm - boot application image from memory\n",
395 "[addr [arg ...]]\n - boot application image stored in memory\n"
396 "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
397 "\t'arg' can be the address of an initrd image\n"
398 #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
399 "\tWhen booting a Linux kernel which requires a flat device-tree\n"
400 "\ta third argument is required which is the address of the\n"
401 "\tdevice-tree blob. To boot that kernel without an initrd image,\n"
402 "\tuse a '-' for the second argument. If you do not pass a third\n"
403 "\ta bd_info struct will be passed instead\n"
407 #ifdef CONFIG_SILENT_CONSOLE
409 fixup_silent_linux ()
411 char buf[256], *start, *end;
412 char *cmdline = getenv ("bootargs");
414 /* Only fix cmdline when requested */
415 if (!(gd->flags & GD_FLG_SILENT))
418 debug ("before silent fix-up: %s\n", cmdline);
420 if ((start = strstr (cmdline, "console=")) != NULL) {
421 end = strchr (start, ' ');
422 strncpy (buf, cmdline, (start - cmdline + 8));
424 strcpy (buf + (start - cmdline + 8), end);
426 buf[start - cmdline + 8] = '\0';
428 strcpy (buf, cmdline);
429 strcat (buf, " console=");
432 strcpy (buf, "console=");
435 setenv ("bootargs", buf);
436 debug ("after silent fix-up: %s\n", buf);
438 #endif /* CONFIG_SILENT_CONSOLE */
441 do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
442 int argc, char *argv[],
447 image_header_t *hdr = &header;
449 void (*loader)(bd_t *, image_header_t *, char *, char *);
450 image_header_t *img_addr;
456 * Booting a (NetBSD) kernel image
458 * This process is pretty similar to a standalone application:
459 * The (first part of an multi-) image must be a stage-2 loader,
460 * which in turn is responsible for loading & invoking the actual
461 * kernel. The only differences are the parameters being passed:
462 * besides the board info strucure, the loader expects a command
463 * line, the name of the console device, and (optionally) the
464 * address of the original image header.
468 if ((image_check_type (hdr, IH_TYPE_MULTI)) && (len_ptr[1]))
469 img_addr = (image_header_t *) addr;
473 #if defined (CONFIG_8xx_CONS_SMC1)
475 #elif defined (CONFIG_8xx_CONS_SMC2)
477 #elif defined (CONFIG_8xx_CONS_SCC2)
479 #elif defined (CONFIG_8xx_CONS_SCC3)
487 for (i=2, len=0 ; i<argc ; i+=1)
488 len += strlen (argv[i]) + 1;
489 cmdline = malloc (len);
491 for (i=2, len=0 ; i<argc ; i+=1) {
493 cmdline[len++] = ' ';
494 strcpy (&cmdline[len], argv[i]);
495 len += strlen (argv[i]);
497 } else if ((cmdline = getenv("bootargs")) == NULL) {
501 loader = (void (*)(bd_t *, image_header_t *, char *, char *))image_get_ep (hdr);
503 printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n",
506 show_boot_progress (15);
509 * NetBSD Stage-2 Loader Parameters:
510 * r3: ptr to board info data
513 * r6: boot args string
515 (*loader) (gd->bd, img_addr, consdev, cmdline);
518 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
520 /* Function that returns a character from the environment */
521 extern uchar (*env_get_char)(int);
524 do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
525 int argc, char *argv[],
533 int i, j, nxt, len, envno, envsz;
535 void (*entry)(bd_t *bd, char *cmdline, char **fwenv, ulong top);
536 image_header_t *hdr = &header;
539 * Booting an ARTOS kernel image + application
542 /* this used to be the top of memory, but was wrong... */
544 /* get stack pointer */
545 asm volatile ("mr %0,1" : "=r"(top) );
547 debug ("## Current stack ends at 0x%08lX ", top);
549 top -= 2048; /* just to be sure */
550 if (top > CFG_BOOTMAPSZ)
554 debug ("=> set upper limit to 0x%08lX\n", top);
556 /* first check the artos specific boot args, then the linux args*/
557 if ((s = getenv("abootargs")) == NULL && (s = getenv("bootargs")) == NULL)
560 /* get length of cmdline, and place it */
562 top = (top - (len + 1)) & ~0xF;
563 cmdline = (char *)top;
564 debug ("## cmdline at 0x%08lX ", top);
568 top = (top - sizeof(bd_t)) & ~0xF;
569 debug ("## bd at 0x%08lX ", top);
571 memcpy(kbd, gd->bd, sizeof(bd_t));
573 /* first find number of env entries, and their size */
576 for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
577 for (nxt = i; env_get_char(nxt) != '\0'; ++nxt)
580 envsz += (nxt - i) + 1; /* plus trailing zero */
582 envno++; /* plus the terminating zero */
583 debug ("## %u envvars total size %u ", envno, envsz);
585 top = (top - sizeof(char **)*envno) & ~0xF;
586 fwenv = (char **)top;
587 debug ("## fwenv at 0x%08lX ", top);
589 top = (top - envsz) & ~0xF;
594 for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
595 for (nxt = i; env_get_char(nxt) != '\0'; ++nxt)
598 for (j = i; j < nxt; ++j)
599 *s++ = env_get_char(j);
602 *ss++ = NULL; /* terminate */
604 entry = (void (*)(bd_t *, char *, char **, ulong))image_get_ep (hdr);
605 (*entry)(kbd, cmdline, fwenv, top);
610 #if defined(CONFIG_CMD_BOOTD)
611 int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
614 #ifndef CFG_HUSH_PARSER
615 if (run_command (getenv ("bootcmd"), flag) < 0) rcode = 1;
617 if (parse_string_outer(getenv("bootcmd"),
618 FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0 ) rcode = 1;
624 boot, 1, 1, do_bootd,
625 "boot - boot default, i.e., run 'bootcmd'\n",
629 /* keep old command name "bootd" for backward compatibility */
631 bootd, 1, 1, do_bootd,
632 "bootd - boot default, i.e., run 'bootcmd'\n",
638 #if defined(CONFIG_CMD_IMI)
639 int do_iminfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
646 return image_info (load_addr);
649 for (arg=1; arg <argc; ++arg) {
650 addr = simple_strtoul(argv[arg], NULL, 16);
651 if (image_info (addr) != 0) rcode = 1;
656 static int image_info (ulong addr)
658 image_header_t *hdr = (image_header_t *)addr;
660 printf ("\n## Checking Image at %08lx ...\n", addr);
662 if (!image_check_magic (hdr)) {
663 puts (" Bad Magic Number\n");
667 if (!image_check_hcrc (hdr)) {
668 puts (" Bad Header Checksum\n");
672 print_image_hdr (hdr);
674 puts (" Verifying Checksum ... ");
675 if (!image_check_dcrc (hdr)) {
676 puts (" Bad Data CRC\n");
684 iminfo, CFG_MAXARGS, 1, do_iminfo,
685 "iminfo - print header information for application image\n",
687 " - print header information for application image starting at\n"
688 " address 'addr' in memory; this includes verification of the\n"
689 " image contents (magic number, header and payload checksums)\n"
694 #if defined(CONFIG_CMD_IMLS)
695 /*-----------------------------------------------------------------------
696 * List all images found in flash.
698 int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
704 for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
705 if (info->flash_id == FLASH_UNKNOWN)
707 for (j=0; j<info->sector_count; ++j) {
709 hdr = (image_header_t *)info->start[j];
711 if (!hdr || !image_check_magic (hdr))
714 if (!image_check_hcrc (hdr))
717 printf ("Image at %08lX:\n", (ulong)hdr);
718 print_image_hdr (hdr);
720 puts (" Verifying Checksum ... ");
721 if (!image_check_dcrc (hdr)) {
722 puts ("Bad Data CRC\n");
736 "imls - list all images found in flash\n",
738 " - Prints information about all images found at sector\n"
739 " boundaries in flash.\n"
744 print_image_hdr (image_header_t *hdr)
746 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
747 time_t timestamp = (time_t)image_get_time (hdr);
751 printf (" Image Name: %.*s\n", IH_NMLEN, image_get_name (hdr));
752 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
753 to_tm (timestamp, &tm);
754 printf (" Created: %4d-%02d-%02d %2d:%02d:%02d UTC\n",
755 tm.tm_year, tm.tm_mon, tm.tm_mday,
756 tm.tm_hour, tm.tm_min, tm.tm_sec);
758 puts (" Image Type: "); print_type(hdr);
759 printf ("\n Data Size: %d Bytes = ", image_get_data_size (hdr));
760 print_size (image_get_data_size (hdr), "\n");
761 printf (" Load Address: %08x\n"
762 " Entry Point: %08x\n",
763 image_get_load (hdr), image_get_ep (hdr));
765 if (image_check_type (hdr, IH_TYPE_MULTI)) {
768 ulong *len_ptr = (ulong *)((ulong)hdr + image_get_header_size ());
770 puts (" Contents:\n");
771 for (i=0; (len = image_to_cpu (*len_ptr)); ++i, ++len_ptr) {
772 printf (" Image %d: %8ld Bytes = ", i, len);
773 print_size (len, "\n");
780 print_type (image_header_t *hdr)
782 char *os, *arch, *type, *comp;
784 switch (image_get_os (hdr)) {
785 case IH_OS_INVALID: os = "Invalid OS"; break;
786 case IH_OS_NETBSD: os = "NetBSD"; break;
787 case IH_OS_LINUX: os = "Linux"; break;
788 case IH_OS_VXWORKS: os = "VxWorks"; break;
789 case IH_OS_QNX: os = "QNX"; break;
790 case IH_OS_U_BOOT: os = "U-Boot"; break;
791 case IH_OS_RTEMS: os = "RTEMS"; break;
793 case IH_OS_ARTOS: os = "ARTOS"; break;
795 #ifdef CONFIG_LYNXKDI
796 case IH_OS_LYNXOS: os = "LynxOS"; break;
798 default: os = "Unknown OS"; break;
801 switch (image_get_arch (hdr)) {
802 case IH_ARCH_INVALID: arch = "Invalid CPU"; break;
803 case IH_ARCH_ALPHA: arch = "Alpha"; break;
804 case IH_ARCH_ARM: arch = "ARM"; break;
805 case IH_ARCH_AVR32: arch = "AVR32"; break;
806 case IH_ARCH_BLACKFIN: arch = "Blackfin"; break;
807 case IH_ARCH_I386: arch = "Intel x86"; break;
808 case IH_ARCH_IA64: arch = "IA64"; break;
809 case IH_ARCH_M68K: arch = "M68K"; break;
810 case IH_ARCH_MICROBLAZE:arch = "Microblaze"; break;
811 case IH_ARCH_MIPS64: arch = "MIPS 64 Bit"; break;
812 case IH_ARCH_MIPS: arch = "MIPS"; break;
813 case IH_ARCH_NIOS2: arch = "Nios-II"; break;
814 case IH_ARCH_NIOS: arch = "Nios"; break;
815 case IH_ARCH_PPC: arch = "PowerPC"; break;
816 case IH_ARCH_S390: arch = "IBM S390"; break;
817 case IH_ARCH_SH: arch = "SuperH"; break;
818 case IH_ARCH_SPARC64: arch = "SPARC 64 Bit"; break;
819 case IH_ARCH_SPARC: arch = "SPARC"; break;
820 default: arch = "Unknown Architecture"; break;
823 switch (image_get_type (hdr)) {
824 case IH_TYPE_INVALID: type = "Invalid Image"; break;
825 case IH_TYPE_STANDALONE:type = "Standalone Program"; break;
826 case IH_TYPE_KERNEL: type = "Kernel Image"; break;
827 case IH_TYPE_RAMDISK: type = "RAMDisk Image"; break;
828 case IH_TYPE_MULTI: type = "Multi-File Image"; break;
829 case IH_TYPE_FIRMWARE: type = "Firmware"; break;
830 case IH_TYPE_SCRIPT: type = "Script"; break;
831 case IH_TYPE_FLATDT: type = "Flat Device Tree"; break;
832 default: type = "Unknown Image"; break;
835 switch (image_get_comp (hdr)) {
836 case IH_COMP_NONE: comp = "uncompressed"; break;
837 case IH_COMP_GZIP: comp = "gzip compressed"; break;
838 case IH_COMP_BZIP2: comp = "bzip2 compressed"; break;
839 default: comp = "unknown compression"; break;
842 printf ("%s %s %s (%s)", arch, os, type, comp);
846 do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
847 ulong addr, ulong *len_ptr, int verify)
849 image_header_t *hdr = &header;
850 void (*entry_point)(bd_t *);
852 entry_point = (void (*)(bd_t *))image_get_ep (hdr);
854 printf ("## Transferring control to RTEMS (at address %08lx) ...\n",
857 show_boot_progress (15);
861 * r3: ptr to board info data
864 (*entry_point ) ( gd->bd );
867 #if defined(CONFIG_CMD_ELF)
869 do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
870 ulong addr, ulong *len_ptr, int verify)
872 image_header_t *hdr = &header;
875 sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */
876 setenv("loadaddr", str);
877 do_bootvx(cmdtp, 0, 0, NULL);
881 do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
882 ulong addr, ulong *len_ptr, int verify)
884 image_header_t *hdr = &header;
888 sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */
889 local_args[0] = argv[0];
890 local_args[1] = str; /* and provide it via the arguments */
891 do_bootelf(cmdtp, 0, 2, local_args);
895 #ifdef CONFIG_LYNXKDI
897 do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag,
898 int argc, char *argv[],
903 lynxkdi_boot( &header );
906 #endif /* CONFIG_LYNXKDI */