public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Antwort: Re: [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x
Date: Mon, 15 Jul 2013 08:31:04 -0700	[thread overview]
Message-ID: <51E415B8.6040506@boundarydevices.com> (raw)
In-Reply-To: <OF8F67A6BC.5FBC74A7-ONC1257BA9.00515F34-C1257BA9.0051F3AC@retarus.de>

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

  reply	other threads:[~2013-07-15 15:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15  2:40 [U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x Fabio Estevam
2013-07-15  2:44 ` Otavio Salvador
2013-07-15  2:52   ` Fabio Estevam
2013-07-15  2:58     ` Otavio Salvador
2013-07-15  4:09       ` Eric Nelson
2013-07-15  4:23         ` Fabio Estevam
2013-07-15 14:20           ` Eric Nelson
2013-07-15 14:55             ` [U-Boot] Antwort: " Stephan Bauroth
2013-07-15 15:31               ` Eric Nelson [this message]
2013-07-15 15:33             ` [U-Boot] " Fabio Estevam
2013-07-15 15:43               ` Eric Nelson
2013-07-15  7:14 ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E415B8.6040506@boundarydevices.com \
    --to=eric.nelson@boundarydevices.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox