[U-Boot] Swiching u-boot image in SPI-NOR

Stefano Babic sbabic at denx.de
Fri Mar 14 10:13:33 CET 2014


Hi Jvoty,

On 14/03/2014 08:17, JYOTI DUBEY wrote:
> Hello
>       I am trying to bring in u-boot.imx (uboot image of u-boot 2013) onto
> SPI-NOR of nitrogen 6x board.I used following commands:
>>> sf probe 1
>>> sf erase 0 0x40000
>>> fatload mmc 0:1 12000000 u-boot.imx
> reading u-boot.imx
> 343040 bytes read in 54 ms (6.1 MiB/s)
>>> sf write 0x12000000 0x0 343040
> ERROR: attempting write past flash size (0x200000)
> 

Please read *carefully* the i.MX manual. The SOC expects to read the
i.MX header at a specific address, depending on the selected media. On
most media (SD, SPI,..) this is 0x400. It is wrong to copy u-boot.imx at
the beginning of the flash.

And, as already remarked by Wolfgang, U-Boot uses hexadecimal values,
not decimal.

You are not erasing enough flash. Check the size, for a nitrogen quad I get:

-rw-rw-r-- 1 stefano stefano 363520 mar 14 10:03 u-boot.imx

You are erasing only 256KB, this is not enough.

Try:

sf erase 0 60000
sf write 0x12000000 400 ${filesize}

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list