Hi, mike:

CONFIG_EXTRA_ENV_SETTINGS value isn't the cause.

Adding the read code back, the kernel can be autoboot up fine.

--- drivers/mtd/spi/eon.c    (版本 2513)
+++ drivers/mtd/spi/eon.c    (工作副本)
@@ -240,7 +240,13 @@
     const struct eon_spi_flash_params *params;
     struct eon_spi_flash *eon;
     unsigned int i;
+    int ret;
+    u8 id[3];

+    ret = spi_flash_cmd(spi, CMD_READ_ID, id, sizeof(id));
+    if (ret)
+        return NULL;
+
     for (i = 0; i < ARRAY_SIZE(eon_spi_flash_table); ++i) {
         params = &eon_spi_flash_table[i];
         if (params->idcode1 == idcode[2])

Seems that it need do 'sf read' operation twice and the second one takes
real effect. I can not figure out why. The following is in interaction mode,
i did 'sf read' twice.

bfin> sf probe 1
16384 KiB EN25Q128 at 0:1 is now current device
bfin> sf read 0x1000000 0x20000 0x30000
bfin> sf read 0x1000000 0x20000 0x300000
bfin> bootm 0x1000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-2.6.28.10-ADI-2009R1.1
   Image Type:   Blackfin Linux Kernel Image (gzip compressed)
   Data Size:    2714297 Bytes = 2.6 MiB
   Load Address: 00001000
   Entry Point:  00226ab4
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Starting Kernel at = 00226ab4.......


regards.

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!
> >
> > 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
> >
>
This might have already done one read operation before...[?]


> > 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
>

<<331.gif>>

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

Reply via email to