All of lore.kernel.org
 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-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
  0 siblings, 2 replies; 8+ messages in thread
From: Joe Hershberger @ 2018-03-15 20:29 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 15, 2018 at 3:25 PM, Duncan Hare <dh@synoia.com> wrote:
> In the latest version of u-boot, the dhcp command appears not to
> populate the environment variable dnsip. This used to be the behaviour.

Is it possible that your DHCP server isn't sending it? It seems like
the code isn't changed.

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

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

* [U-Boot] dhcp command not populating dnsip environment variable
  2018-03-15 20:29 ` Joe Hershberger
@ 2018-03-16  3:00   ` Duncan Hare
  2018-03-16 17:18   ` Duncan Hare
  1 sibling, 0 replies; 8+ messages in thread
From: Duncan Hare @ 2018-03-16  3:00 UTC (permalink / raw)
  To: u-boot




 From: Joe Hershberger <joe.hershberger@ni.com>
 To: Duncan Hare <dh@synoia.com> 
Cc: u-boot <u-boot@lists.denx.de>; Joe Hershberger <joe.hershberger@ni.com>
 Sent: Thursday, March 15, 2018 1:29 PM
 Subject: Re: [U-Boot] dhcp command not populating dnsip environment variable
   
On Thu, Mar 15, 2018 at 3:25 PM, Duncan Hare <dh@synoia.com> wrote:
> In the latest version of u-boot, the dhcp command appears not to
> populate the environment variable dnsip. This used to be the behaviour.

Is it possible that your DHCP server isn't sending it? It seems like
the code isn't changed.

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


Joe
Thanks, you gave me an idea.

I fired up wireshark
See attached.

Old release: Before Kconfig work options requested (many) including DNS server address

After: No options

I see no where in u-boot to set DHCP options. 

Kconfig is a good idea. HOWEVER, the previous defaults should be selected as the base set. 
Choosing The NULL set is a very unfriendly choice.

What do we do to resolve this?
 Duncan Hare

714 931 7952

   

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

* [U-Boot] dhcp command not populating dnsip environment variable
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Duncan Hare @ 2018-03-16 17:18 UTC (permalink / raw)
  To: u-boot



  On Thu, Mar 15, 2018 at 3:25 PM, Duncan Hare <dh@synoia.com> wrote:
> 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 bootp.c code was changed with the addition of Kconfig control of Bootp.c (of which dhcp is a part).There does not appear to be the cond in net/ Kconfig to manage the Bootp config in menuconfig.
The change log at the top of bootp.c has no note to indicate the module was changed. 
Adding the note would appears to be the proper process.
How many other source code modules have been changed without a change note?Finding this has taken two or three days.
I can find no entries in .config nor in menuconfig to configure the bootp options.

Would you like me to prepare a patch for net/Kconfig?
Duncan Hare

   

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

* [U-Boot] dhcp command not populating dnsip environment variable
  2018-03-16 17:18   ` Duncan Hare
@ 2018-03-16 17:49     ` Joe Hershberger
  0 siblings, 0 replies; 8+ messages in thread
From: Joe Hershberger @ 2018-03-16 17:49 UTC (permalink / raw)
  To: u-boot

Hi Duncan,

On Fri, Mar 16, 2018 at 12:18 PM, Duncan Hare <dh@synoia.com> wrote:
>
>
>   On Thu, Mar 15, 2018 at 3:25 PM, Duncan Hare <dh@synoia.com> wrote:
>> 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 bootp.c code was changed with the addition of Kconfig control of Bootp.c (of which dhcp is a part).There does not appear to be the cond in net/ Kconfig to manage the Bootp config in menuconfig.

Are you referring to commit 3b3ea2c56ec4bc5588281fd103c744e608f8b25c
("Kconfig: cmd: Make networking command dependent on NET")?

> The change log at the top of bootp.c has no note to indicate the module was changed.
> Adding the note would appears to be the proper process.
> How many other source code modules have been changed without a change note?Finding this has taken two or three days.
> I can find no entries in .config nor in menuconfig to configure the bootp options.

commit d021e942107a1f7304a879cec99286ca462f7be3 ("Convert
CONFIG_BOOTP_BOOTPATH et al to Kconfig") moved CONFIG_BOOTP_DNS, but
not CONFIG_BOOTP_DNS2 for some reason. The README was changed to
delete the description of both, though.

> Would you like me to prepare a patch for net/Kconfig?

Sure, that sounds great.

> Duncan Hare
Thanks,
-Joe

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

* [U-Boot] dhcp command not populating dnsip environment variable
       [not found]   ` <1493032693.3427290.1521494690666@mail.yahoo.com>
@ 2018-03-23 18:12     ` dh at synoia.com
  0 siblings, 0 replies; 8+ messages in thread
From: dh at synoia.com @ 2018-03-23 18:12 UTC (permalink / raw)
  To: u-boot

On Mon, 19 Mar 2018 21:24:50 +0000 (UTC)
Duncan Hare <dh@synoia.com> 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?

^ 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
       [not found]   ` <1493032693.3427290.1521494690666@mail.yahoo.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Hershberger @ 2018-03-19 20:41 UTC (permalink / raw)
  To: u-boot

Hi Duncan,

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

^ 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
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.