dhcp command not populating dnsip environment variable
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_LONGHELPHowever 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.
Hi Duncan,
Quoted 15 lines · Duncan Hare
Cause: u-boot/Kconfig
DISTRO_DEFAULTSmissing variables inKconfigfilesu-boot/ config
DISTRO_DEFAULTScontains 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
Quoted 3 lines
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
Quoted 11 lines
BOOTP_GATEWAY
BOOTP_HOSTNAME
BOOTP_PXE
BOOTP_SUBNETMASKand possibly common/Kconfig no reference to
HUSH_PARSER
CMDLINE_EDITING
AUTO_COMPLETE
SYS_LONGHELP
Quoted 5 lines
Synptom: Causing the lack of option returned on a dhcp request.
Solutions: Three possible solutions to net/Kconfig omissions
1. Add them to
Kconfigand 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.
Quoted 35 lines
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
Kconfigreferences a directive which does not exist in any includedKconfigfile. Mysteries which require days to find the config variable or days to resolve are not user friendly.Any
Kconfigdefine 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 levelKconfigselection.For documentation there needs to be an autogenerated
Kconfigtree, 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
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Mon, 19 Mar 2018 21:24:50 +0000 (UTC)
Duncan Hare <[email protected]> wrote:
Joe
My approach with the bootp options was a submenu in the net/Kconfig file. coupled with imply directives as suggested in defaults_distro_config.
However:
The "if NET" directive in net/kconfig precludes menu...endmenu directives between the if...endif.
The menu directive precludes if...endif directives in a menu.
A submenu for bootp/dhcp options appears not possible.
The NET directive is selected by the CMD_NET directive in cmd/Kconfig.
One can create a menuu/submenu by removeing the if NET...end directive, but that appears to defeat the objective of excluding the net component.
Suggestions? Guidance?