2010/12/1 Mike Frysinger <vapier....@gmail.com>

> On Tue, Nov 30, 2010 at 06:47, Chong Huang wrote:
> > I found a problem,  when the board autoboot into kernel, it will get
> error
> > like:
> >
> > Hit any key to stop autoboot:  0
> > 16384 KiB EN25Q128 at 0:1 is now current device
> > Wrong Image Format for bootm command
> > ERROR: can't get kernel image!
>

Actually,I have met the same problem, and the error log is same as above.

When debugging, i found a strange problem:

According to the error log, the "default:" statement of a "switch()" is
executed, and output the error log.
So i added two "printf()" before "switch()" to have a look why the two value
does not match, but strange things happen, auto boot successful this time,
and the two values are the  same.

I don't know why...

----------------------------------------------------------------------
*// file: common/cmd_bootm.c *
static void *boot_get_kernel (...){
...

printf ("* genimg_get_format address = 0x%08lx\n", genimg_get_format ((void
*)img_addr));
printf ("* IMAGE_FORMAT_LEGACY address = 0x%08lx\n", IMAGE_FORMAT_LEGACY);

switch (genimg_get_format ((void *)img_addr)) {
     case IMAGE_FORMAT_LEGACY:
         ...
     default:
         printf ("Wrong Image Format for %s command\n", cmdtp->name);
         ...
}





> >
> > The 'printenv' result is something like:
> > ......
> > bootcmd=run sfboot
> > bootdelay=5
> > baudrate=115200
> > loadaddr=0x1000000
> > sfboot=sf probe 1;sf read 0x1000000 0x20000 0x300000;bootm 0x1000000
> >
> > However, if i type the command one by one, the kernel will boot up.
> >
> >> sf probe 1
> >> sf read 0x1000000 0x20000 0x300000
> >> bootm
> >
> > And using my own patch, autoboot works fine too. Still looking for the
> > reason...
>
> i did tweak the CONFIG_EXTRA_ENV_SETTINGS value as it had useless
> spaces in it.  might want to double check that isnt causing a problem.
> -mike
> _______________________________________________
> U-Boot-devel mailing list
> U-Boot-devel@blackfin.uclinux.org
> https://blackfin.uclinux.org/mailman/listinfo/u-boot-devel
>



-- 
wzc0066
_______________________________________________
U-Boot-devel mailing list
U-Boot-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/u-boot-devel

Reply via email to