[U-Boot] mx6qsabrelite U-Boot from SPI-NOR

Eric Nelson eric.nelson at boundarydevices.com
Fri Jan 20 01:56:10 CET 2012


Hi Wolfgang,

On 01/19/2012 03:26 AM, Dirk Behme wrote:
> Dear Wolfgang,
>
> On 19.01.2012 10:58, Wolfgang Grandegger wrote:
>>
>> Where can I find the "SPI_to_SD_loader.bin" image?
>
> Unfortunately, at the moment you have to ask your Freescale contact for this. We
> ping Freescale since weeks for this. Last time I heard about this Freescale
> planned to release this binary under a BSD license. They are still "working
> through the licensing details", though :(
>
>> What means early
>> version of SabreLite boards?
>
> Most probably Eric will be able to better answer this.
>

At this point **all** versions of SabreLite are configured to boot to SPI
NOR through the fuses.

As Dirk mentioned, we've had some conversations about booting to SD card,
but once the fuse is blown, it's blown.

> What I understood: Up to now, the boards boot from SPI NOR by default. There was
> some _discussion_ to change this to SD boot. Most probably "early version" was
> written while this discussion under the impression that later boards might
> switch to SD boot. To my understanding the result of this discussion was that
> this change would be difficult, though.
>

We've discussed, but currently have no plans to support a physical switch
to control this decision. This would involve using the "Internal" boot mode
position of SW1 and then pulling a **bunch** of pins high or low to control
the boot flow.

Note that all of the pins are available on connector J12 (BOOT/EIM), so it
might be done with a small daughter-board.

>> How can I select boot from SD-Card on newer versions?
>
> To my understanding there are no "newer versions" yet.
>

Right.

>> And will the u-boot.imx image also boot when loaded
>> to the SPI-NOR fash?
>
> Hmm, I'm not sure about this as I haven't tested this.
>
> Eric?
>

Yes. If you program u-boot.imx to offset 0x400, it will boot.

I just did so as shown below.

I started by placing SW1 in the 01 position (boot to USB), and
used imx_usb to dowload u-boot.imx:

	MX6QSABRELITE U-Boot > dhcp 10800000 192.168.0.112:u-boot.imx
	fec_open:Speed=100
	BOOTP broadcast 1
	BOOTP broadcast 2
	DHCP client bound to address 29.6.1.24
	Using FEC device
	TFTP from server 192.168.0.112; our IP address is 29.6.1.24; sending 	through 
gateway 29.6.1.1
	Filename 'u-boot.imx'.
	Load address: 0x10800000
	Loading: #########################################
	done
	Bytes transferred = 207112 (32908 hex)
	MX6QSABRELITE U-Boot > sf write 0x10800000 0x400 $filesize

<switched SW1 to BOOT mode 0 and hit the reset button here>

	U-Boot 2011.12-00048-g5c30101 (Jan 19 2012 - 17:14:32)
	CPU:   Freescale i.MX61 family rev1.0 at 792 MHz
	Reset cause: POR
	Board: MX6Q-Sabre Lite
	DRAM:  1 GiB
	WARNING: Caches not enabled
	MMC:   FSL_SDHC: 0, FSL_SDHC: 1
	MMC init failed
	Using default environment

	In:    serial
	Out:   serial
	Err:   serial
	Net:   FEC
	Hit any key to stop autoboot:  0
	MX6QSABRELITE U-Boot >
	MX6QSABRELITE U-Boot >

The imx_usb utility is available here:
	http://boundarydevices.com/git?p=imx_usb_loader.git

It requires libusb-1.0-0-dev to build, but has few other dependencies.

Usage is simple: hand it the file you want to execute. It will look
at the header to find out where to place the image.
	~/imx_usb_loader$ sudo sudo ./imx_usb u-boot.imx

 > Please note that Eric is in the process of mainlining the SPI driver for
 > i.MX6, atm.

If you use my latest patch set, you can place the environment in SPI-NOR as
well by commenting out CONFIG_ENV_IS_IN_MMC, and un-commenting ..._IN_SPI_FLASH
in include/configs/mx6qsabrelite.h.

Regards,


Eric


More information about the U-Boot mailing list