[PATCH] Add linux.devname property to eth device
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Nov 22 23:51:41 PST 2017
On Tue, Nov 21, 2017 at 04:40:47PM +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 property linux.devname to eth devices.
> The value is added to bootargs per interface and can be changed in
> env/network/INTF
>
> Note that the device name is also used when dhcp is in use.
>
> Signed-off-by: Gavin Schenk <g.schenk at eckelmann.de>
> ---
>
> This is V2 of "[PATCH] Configure network device for nfsboot via nv var"
After first thinking that the former patch was a good idea, seeing this
now I agree with Sascha this new approach is better.
Maybe add the following (in a separate commit?):
diff --git a/defaultenv/defaultenv-2-base/network/eth0 b/defaultenv/defaultenv-2-base/network/eth0
index 33fe7c1b2b48..992e37a35deb 100644
--- a/defaultenv/defaultenv-2-base/network/eth0
+++ b/defaultenv/defaultenv-2-base/network/eth0
@@ -13,6 +13,10 @@ serverip=
# MAC address if needed
#ethaddr=xx:xx:xx:xx:xx:xx
+# device name under Linux (needed for static setups with more than
+# one network adapter)
+#linuxdevname=eth0
+
# put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover
exit 0
Other than that:
Acked-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the barebox
mailing list