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

Wolfgang Denk wd at denx.de
Fri Mar 14 09:45:51 CET 2014


Dear JYOTI DUBEY,

In message <CAE0zQkuaek52RPtRoMM=LGVHA5OCsaMywX+FBag8sedC3YNJew at mail.gmail.com> you wrote:
>
> >> fatload mmc 0:1 12000000 u-boot.imx
> reading u-boot.imx
> 343040 bytes read in 54 ms (6.1 MiB/s)

The size is here printed as a decimal number, but ...

> >>sf write 0x12000000 0x0 343040
> ERROR: attempting write past flash size (0x200000)

...sf expexts hex input; so you actually passed 0x343040 which is
about 10 times the correct value.

You can easily avoid this problem by using the automatially set
variable "filesize" instead.

> I have no clue as how to overcome this error.Can somebody help me with this
> error.

Try:

	fatload mmc 0:1 12000000 u-boot.imx
	sf write 12000000 0 $filesize

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
                - Larry Wall in  <1991Nov13.194420.28091 at netlabs.com>


More information about the U-Boot mailing list