mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
To: "Schenk, Gavin" <G.Schenk@eckelmann.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH] Configure network device for nfsboot via nv var
Date: Fri, 17 Nov 2017 10:32:11 +0100	[thread overview]
Message-ID: <20171117093211.z5h3vpthvn6b7o4w@pengutronix.de> (raw)
In-Reply-To: <1510816812.1406.2.camel@eckelmann.de>

On Thu, Nov 16, 2017 at 07:20:14AM +0000, Schenk, Gavin wrote:
> Hi,
> 
> > On Wed, Nov 08, 2017 at 04:05:17PM +0100, Gavin Schenk wrote:
> > > When you have a static network environment but more than one
> > > network
> > > device on your machine it is necessary to provide the <device>
> > > parameter to the ip parameter at kernel cmd line.
> > > 
> > > The device name assigned by Linux cannot in general be predicted as
> > > it
> > > depends on driver bind order.
> > > 
> > > This patch introduces a new global variable
> > > "global.linux.nfsroot.device" which when set is feed to the ip=
> > > kernel
> > > parameter as device name.
> > 
> > Maybe we should rather add a linuxname property to the ethernet
> > device
> > instead. That way we could specify multiple names in case we have
> > multiple ethernet devices in barebox aswell.
> > 
> 
> maybe I am missing something important, but is this useful for anything
> besides nfsboot?
> 
> If linuxname is a property of the device, how do we decide between
> eth0.linuxname and eth1.linuxname when doing a "boot /mnt/nfs"? 
> In this case we need additionally a global variable like nfsboot-
> device=eth0 to switch between nfsboot devices and to make the decision
> when filling the ip parameter?

Look again at the code. The code you patched in your patch does not
add anything directly to the kernel commandline. Instead, it fills the
network device specific variable ethx.linux.bootargs with a kernel
commandline snippet needed to boot from this particular device. So
during boot barebox will add the snippet from the actual boot device
to the commandline.
With eth0.linuxname and eth1.linuxname you will get two
eth[01].linux.bootargs variables containing the corresponding linuxname.
Depending on the ethernet device being active during boot barebox will
pick the correct string.

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

      parent reply	other threads:[~2017-11-17  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 15:05 Gavin Schenk
2017-11-10  7:00 ` Sascha Hauer
2017-11-16  7:20   ` AW: " Schenk, Gavin
2017-11-17  9:26     ` Uwe Kleine-König
2017-11-17  9:32     ` s.hauer [this message]

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=20171117093211.z5h3vpthvn6b7o4w@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=G.Schenk@eckelmann.de \
    --cc=barebox@lists.infradead.org \
    /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