[U-Boot] [PATCH v2 0/3] net: Sanitize DHCP variable override
Alexander Graf
agraf at suse.de
Thu Jun 14 10:04:23 UTC 2018
While trying to boot from network on a RISC-V AX25 platform, I saw
that the DHCP IP address did not get populated from the DHCP server
IP address. The reason for that was simple: CONFIG_BOOTP_SERVERIP
was set.
I don't know the history of that option, but it seems to decrease
intuitivity levels of the dhcp command rather than improve it.
What I usually would expect is that explicitly set values populate
through all layers. So if I set a TFTP file name, it populates. If
I set a target IP address, it populates. If I don't set anything,
the values get filled in automatically.
This patch set is trying to move us into that direction without
breaking people that rely on the existing behavior. With this patch
set applied, boards have the option to prefer the 'serverip'
environment variable (ax25-ae350 gets moved to it) over the DHCP
given address and any value explicitly set on the command line is
always preferred.
This hopefully makes the command line a bit more intuitive.
v1 -> v2:
- new patch: net: Prefer command line arguments
- remove README entry
- improve Kconfig help texts
Alexander Graf (3):
net: Prefer command line arguments
net: Add option to prefer bootp/dhcp serverip
ax25: Switch to CONFIG_BOOTP_PREFER_SERVERIP
cmd/Kconfig | 11 +++++++++++
cmd/net.c | 10 ++++++++--
configs/ax25-ae350_defconfig | 1 +
include/configs/ax25-ae350.h | 1 -
include/net.h | 2 ++
net/bootp.c | 10 ++++++++--
net/net.c | 2 ++
7 files changed, 32 insertions(+), 5 deletions(-)
--
2.12.3
More information about the U-Boot
mailing list