mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Booting barebox on i.MX6 from SDCARD?
@ 2014-06-26 10:04 Holger Schurig
  2014-06-26 10:11 ` Lucas Stach
  0 siblings, 1 reply; 6+ messages in thread
From: Holger Schurig @ 2014-06-26 10:04 UTC (permalink / raw)
  To: barebox

Hi all,

In the Freescale i.MX6Q Reference manual they say in "8. System Boot"
near the end of "8.5.3.1 Expansion Device eFUSE configuration" that
the processor can load from SDCARD, but only up to 32 MB.

Did any one of you succeeded in booting barebox from SDCARD, maybe
with a trampoline code?  Or can the PBL do that? AFAIK U-Boot can boot
from sdcard, at least Boundary Devices have some web pages about this
(for Nitrogen/SabreLite) on their web page. Anyone already found out
how U-Boot does it?  I could think about whatever U-Boot uses to load
the "real" Barebox instead :-)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Booting barebox on i.MX6 from SDCARD?
  2014-06-26 10:04 Booting barebox on i.MX6 from SDCARD? Holger Schurig
@ 2014-06-26 10:11 ` Lucas Stach
  2014-06-26 19:42   ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas Stach @ 2014-06-26 10:11 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

Am Donnerstag, den 26.06.2014, 12:04 +0200 schrieb Holger Schurig:
> Hi all,
> 
> In the Freescale i.MX6Q Reference manual they say in "8. System Boot"
> near the end of "8.5.3.1 Expansion Device eFUSE configuration" that
> the processor can load from SDCARD, but only up to 32 MB.
> 
> Did any one of you succeeded in booting barebox from SDCARD, maybe
> with a trampoline code?  Or can the PBL do that? AFAIK U-Boot can boot
> from sdcard, at least Boundary Devices have some web pages about this
> (for Nitrogen/SabreLite) on their web page. Anyone already found out
> how U-Boot does it?  I could think about whatever U-Boot uses to load
> the "real" Barebox instead :-)

Um, we started barebox from SD-card on a lot of boards where the boot
mode strapping allows this.

Just dd the resulting *.img to an SD-card (you may skip the first 512
byte to leave your MBR in place). If you got the boot mode selection
right it should just work.

Regards,
Lucas

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Booting barebox on i.MX6 from SDCARD?
  2014-06-26 10:11 ` Lucas Stach
@ 2014-06-26 19:42   ` Sascha Hauer
  2014-06-27  9:07     ` Holger Schurig
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2014-06-26 19:42 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Thu, Jun 26, 2014 at 12:11:30PM +0200, Lucas Stach wrote:
> Am Donnerstag, den 26.06.2014, 12:04 +0200 schrieb Holger Schurig:
> > Hi all,
> > 
> > In the Freescale i.MX6Q Reference manual they say in "8. System Boot"
> > near the end of "8.5.3.1 Expansion Device eFUSE configuration" that
> > the processor can load from SDCARD, but only up to 32 MB.
> > 
> > Did any one of you succeeded in booting barebox from SDCARD, maybe
> > with a trampoline code?  Or can the PBL do that? AFAIK U-Boot can boot
> > from sdcard, at least Boundary Devices have some web pages about this
> > (for Nitrogen/SabreLite) on their web page. Anyone already found out
> > how U-Boot does it?  I could think about whatever U-Boot uses to load
> > the "real" Barebox instead :-)
> 
> Um, we started barebox from SD-card on a lot of boards where the boot
> mode strapping allows this.
> 
> Just dd the resulting *.img to an SD-card (you may skip the first 512
> byte to leave your MBR in place). If you got the boot mode selection
> right it should just work.

If we had the new documentation online I could answer with a link \o/

It has this in it:

The images generated by the build process can be directly written to an
SD card::

  # with Multi Image support:
  cat images/barebox-freescale-imx51-babbage.img > /dev/sdd
  # otherwise:
  cat barebox-flash-image > /dev/sdd

This will overwrite the partition table on the card. It can be preserved
with::

  dd if=images/barebox-freescale-imx51-babbage.img of=/dev/sdd bs=512 skip=1 seek=1

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Booting barebox on i.MX6 from SDCARD?
  2014-06-26 19:42   ` Sascha Hauer
@ 2014-06-27  9:07     ` Holger Schurig
  2014-06-27 10:33       ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Holger Schurig @ 2014-06-27  9:07 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hmm, this is really weird.

On my device, I have a WinCE image on a MMC card. When I insert this
MMC card, the hardware boots from it and I see the output of the EBOOT
on the serial port. So I know that the hardware can boot from SDCARD
(e.g. BOOTCFG setup etc). If I remove the card, then the CPU instead
activates serial (USB) boot, as I can see with lsusb/journalctl -f.

Now I use the exact same MMC card and put
barebox/images/barebox-ahs2.img onto it. This is an image that I can
boot via "barebox/scripts/imx/imx-usb-loader -v
barebox/images/barebox-ahs2.img". So I know that this image isn't
totally borked up ...  As I insert this card now and turn the power on
....   nothing happens. The hardware seems dead, even with
CONFIG_DEBUG_LL.

Doesn't seem to matter if I put the image onto the MMC card with or
without bs=512 skip=1 seek=1.

(I also used SDCARD in a Sandisk MMC->SDCARD adapter. But beware: my
sandisk adapter doesn't provide a proper card detect signal ...)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Booting barebox on i.MX6 from SDCARD?
  2014-06-27  9:07     ` Holger Schurig
@ 2014-06-27 10:33       ` Sascha Hauer
  2014-06-27 11:17         ` Holger Schurig
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2014-06-27 10:33 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Fri, Jun 27, 2014 at 11:07:13AM +0200, Holger Schurig wrote:
> Hmm, this is really weird.
> 
> On my device, I have a WinCE image on a MMC card. When I insert this
> MMC card, the hardware boots from it and I see the output of the EBOOT
> on the serial port. So I know that the hardware can boot from SDCARD
> (e.g. BOOTCFG setup etc). If I remove the card, then the CPU instead
> activates serial (USB) boot, as I can see with lsusb/journalctl -f.
> 
> Now I use the exact same MMC card and put
> barebox/images/barebox-ahs2.img onto it. This is an image that I can
> boot via "barebox/scripts/imx/imx-usb-loader -v
> barebox/images/barebox-ahs2.img". So I know that this image isn't
> totally borked up ...  As I insert this card now and turn the power on
> ....   nothing happens. The hardware seems dead, even with
> CONFIG_DEBUG_LL.

Have you tried without DEBUG_LL? It might be that you write to an
uninitialized UART.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Booting barebox on i.MX6 from SDCARD?
  2014-06-27 10:33       ` Sascha Hauer
@ 2014-06-27 11:17         ` Holger Schurig
  0 siblings, 0 replies; 6+ messages in thread
From: Holger Schurig @ 2014-06-27 11:17 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Yes, normally I have it off. Only after the booting problem I turned it on.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2014-06-27 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26 10:04 Booting barebox on i.MX6 from SDCARD? Holger Schurig
2014-06-26 10:11 ` Lucas Stach
2014-06-26 19:42   ` Sascha Hauer
2014-06-27  9:07     ` Holger Schurig
2014-06-27 10:33       ` Sascha Hauer
2014-06-27 11:17         ` Holger Schurig

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