public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] dhcp command not populating dnsip environment variable
@ 2018-03-15 20:25 Duncan Hare
  2018-03-15 20:29 ` Joe Hershberger
  0 siblings, 1 reply; 8+ messages in thread
From: Duncan Hare @ 2018-03-15 20:25 UTC (permalink / raw)
  To: u-boot

In the latest version of u-boot, the dhcp command appears not to
populate the environment variable dnsip. This used to be the behaviour.

The dns command works, if dnsip is populated manually.

Is the a Kconfig variable controlling this? Or is there a new
environment variable?

Thanks

Duncan Hare

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [U-Boot] dhcp command not populating dnsip environment variable
@ 2018-03-18 20:01 Duncan Hare
  2018-03-19 20:41 ` Joe Hershberger
  0 siblings, 1 reply; 8+ messages in thread
From: Duncan Hare @ 2018-03-18 20:01 UTC (permalink / raw)
  To: u-boot

Cause: u-boot/Kconfig DISTRO_DEFAULTS missing variables in Kconfig files

u-boot/ config DISTRO_DEFAULTS contains these directives:

        select HUSH_PARSER
        select BOOTP_BOOTPATH if NET && CMD_NET
        select BOOTP_DNS if NET && CMD_NET
        select BOOTP_GATEWAY if NET && CMD_NET
        select BOOTP_HOSTNAME if NET && CMD_NET
        select BOOTP_PXE if NET && CMD_NET
        select BOOTP_SUBNETMASK if NET && CMD_NET
        select CMDLINE_EDITING
        select AUTO_COMPLETE
        select SYS_LONGHELP

However net/Kconfig has no references to:
        BOOTP_BOOTPATH
        BOOTP_DNS
        BOOTP_GATEWAY
        BOOTP_HOSTNAME
        BOOTP_PXE
        BOOTP_SUBNETMASK

and possibly common/Kconfig no reference to
	HUSH_PARSER
        CMDLINE_EDITING
        AUTO_COMPLETE
        SYS_LONGHELP

Synptom: Causing the lack of option returned on a dhcp request.

Solutions: Three possible solutions to net/Kconfig omissions
 
1. Add them to Kconfig and select then cmd/Kconfig

2. As they are bootp/dhcp options, always include them ny removing the
preprocessor (ifdef) selections. The code fragments they require are
small, as is the space for the options returned.

3.Configure them when NET and BOOTP or DHCP commands are selected. It
appears they are subordinate to NET features and not stand alone config
options.

I recommend (2). I'm from the simple is good school. This level of
granularity of configuration of the bootp/dchp options appears
unnecessary.

Further action

There needs to be a compile time warning when a select clause in Kconfig
references a directive which does not exist in any included Kconfig
file. Mysteries which require days to find the config variable or days
to resolve are not user friendly.

Any Kconfig define which requires more than a second level
menu option needs close scrutiny. As much as possible a third or
higher level configuration define should be controlled by a
"select" by lower level Kconfig selection.

For documentation there needs to be an autogenerated Kconfig tree,
of the complete tree and with highlighted currently selected 
items. An example of this is the systemd "systemctl list
dependencies" command.

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

end of thread, other threads:[~2018-03-23 18:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-15 20:25 [U-Boot] dhcp command not populating dnsip environment variable Duncan Hare
2018-03-15 20:29 ` Joe Hershberger
2018-03-16  3:00   ` Duncan Hare
2018-03-16 17:18   ` Duncan Hare
2018-03-16 17:49     ` Joe Hershberger
  -- strict thread matches above, loose matches on Subject: below --
2018-03-18 20:01 Duncan Hare
2018-03-19 20:41 ` Joe Hershberger
     [not found]   ` <1493032693.3427290.1521494690666@mail.yahoo.com>
2018-03-23 18:12     ` dh at synoia.com

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