<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/net-common.h, branch v2026.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>bootstd: make it possible to use tftp for netboot with standardboot</title>
<updated>2025-10-24T19:47:50+00:00</updated>
<author>
<name>Benjamin Hahn</name>
<email>B.Hahn@phytec.de</email>
</author>
<published>2025-10-21T14:34:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fae6c54d238279bf79c66ca65330425dff2c952f'/>
<id>fae6c54d238279bf79c66ca65330425dff2c952f</id>
<content type='text'>
Add the option to load the bootscript with the tftp command (static IP)
instead of the dhcp command (dynamic IP). For this a new function
tftpb_run similar to dhcp_run, is needed. The selection of which command
to use can be done with the ip_dyn environment variable, which can be
set to yes or no. The ip_dyn variable was chosen as it is already in use
on the imx platforms.
Also edit the bootstd doc.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Benjamin Hahn &lt;B.Hahn@phytec.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the option to load the bootscript with the tftp command (static IP)
instead of the dhcp command (dynamic IP). For this a new function
tftpb_run similar to dhcp_run, is needed. The selection of which command
to use can be done with the ip_dyn environment variable, which can be
set to yes or no. The ip_dyn variable was chosen as it is already in use
on the imx platforms.
Also edit the bootstd doc.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Benjamin Hahn &lt;B.Hahn@phytec.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: make dhcp_run() common for NET and NET_LWIP</title>
<updated>2025-10-22T12:28:33+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-10-09T12:30:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4b8e78585171787794611205d661b97bc5f4dd83'/>
<id>4b8e78585171787794611205d661b97bc5f4dd83</id>
<content type='text'>
There are currently two implementations of dhcp_run(): one in cmd/net.c
for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no
justification for that. Therefore, move the NET version into
net/net-common.c to be used by both stacks, and drop the NET_LWIP
version which by the way does not look totally correct.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Benjamin Hahn &lt;B.Hahn@phytec.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are currently two implementations of dhcp_run(): one in cmd/net.c
for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no
justification for that. Therefore, move the NET version into
net/net-common.c to be used by both stacks, and drop the NET_LWIP
version which by the way does not look totally correct.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Suggested-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Benjamin Hahn &lt;B.Hahn@phytec.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lwip: add sntp command</title>
<updated>2025-07-08T09:07:37+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-06-25T13:19:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a2a0c7527eb86e69bc7a78d9250eb5a1068ae5b7'/>
<id>a2a0c7527eb86e69bc7a78d9250eb5a1068ae5b7</id>
<content type='text'>
Implement the sntp command when NET_LWIP=y.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the sntp command when NET_LWIP=y.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: extract function net_sntp_set_rtc() from sntp_handler()</title>
<updated>2025-07-08T09:07:37+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-06-25T13:19:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=77f0bed326b658fcb57f278bd5228afbe382401a'/>
<id>77f0bed326b658fcb57f278bd5228afbe382401a</id>
<content type='text'>
Extract the code that sets the RTC clock from sntp_handler() in
net/sntp.c and make it a new function net_sntp_set_rtc() in
net/net-common.c. This will allow re-use with NET_LWIP.

According to [1] it is safe to assume that all devices have been
converted to DM_RTC so drop the useless code.

[1] https://lists.denx.de/pipermail/u-boot/2025-June/591376.html

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extract the code that sets the RTC clock from sntp_handler() in
net/sntp.c and make it a new function net_sntp_set_rtc() in
net/net-common.c. This will allow re-use with NET_LWIP.

According to [1] it is safe to assume that all devices have been
converted to DM_RTC so drop the useless code.

[1] https://lists.denx.de/pipermail/u-boot/2025-June/591376.html

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge patch series "Remove &lt;env.h&gt; from &lt;net.h&gt;"</title>
<updated>2025-05-29T14:31:07+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-29T14:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=62905f4a929b476761caff1078c88e1d3216b175'/>
<id>62905f4a929b476761caff1078c88e1d3216b175</id>
<content type='text'>
Tom Rini &lt;trini@konsulko.com&gt; says:

Hey all,

This is a v3 of Simon's series[1] and depends on the series[2] I posted
the other day that removes &lt;env.h&gt; from &lt;command.h&gt;. With this series
done, I believe we've tackled all of the current cases of headers which
include &lt;env.h&gt; without directly needing it. Much of this series is in
fact Simon's v2 with the main differneces being:
- Removing &lt;env.h&gt; from &lt;net.h&gt; at the end
- Removing env_to_ip() given how little it's used rather than shuffling
  around where it's declared and un-inline'ing it. For a rarely used
  helper, this ends up being cleaner I think. Especially looking at some
  of the users (which called env_get repeatedly). If there's strong
  opinion here about using the other method[3] we can do that instead.
- Setting aside for now how to handle CMD_ELF=y and NO_NET=y because
  today it's actually fine as we unconditionally build lib/net_utils.c
  where string_to_ip() is defined. I'm unsure if a further series is
  warranted here or not. We rely on link-time optimization to keep code
  readable too.

[1]: https://lore.kernel.org/all/20250501010456.3930701-1-sjg@chromium.org
[2]: https://lore.kernel.org/all/20250514225002.15361-1-trini@konsulko.com
[3]: https://lore.kernel.org/all/20250501010456.3930701-23-sjg@chromium.org
Link: https://lore.kernel.org/r/20250515234154.1859366-1-trini@konsulko.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tom Rini &lt;trini@konsulko.com&gt; says:

Hey all,

