* [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER
@ 2018-04-27 9:55 Chris Packham
2018-04-27 9:55 ` [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
2018-05-03 0:18 ` [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
0 siblings, 2 replies; 6+ messages in thread
From: Chris Packham @ 2018-04-27 9:55 UTC (permalink / raw)
To: u-boot
Add a Kconfig option for BOOTP_NTPSERVER to enable the DHCP/BOOTP option
to configure the sntp server address.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
cmd/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index bc1d2f31c010..dfb0fddb7671 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1086,6 +1086,10 @@ config BOOTP_SUBNETMASK
default y
depends on CMD_BOOTP
+config BOOTP_NTPSERVER
+ bool "Request & store 'ntpserverip' from BOOTP/DHCP server"
+ depends on CMD_BOOTP
+
config BOOTP_PXE
bool "Send PXE client arch to BOOTP/DHCP server"
default y
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option
2018-04-27 9:55 [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
@ 2018-04-27 9:55 ` Chris Packham
2018-05-03 0:23 ` Joe Hershberger
2018-05-03 0:18 ` [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
1 sibling, 1 reply; 6+ messages in thread
From: Chris Packham @ 2018-04-27 9:55 UTC (permalink / raw)
To: u-boot
When the following configuration is set
# CONFIG_CMD_DHCP is not set
CONFIG_CMD_BOOTP=y
CONFIG_BOOTP_NTPSERVER=y
The following compile error is observed
error: used struct type value where scalar is required
if (net_ntp_server)
^~~~~~~~~~~~~~
Resolve this by checking net_ntp_server.s_addr instead.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
net/bootp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bootp.c b/net/bootp.c
index efa959971c27..9d7cb5d30c14 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -333,7 +333,7 @@ static void bootp_process_vendor(u8 *ext, int size)
debug("net_nis_domain : %s\n", net_nis_domain);
#if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
- if (net_ntp_server)
+ if (net_ntp_server.s_addr)
debug("net_ntp_server : %pI4\n", &net_ntp_server);
#endif
}
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER
2018-04-27 9:55 [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
2018-04-27 9:55 ` [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
@ 2018-05-03 0:18 ` Joe Hershberger
1 sibling, 0 replies; 6+ messages in thread
From: Joe Hershberger @ 2018-05-03 0:18 UTC (permalink / raw)
To: u-boot
On Fri, Apr 27, 2018 at 4:55 AM, Chris Packham <judge.packham@gmail.com> wrote:
> Add a Kconfig option for BOOTP_NTPSERVER to enable the DHCP/BOOTP option
> to configure the sntp server address.
Please also remove it from scripts/config_whitelist.txt
Also, there is one board with it enabled:
include/configs/devkit8000.h:80. Please move this to its defconfig.
>
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
>
> cmd/Kconfig | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index bc1d2f31c010..dfb0fddb7671 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -1086,6 +1086,10 @@ config BOOTP_SUBNETMASK
> default y
> depends on CMD_BOOTP
>
> +config BOOTP_NTPSERVER
> + bool "Request & store 'ntpserverip' from BOOTP/DHCP server"
> + depends on CMD_BOOTP
> +
> config BOOTP_PXE
> bool "Send PXE client arch to BOOTP/DHCP server"
> default y
> --
> 2.17.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option
2018-04-27 9:55 ` [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
@ 2018-05-03 0:23 ` Joe Hershberger
2018-05-03 8:17 ` Chris Packham
0 siblings, 1 reply; 6+ messages in thread
From: Joe Hershberger @ 2018-05-03 0:23 UTC (permalink / raw)
To: u-boot
On Fri, Apr 27, 2018 at 4:55 AM, Chris Packham <judge.packham@gmail.com> wrote:
> When the following configuration is set
>
> # CONFIG_CMD_DHCP is not set
> CONFIG_CMD_BOOTP=y
> CONFIG_BOOTP_NTPSERVER=y
>
> The following compile error is observed
>
> error: used struct type value where scalar is required
> if (net_ntp_server)
> ^~~~~~~~~~~~~~
We should probably enable CMD_SNTP in devkit8000 so that this code
path is compiled on travis. Can you add a patch for that to the
series?
>
> Resolve this by checking net_ntp_server.s_addr instead.
>
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> ---
>
> net/bootp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bootp.c b/net/bootp.c
> index efa959971c27..9d7cb5d30c14 100644
> --- a/net/bootp.c
> +++ b/net/bootp.c
> @@ -333,7 +333,7 @@ static void bootp_process_vendor(u8 *ext, int size)
> debug("net_nis_domain : %s\n", net_nis_domain);
>
> #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
> - if (net_ntp_server)
> + if (net_ntp_server.s_addr)
> debug("net_ntp_server : %pI4\n", &net_ntp_server);
> #endif
> }
> --
> 2.17.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option
2018-05-03 0:23 ` Joe Hershberger
@ 2018-05-03 8:17 ` Chris Packham
2018-05-03 15:12 ` Joe Hershberger
0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2018-05-03 8:17 UTC (permalink / raw)
To: u-boot
On Thu, May 3, 2018 at 12:23 PM Joe Hershberger <joe.hershberger@ni.com>
wrote:
> On Fri, Apr 27, 2018 at 4:55 AM, Chris Packham <judge.packham@gmail.com>
wrote:
> > When the following configuration is set
> >
> > # CONFIG_CMD_DHCP is not set
> > CONFIG_CMD_BOOTP=y
> > CONFIG_BOOTP_NTPSERVER=y
> >
> > The following compile error is observed
> >
> > error: used struct type value where scalar is required
> > if (net_ntp_server)
> > ^~~~~~~~~~~~~~
> We should probably enable CMD_SNTP in devkit8000 so that this code
> path is compiled on travis. Can you add a patch for that to the
> series?
It's not quite that simple. CONFIG_CMD_DHCP is selected by
CONFIG_DISTRO_DEFAULTS. So just turning on CMD_SNTP doesn't catch this.
It'd be a fairly invasive change to disable CONFIG_DISTRO_DEFAULTS. For now
I'll send a v2 series with just the changes for 1/2.
> >
> > Resolve this by checking net_ntp_server.s_addr instead.
> >
> > Signed-off-by: Chris Packham <judge.packham@gmail.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> > ---
> >
> > net/bootp.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/bootp.c b/net/bootp.c
> > index efa959971c27..9d7cb5d30c14 100644
> > --- a/net/bootp.c
> > +++ b/net/bootp.c
> > @@ -333,7 +333,7 @@ static void bootp_process_vendor(u8 *ext, int size)
> > debug("net_nis_domain : %s\n", net_nis_domain);
> >
> > #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
> > - if (net_ntp_server)
> > + if (net_ntp_server.s_addr)
> > debug("net_ntp_server : %pI4\n", &net_ntp_server);
> > #endif
> > }
> > --
> > 2.17.0
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option
2018-05-03 8:17 ` Chris Packham
@ 2018-05-03 15:12 ` Joe Hershberger
0 siblings, 0 replies; 6+ messages in thread
From: Joe Hershberger @ 2018-05-03 15:12 UTC (permalink / raw)
To: u-boot
On Thu, May 3, 2018 at 3:17 AM, Chris Packham <judge.packham@gmail.com> wrote:
> On Thu, May 3, 2018 at 12:23 PM Joe Hershberger <joe.hershberger@ni.com>
> wrote:
>
>> On Fri, Apr 27, 2018 at 4:55 AM, Chris Packham <judge.packham@gmail.com>
> wrote:
>> > When the following configuration is set
>> >
>> > # CONFIG_CMD_DHCP is not set
>> > CONFIG_CMD_BOOTP=y
>> > CONFIG_BOOTP_NTPSERVER=y
>> >
>> > The following compile error is observed
>> >
>> > error: used struct type value where scalar is required
>> > if (net_ntp_server)
>> > ^~~~~~~~~~~~~~
>
>> We should probably enable CMD_SNTP in devkit8000 so that this code
>> path is compiled on travis. Can you add a patch for that to the
>> series?
>
> It's not quite that simple. CONFIG_CMD_DHCP is selected by
> CONFIG_DISTRO_DEFAULTS. So just turning on CMD_SNTP doesn't catch this.
> It'd be a fairly invasive change to disable CONFIG_DISTRO_DEFAULTS. For now
> I'll send a v2 series with just the changes for 1/2.
Sounds good. Maybe it would be easier to enable the combo needed to
instigate this on a board that does not use DISTRO_DEFAULTS.
>
>> >
>> > Resolve this by checking net_ntp_server.s_addr instead.
>> >
>> > Signed-off-by: Chris Packham <judge.packham@gmail.com>
>
>> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>
>> > ---
>> >
>> > net/bootp.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/net/bootp.c b/net/bootp.c
>> > index efa959971c27..9d7cb5d30c14 100644
>> > --- a/net/bootp.c
>> > +++ b/net/bootp.c
>> > @@ -333,7 +333,7 @@ static void bootp_process_vendor(u8 *ext, int size)
>> > debug("net_nis_domain : %s\n", net_nis_domain);
>> >
>> > #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
>> > - if (net_ntp_server)
>> > + if (net_ntp_server.s_addr)
>> > debug("net_ntp_server : %pI4\n", &net_ntp_server);
>> > #endif
>> > }
>> > --
>> > 2.17.0
>> >
>> > _______________________________________________
>> > U-Boot mailing list
>> > U-Boot at lists.denx.de
>> > https://lists.denx.de/listinfo/u-boot
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-03 15:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 9:55 [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
2018-04-27 9:55 ` [U-Boot] [PATCH 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
2018-05-03 0:23 ` Joe Hershberger
2018-05-03 8:17 ` Chris Packham
2018-05-03 15:12 ` Joe Hershberger
2018-05-03 0:18 ` [U-Boot] [PATCH 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
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.