[U-Boot] Antwort: Re: [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

Eric Nelson eric.nelson at boundarydevices.com
Mon Jul 15 17:31:04 CEST 2013


Hi Stephan,

On 07/15/2013 07:55 AM, Stephan Bauroth wrote:
> Hi Eric, Hi everyone else,
>
>  > It seems that there are two policy differences between
>  > the mx6qsabrelite.h and nitrogen6x.h files:
>
>  > 1. Use of MMC for environment storage
>  > 2. Use of boot script in nitrogen6x
>
>  > I think we can dispense with #1. Can you think of any reason
>  > a user would care where this is stored?
>
> I don't agree. I usually don't have a MMC put into the slot on my board,
> as I want to boot my board via NFS.

This sounds like a vote for having the environment in SPI-NOR.

 > Last week I had exactly the situation that my environment was
 > resetted everytime i rebooted the board. Since i was testing a
 > very unstable kernel, this happened a lot and i had to
 > reinitialise the environment for networking booting every
> time.

I'm not sure what you're not agreeing with. I'm suggesting that
in order to configure for boot to network, you'll need to
run a few commands:

	U-Boot > setenv serverip 192.168.0.44
	U-Boot > setenv nfsroot /path/to/rootfs
	U-Boot > setenv bootcmd "run bootcmd_net"
	U-Boot > saveenv

The 'bootcmd' is the question I have. The mx6qsabrelite.h file
currently has this:

	   "mmc dev ${mmcdev}; if mmc rescan; then " \
		   "if run loadbootscript; then " \
			   "run bootscript; " \
		   "else " \
			   "if run loaduimage; then " \
				   "run mmcboot; " \
			   "else run netboot; " \
			   "fi; " \
		   "fi; " \
	   "else run netboot; fi"

That is, "try to run from SD card, and network if that fails".

What I'm suggesting is that we make the SD card part of
things above 'bootcmd_freescale', so you have three choices
for configurations:

	U-Boot > setenv bootcmd "run bootcmd_boundary"
	U-Boot > setenv bootcmd "run bootcmd_freescale"
	U-Boot > setenv bootcmd "run bootcmd_net"

'bootcmd_freescale' and 'bootcmd_net' can be essentially
the Freescale scripts, so they match documentation done
by the Freescale team. 'bootcmd_boundary' would be the
default for boards we ship.

Any of these can be saved to SPI NOR for use at POR.

 > At the end it took me half an hour to find the swtich and the
> thing was done. But mentioning the fact in the README would have saved
> some time. :)
>

I think we're all in agreement about proper notes in the README.
We're just trying to figure out the policy to document.

Also note that since a user can over-ride 'bootcmd', all of this
are just defaults.

When I'm doing network boots, I find it easier to simply set the
'bootargs' and 'bootcmd' variables directly

U-Boot > setenv bootargs ... root=/dev/nfs nfsroot=...
U-Boot > setenv bootcmd 'dhcp 10800000 192.168.0.44:uImage && bootm'

This skips all of the conditionals and is much easier to verify.

Regards,


Eric


More information about the U-Boot mailing list