mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] Networking updates
@ 2017-12-01 11:22 Sascha Hauer
  2017-12-01 11:22 ` [PATCH 01/27] detect command: Drop -e option Sascha Hauer
                   ` (26 more replies)
  0 siblings, 27 replies; 29+ messages in thread
From: Sascha Hauer @ 2017-12-01 11:22 UTC (permalink / raw)
  To: Barebox List

This series solves some issues that have been nagging me for some
time now.

First of all the manual selection of the current ethernet device is
unnecessary since the interface can be picked by the networking code
automatically based on the IP settings of the interface. With this
series the "ethact" command is gone and users of boards with multiple
network interfaces no longer have to worry about picking the right
one.

Then the network device configuration can now be done with nvvars.
This makes it unnecessary to edit scripts on the device (which may
be cumbersome on some devices which lose characters on serial ports)
and it makes it also easier for scripts or setup code to modify
the network config.

Finally the DHCP code is cleaned up, primarily to be able to pass
in the network interface that shall be used, but also to make more
clear which variables are input and which are output.

For DHCP users the configuration is simple: It is the default. A static
IP setup can now be done with the variables:

nv.net.server
nv.net.nameserver
nv.net.gateway

and the network device specific variables (assuming "eth0" as network device):

nv.dev.eth0.ipaddr
nv.dev.eth0.netmask

(For those who are not already familiar with it: It's the normal way to store
device parameters in nvvars, like already possible for example with NAND
partitioning, i.e. nv.dev.nand0.partitions=4M(barebox),-(root), see
http://www.barebox.org/doc/latest/user/variables.html#non-volatile-device-variables)

As usual, all comments are welcome.

Changes since v1:
- incorporate Sams review comments for v1
- fix setting of ip= bootargs for network boot
- fix routing when a network device does not have an IP
- More Documentation updates
- Fix hardcoded usage of eth0 in defaultenv-2 network boot
- integrate Gavins linux devname patch

Sascha


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2017-12-08 22:01 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 11:22 [PATCH v2] Networking updates Sascha Hauer
2017-12-01 11:22 ` [PATCH 01/27] detect command: Drop -e option Sascha Hauer
2017-12-01 11:22 ` [PATCH 02/27] driver: Add device_detect_all() function Sascha Hauer
2017-12-01 11:22 ` [PATCH 03/27] nvvar: when setting a nvvar to NULL just free the content Sascha Hauer
2017-12-01 11:22 ` [PATCH 04/27] net: use pr_* functions for messages Sascha Hauer
2017-12-01 11:22 ` [PATCH 05/27] net: Add and use IP_BROADCAST Sascha Hauer
2017-12-01 11:22 ` [PATCH 06/27] net: Make domainname and nameserver globalvars Sascha Hauer
2017-12-01 11:22 ` [PATCH 07/27] net: Add functions to get/set nameserver and domainname Sascha Hauer
2017-12-01 11:22 ` [PATCH 08/27] net: introduce global.net.server Sascha Hauer
2017-12-01 11:22 ` [PATCH 09/27] net: dhcp: Do not overwrite serverip if it is valid Sascha Hauer
2017-12-01 11:22 ` [PATCH 10/27] net: Use a single gateway Sascha Hauer
2017-12-01 11:22 ` [PATCH 11/27] net: allow udp connections on specified network device Sascha Hauer
2017-12-01 11:22 ` [PATCH 12/27] net: dhcp: Allow to specify " Sascha Hauer
2017-12-01 11:22 ` [PATCH 13/27] net: dhcp: avoid unnecessary casts Sascha Hauer
2017-12-01 11:22 ` [PATCH 14/27] net: dhcp: Coding style fixes Sascha Hauer
2017-12-01 11:22 ` [PATCH 15/27] net: dhcp: rework Sascha Hauer
2017-12-08 21:56   ` Oleksij Rempel
2017-12-01 11:22 ` [PATCH 16/27] net: Pick network device based on IP settings Sascha Hauer
2017-12-01 11:22 ` [PATCH 17/27] net: remove "current" network device Sascha Hauer
2017-12-01 11:22 ` [PATCH 18/27] net: ifup: Factor out a eth_discover function Sascha Hauer
2017-12-01 11:22 ` [PATCH 19/27] ifup: Use dhcp C API rather than running command Sascha Hauer
2017-12-01 11:22 ` [PATCH 20/27] net: Provide new way to configure network devices Sascha Hauer
2017-12-01 11:22 ` [PATCH 21/27] net: update network docs Sascha Hauer
2017-12-01 11:22 ` [PATCH 22/27] net: environment: remove ethx setup files Sascha Hauer
2017-12-01 11:22 ` [PATCH 23/27] net: environment: update automounts Sascha Hauer
2017-12-01 11:22 ` [PATCH 24/27] defaultenv: Add README for new network config Sascha Hauer
2017-12-01 11:22 ` [PATCH 25/27] net: Add linuxdevname property Sascha Hauer
2017-12-01 11:22 ` [PATCH 26/27] commands: Add ip_route_add command Sascha Hauer
2017-12-01 11:22 ` [PATCH 27/27] defaultenv-2: set bootargs correctly for network boot Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox