* [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER
@ 2018-05-03 8:19 Chris Packham
2018-05-03 8:19 ` [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Packham @ 2018-05-03 8:19 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>
---
Changes in v2:
- update devkit8000 config
- remove from config_whitelist.txt
cmd/Kconfig | 4 ++++
configs/devkit8000_defconfig | 1 +
include/configs/devkit8000.h | 1 -
scripts/config_whitelist.txt | 1 -
4 files changed, 5 insertions(+), 2 deletions(-)
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
diff --git a/configs/devkit8000_defconfig b/configs/devkit8000_defconfig
index defed2d65a70..4a096b926597 100644
--- a/configs/devkit8000_defconfig
+++ b/configs/devkit8000_defconfig
@@ -18,6 +18,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_NAND=y
CONFIG_CMD_NAND_LOCK_UNLOCK=y
# CONFIG_CMD_SETEXPR is not set
+CONFIG_BOOTP_NTPSERVER=y
CONFIG_CMD_JFFS2=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nand0=nand"
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index dfbbb21a04c7..3b787be9000c 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -82,7 +82,6 @@
#define CONFIG_BOOTP_BOOTFILESIZE
#define CONFIG_BOOTP_DNS2
#define CONFIG_BOOTP_SEND_HOSTNAME
-#define CONFIG_BOOTP_NTPSERVER
#define CONFIG_BOOTP_TIMEOFFSET
#undef CONFIG_BOOTP_VENDOREX
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 9eba487ec4c5..0c0862d48db9 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -157,7 +157,6 @@ CONFIG_BOOTP_DHCP_REQUEST_DELAY
CONFIG_BOOTP_ID_CACHE_SIZE
CONFIG_BOOTP_MAY_FAIL
CONFIG_BOOTP_NISDOMAIN
-CONFIG_BOOTP_NTPSERVER
CONFIG_BOOTP_RANDOM_DELAY
CONFIG_BOOTP_SEND_HOSTNAME
CONFIG_BOOTP_SERVERIP
--
2.17.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option
2018-05-03 8:19 [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
@ 2018-05-03 8:19 ` Chris Packham
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-05-03 15:15 ` [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, " Tom Rini
2 siblings, 1 reply; 5+ messages in thread
From: Chris Packham @ 2018-05-03 8:19 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>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
---
Changes in v2:
- collect Ack from Joe
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] 5+ messages in thread
* [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER
2018-05-03 8:19 [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
2018-05-03 8:19 ` [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
@ 2018-05-03 15:15 ` Joe Hershberger
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, " Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Joe Hershberger @ 2018-05-03 15:15 UTC (permalink / raw)
To: u-boot
On Thu, May 3, 2018 at 3:19 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.
>
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot, v2, 1/2] net: Add Kconfig option for BOOTP_NTPSERVER
2018-05-03 8:19 [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
2018-05-03 8:19 ` [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
2018-05-03 15:15 ` [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
@ 2018-05-15 12:28 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2018-05-15 12:28 UTC (permalink / raw)
To: u-boot
On Thu, May 03, 2018 at 08:19:02PM +1200, Chris Packham wrote:
> 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>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180515/47086bdc/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot, v2, 2/2] net: bootp: Fix compile error processing ntpserver option
2018-05-03 8:19 ` [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
@ 2018-05-15 12:28 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2018-05-15 12:28 UTC (permalink / raw)
To: u-boot
On Thu, May 03, 2018 at 08:19:03PM +1200, Chris Packham 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)
> ^~~~~~~~~~~~~~
>
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180515/d10e39f8/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-15 12:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 8:19 [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
2018-05-03 8:19 ` [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option Chris Packham
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-05-03 15:15 ` [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, " Tom Rini
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.