[PATCH v3] bootstd: make it possible to use tftp for netboot with standardboot

Simon Glass sjg at chromium.org
Fri Sep 26 16:48:04 CEST 2025


Hi Benjamin,

On Wed, 24 Sept 2025 at 01:42, Benjamin Hahn <B.Hahn at phytec.de> wrote:
>
> 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.
>
> Signed-off-by: Benjamin Hahn <B.Hahn at phytec.de>
> ---
> Changes in v3:
> - code styling update
> - Link to v2: https://lore.kernel.org/r/20250923-ip_dyn_bootstd-v2-1-eb59a788e647@phytec.de
>
> Changes in v2:
> - fix build error when CONFIG_CMD_TFTPBOOT is not activated
> - Link to v1: https://lore.kernel.org/r/20250911-ip_dyn_bootstd-v1-1-74f74507cc18@phytec.de
> ---
>  boot/bootmeth_script.c           |  6 +++++-
>  cmd/net.c                        | 18 ++++++++++++++++++
>  doc/develop/bootstd/overview.rst |  4 ++++
>  doc/develop/bootstd/script.rst   |  6 ++++--
>  include/net-common.h             |  8 ++++++++
>  5 files changed, 39 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

It would be great if we could have some network tests, with fake
packets perhaps, like we have disk-based tests. The disk tests are
lightning fast. I've been trying to nudge things towards booting
without CONFIG_CMDLINE, but networking is a bit behind for now.

Regards,
Simon


More information about the U-Boot mailing list