This is a v3 of Simon's series[1] and depends on the series[2] I posted
the other day that removes &lt;env.h&gt; from &lt;command.h&gt;. With this series
done, I believe we've tackled all of the current cases of headers which
include &lt;env.h&gt; without directly needing it. Much of this series is in
fact Simon's v2 with the main differneces being:
- Removing &lt;env.h&gt; from &lt;net.h&gt; at the end
- Removing env_to_ip() given how little it's used rather than shuffling
  around where it's declared and un-inline'ing it. For a rarely used
  helper, this ends up being cleaner I think. Especially looking at some
  of the users (which called env_get repeatedly). If there's strong
  opinion here about using the other method[3] we can do that instead.
- Setting aside for now how to handle CMD_ELF=y and NO_NET=y because
  today it's actually fine as we unconditionally build lib/net_utils.c
  where string_to_ip() is defined. I'm unsure if a further series is
  warranted here or not. We rely on link-time optimization to keep code
  readable too.

[1]: https://lore.kernel.org/all/20250501010456.3930701-1-sjg@chromium.org
[2]: https://lore.kernel.org/all/20250514225002.15361-1-trini@konsulko.com
[3]: https://lore.kernel.org/all/20250501010456.3930701-23-sjg@chromium.org
Link: https://lore.kernel.org/r/20250515234154.1859366-1-trini@konsulko.com
</pre>
</div>
</content>
</entry>
<entry>
<title>include/net.h: Drop &lt;env.h&gt;</title>
<updated>2025-05-29T14:30:25+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-15T23:31:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fe33175c073fe21945b39a4a8c27806cf0154bf3'/>
<id>fe33175c073fe21945b39a4a8c27806cf0154bf3</id>
<content type='text'>
Now that all of the cases of code that relied on &lt;net.h&gt; to provide
&lt;env.h&gt; (or one of the headers that it includes, and so forth) have been
fixed, we can drop the include from here.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that all of the cases of code that relied on &lt;net.h&gt; to provide
&lt;env.h&gt; (or one of the headers that it includes, and so forth) have been
fixed, we can drop the include from here.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove env_get_ip helper() function</title>
<updated>2025-05-29T14:30:24+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-15T23:31:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=05f6f6e8c76c68a36125ec7a6af911ee9418bc99'/>
<id>05f6f6e8c76c68a36125ec7a6af911ee9418bc99</id>
<content type='text'>
Currently, we have the function env_get_ip which takes an IP address
in string form and returns a struct in_addr representation of that
address. It is however little used and means that a number of places
indirectly (and unclearly) get &lt;env.h&gt; via &lt;net.h&gt;. To clean this up
start by replacing env_get_ip() calls with string_to_ip() calls. This is
generally a no-op as env_get_ip(str) is an inline of
string_to_ip(env_get(str)) but in a few cases we can or already have
stored the result of env_get(str) and can save the additional call.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we have the function env_get_ip which takes an IP address
in string form and returns a struct in_addr representation of that
address. It is however little used and means that a number of places
indirectly (and unclearly) get &lt;env.h&gt; via &lt;net.h&gt;. To clean this up
start by replacing env_get_ip() calls with string_to_ip() calls. This is
generally a no-op as env_get_ip(str) is an inline of
string_to_ip(env_get(str)) but in a few cases we can or already have
stored the result of env_get(str) and can save the additional call.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net, net-lwip: wget: suppress console output when called by EFI</title>
<updated>2025-05-20T13:43:08+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-04-17T13:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9349fc2e9c76d042f424edfa69cf421225bf0fcc'/>
<id>9349fc2e9c76d042f424edfa69cf421225bf0fcc</id>
<content type='text'>
Functions called from EFI applications should not do console output.
Refactor the wget code to implement this requirement. The wget_http_info
struct is used to hold the boolean that signifies whether the output is
allowed or not.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reported-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions called from EFI applications should not do console output.
Refactor the wget code to implement this requirement. The wget_http_info
struct is used to hold the boolean that signifies whether the output is
allowed or not.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reported-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ping: make do_ping() available via &lt;net.h&gt;</title>
<updated>2025-04-23T08:02:49+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-04-15T21:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1f907e559d5d29f7824115e47c9771595fdf5819'/>
<id>1f907e559d5d29f7824115e47c9771595fdf5819</id>
<content type='text'>
Make the do_ping() function in cmd/net.c a global one by getting rid of
the static qualifier, and move the prototype declaration from net-lwip.h
to net-common.h. This makes the function available to other parts of
U-Boot when CONFIG_NET=y, as was already the case when
CONFIG_NET_LWIP=y.

This is a peparation step to make the sandbox tests use a common API
between NET and NET_LWIP.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the do_ping() function in cmd/net.c a global one by getting rid of
the static qualifier, and move the prototype declaration from net-lwip.h
to net-common.h. This makes the function available to other parts of
U-Boot when CONFIG_NET=y, as was already the case when
CONFIG_NET_LWIP=y.

This is a peparation step to make the sandbox tests use a common API
between NET and NET_LWIP.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: lwip: provide net_start_again()</title>
<updated>2025-04-23T08:02:49+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2025-04-15T21:17:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=761fe6719c462716b11eddc45171d952ff86dc21'/>
<id>761fe6719c462716b11eddc45171d952ff86dc21</id>
<content type='text'>
Implement net_start_again() when NET_LWIP=y in a very similar way to
NET. This will be used in a future commit to determine if a failed
ping needs to be tried again on a different interface.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement net_start_again() when NET_LWIP=y in a very similar way to
NET. This will be used in a future commit to determine if a failed
ping needs to be tried again on a different interface.

Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
