[U-Boot] dhcp command not populating dnsip environment variable

Joe Hershberger joe.hershberger at ni.com
Mon Mar 19 20:41:49 UTC 2018


Hi Duncan,

On Sun, Mar 18, 2018 at 3:01 PM, Duncan Hare <dh at synoia.com> wrote:
> 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

Not sure why you say this...
http://git.denx.de/?p=u-boot.git;a=blob;f=net/Kconfig;h=143c4416cddde25128f5beef73ededdf7d522374;hb=HEAD#l40

>         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

It seems like we should imply them. That means we always get good
defaults but can still disable them if desired.

>
> 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.
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list