* [PATCH] net: bootp: Make root path (option 17) length configurable
@ 2022-01-28 8:40 Andre Kalb
2022-02-03 10:00 ` Ramon Fried
2022-08-08 19:07 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Andre Kalb @ 2022-01-28 8:40 UTC (permalink / raw)
To: Joe Hershberger, Ramon Fried, u-boot
to adjust the root path length.
Eg to 256 from Linux Kernel
Signed-off-by: Andre Kalb <andre.kalb@sma.de>
---
include/net.h | 2 +-
net/Kconfig | 6 ++++++
net/bootp.c | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/net.h b/include/net.h
index b02e4f630c..6f3f3dfcd4 100644
--- a/include/net.h
+++ b/include/net.h
@@ -540,7 +540,7 @@ extern struct in_addr net_dns_server2;
#endif
extern char net_nis_domain[32]; /* Our IS domain */
extern char net_hostname[32]; /* Our hostname */
-extern char net_root_path[64]; /* Our root path */
+extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */
/** END OF BOOTP EXTENTIONS **/
extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */
extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */
diff --git a/net/Kconfig b/net/Kconfig
index 2ae9d6a020..553e271ce9 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -123,4 +123,10 @@ config BOOTP_SERVERIP
variable, not the BOOTP server. This affects the operation of both
bootp and tftp.
+config BOOTP_MAX_ROOT_PATH_LEN
+ int "Option 17 root path length"
+ default 64
+ help
+ Select maximal length of option 17 root path.
+
endif # if NET
diff --git a/net/bootp.c b/net/bootp.c
index d83e4eb0ba..1566fc5495 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -64,7 +64,7 @@ ulong bootp_start;
ulong bootp_timeout;
char net_nis_domain[32] = {0,}; /* Our NIS domain */
char net_hostname[32] = {0,}; /* Our hostname */
-char net_root_path[64] = {0,}; /* Our bootpath */
+char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN] = {0,}; /* Our bootpath */
static ulong time_taken_max;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: bootp: Make root path (option 17) length configurable
2022-01-28 8:40 [PATCH] net: bootp: Make root path (option 17) length configurable Andre Kalb
@ 2022-02-03 10:00 ` Ramon Fried
2022-08-08 19:07 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Ramon Fried @ 2022-02-03 10:00 UTC (permalink / raw)
To: Andre Kalb; +Cc: Joe Hershberger, U-Boot Mailing List
On Fri, Jan 28, 2022 at 10:41 AM Andre Kalb <svc.sw.rte.linux@sma.de> wrote:
>
> to adjust the root path length.
> Eg to 256 from Linux Kernel
>
> Signed-off-by: Andre Kalb <andre.kalb@sma.de>
> ---
> include/net.h | 2 +-
> net/Kconfig | 6 ++++++
> net/bootp.c | 2 +-
> 3 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/net.h b/include/net.h
> index b02e4f630c..6f3f3dfcd4 100644
> --- a/include/net.h
> +++ b/include/net.h
> @@ -540,7 +540,7 @@ extern struct in_addr net_dns_server2;
> #endif
> extern char net_nis_domain[32]; /* Our IS domain */
> extern char net_hostname[32]; /* Our hostname */
> -extern char net_root_path[64]; /* Our root path */
> +extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */
> /** END OF BOOTP EXTENTIONS **/
> extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */
> extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */
> diff --git a/net/Kconfig b/net/Kconfig
> index 2ae9d6a020..553e271ce9 100644
> --- a/net/Kconfig
> +++ b/net/Kconfig
> @@ -123,4 +123,10 @@ config BOOTP_SERVERIP
> variable, not the BOOTP server. This affects the operation of both
> bootp and tftp.
>
> +config BOOTP_MAX_ROOT_PATH_LEN
> + int "Option 17 root path length"
> + default 64
> + help
> + Select maximal length of option 17 root path.
> +
> endif # if NET
> diff --git a/net/bootp.c b/net/bootp.c
> index d83e4eb0ba..1566fc5495 100644
> --- a/net/bootp.c
> +++ b/net/bootp.c
> @@ -64,7 +64,7 @@ ulong bootp_start;
> ulong bootp_timeout;
> char net_nis_domain[32] = {0,}; /* Our NIS domain */
> char net_hostname[32] = {0,}; /* Our hostname */
> -char net_root_path[64] = {0,}; /* Our bootpath */
> +char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN] = {0,}; /* Our bootpath */
>
> static ulong time_taken_max;
>
> --
> 2.31.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: bootp: Make root path (option 17) length configurable
2022-01-28 8:40 [PATCH] net: bootp: Make root path (option 17) length configurable Andre Kalb
2022-02-03 10:00 ` Ramon Fried
@ 2022-08-08 19:07 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-08-08 19:07 UTC (permalink / raw)
To: Andre Kalb; +Cc: Joe Hershberger, Ramon Fried, u-boot
[-- Attachment #1: Type: text/plain, Size: 282 bytes --]
On Fri, Jan 28, 2022 at 09:40:32AM +0100, Andre Kalb wrote:
> to adjust the root path length.
> Eg to 256 from Linux Kernel
>
> Signed-off-by: Andre Kalb <andre.kalb@sma.de>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-08 19:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 8:40 [PATCH] net: bootp: Make root path (option 17) length configurable Andre Kalb
2022-02-03 10:00 ` Ramon Fried
2022-08-08 19:07 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).