public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Booting an i.MX53 from NAND with u-boot
@ 2012-12-13 16:01 Bernhard Walle
  2012-12-13 22:41 ` Benoît Thébaudeau
  0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Walle @ 2012-12-13 16:01 UTC (permalink / raw)
  To: u-boot

Hello,

we have a custom board with an Freescale i.MX 53 CPU and NAND flash
(MT29F1G08ABADAWP if it matters). It's quite similar to the i.MX 53 LOCO
("Quick Start Board"), but the LOCO has no Flash and only boots from
Micro SD card.

I'm using u-boot 2012.07 from mainline with some additional patches,
notably the patch to add i.M53 support to mxc_nand driver from
Beno?t Th?baudeau that has been posted on the mailing list recently.

When booting from SD card, everything is fine, i.e. I can read and write
the flash from u-boot. And also from Linux. However, the goal is to boot
from NAND. :)

I used the kobs-ng-11.09.01 software from Freescale to write the
bootloader to NAND, since it also writes the necessary boot header and
has support for bad pages. Is it correct to use 'u-boot.bin' (and not
'u-boot.imx')?

There's some information floating around in the internet that I need
some proprietary tool to convert 'u-boot.bin' to some 'streaming'
format. But that information is for i.MX 28 and not for i.MX 53. I found
also tools/mxsboot.c in the u-boot sources which seems to be a
replacement for kobs-ng.

Some ideas what we're doing wrong or how to debug this? Of course it can
be also the boot GPIO settings, but I wanted to ask here if the
procedure looks correct from u-boot side.


Regards,
Bernhard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Booting an i.MX53 from NAND with u-boot
  2012-12-13 16:01 [U-Boot] Booting an i.MX53 from NAND with u-boot Bernhard Walle
@ 2012-12-13 22:41 ` Benoît Thébaudeau
  2012-12-14 13:33   ` Benoît Thébaudeau
  0 siblings, 1 reply; 3+ messages in thread
From: Benoît Thébaudeau @ 2012-12-13 22:41 UTC (permalink / raw)
  To: u-boot

Dear Bernhard Walle,

On Thursday, December 13, 2012 5:01:00 PM, Bernhard Walle wrote:
> we have a custom board with an Freescale i.MX 53 CPU and NAND flash
> (MT29F1G08ABADAWP if it matters). It's quite similar to the i.MX 53
> LOCO
> ("Quick Start Board"), but the LOCO has no Flash and only boots from
> Micro SD card.
> 
> I'm using u-boot 2012.07 from mainline with some additional patches,
> notably the patch to add i.M53 support to mxc_nand driver from
> Beno?t Th?baudeau that has been posted on the mailing list recently.
> 
> When booting from SD card, everything is fine, i.e. I can read and
> write
> the flash from u-boot. And also from Linux. However, the goal is to
> boot
> from NAND. :)

OK. FYI, I boot from NAND on a custom board with i.MX51 using the patches that
you refer to.

> I used the kobs-ng-11.09.01 software from Freescale to write the
> bootloader to NAND, since it also writes the necessary boot header
> and
> has support for bad pages. Is it correct to use 'u-boot.bin' (and not
> 'u-boot.imx')?
> 
> There's some information floating around in the internet that I need
> some proprietary tool to convert 'u-boot.bin' to some 'streaming'
> format. But that information is for i.MX 28 and not for i.MX 53. I
> found
> also tools/mxsboot.c in the u-boot sources which seems to be a
> replacement for kobs-ng.

There are several possible solutions. First, you need an SPL because the ROM
bootloader does not handle all bad blocks properly, especially if the bootloader
image spans several blocks. You have the choice between the old NAND SPL, which
is being obsoleted, and the new generic SPL, which still requires some
refinements to support NAND boot on i.MX. NAND SPL is currently the quickest
solution, but generic SPL is the long term solution.

For my board, I went with NAND SPL, which generates a u-boot-nand.bin file to
flash. I had to customize the linker script and the startup files to add the DCD
stuff to the image. Another solution could have been to generate a u-boot.imx
for NAND SPL, which I will do for generic SPL at some point.

> Some ideas what we're doing wrong or how to debug this? Of course it
> can
> be also the boot GPIO settings, but I wanted to ask here if the
> procedure looks correct from u-boot side.

For debugging, a JTAG probe is the best solution.

Best regards,
Beno?t

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Booting an i.MX53 from NAND with u-boot
  2012-12-13 22:41 ` Benoît Thébaudeau
@ 2012-12-14 13:33   ` Benoît Thébaudeau
  0 siblings, 0 replies; 3+ messages in thread
From: Benoît Thébaudeau @ 2012-12-14 13:33 UTC (permalink / raw)
  To: u-boot

On Thursday, December 13, 2012 11:41:29 PM, Beno?t Th?baudeau wrote:
> On Thursday, December 13, 2012 5:01:00 PM, Bernhard Walle wrote:
> > I used the kobs-ng-11.09.01 software from Freescale to write the
> > bootloader to NAND, since it also writes the necessary boot header
> > and
> > has support for bad pages. Is it correct to use 'u-boot.bin' (and
> > not
> > 'u-boot.imx')?
> > 
> > There's some information floating around in the internet that I
> > need
> > some proprietary tool to convert 'u-boot.bin' to some 'streaming'
> > format. But that information is for i.MX 28 and not for i.MX 53. I
> > found
> > also tools/mxsboot.c in the u-boot sources which seems to be a
> > replacement for kobs-ng.
> 
> There are several possible solutions. First, you need an SPL because
> the ROM
> bootloader does not handle all bad blocks properly, especially if the
> bootloader
> image spans several blocks. You have the choice between the old NAND
> SPL, which
> is being obsoleted, and the new generic SPL, which still requires
> some
> refinements to support NAND boot on i.MX. NAND SPL is currently the
> quickest
> solution, but generic SPL is the long term solution.
> 
> For my board, I went with NAND SPL, which generates a u-boot-nand.bin
> file to
> flash. I had to customize the linker script and the startup files to
> add the DCD
> stuff to the image. Another solution could have been to generate a
> u-boot.imx
> for NAND SPL, which I will do for generic SPL at some point.

Also, contrary to usual u-boot images, u-boot.imx should be flashed at offset
0x400, which may be surprising for NAND.

Best regards,
Beno?t

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-14 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 16:01 [U-Boot] Booting an i.MX53 from NAND with u-boot Bernhard Walle
2012-12-13 22:41 ` Benoît Thébaudeau
2012-12-14 13:33   ` Benoît Thébaudeau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox