[PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand

Tom Rini trini at konsulko.com
Wed Sep 4 18:09:25 CEST 2024


On Wed, Sep 04, 2024 at 09:54:15AM +0200, Jerome Forissier wrote:
> Hi Simon,
> 
> On 8/29/24 16:05, Simon Glass wrote:
> > Hi Jerome,
> > 
> > On Fri, 23 Aug 2024 at 07:49, Jerome Forissier
> > <jerome.forissier at linaro.org> wrote:
> >>
> >> Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as
> >> well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due
> >> to this code having an implicit dependency on do_tftpb().
> >>
> >> Signed-off-by: Jerome Forissier <jerome.forissier at linaro.org>
> >> ---
> >>  board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
> >>  .../imx8mp_debix_model_a.c                    |   2 +-
> >>  board/ti/am335x/board.c                       |   3 +-
> >>  board/xilinx/common/board.c                   |   3 +-
> >>  boot/Kconfig                                  |   3 +-
> >>  cmd/Kconfig                                   |  91 +++---
> >>  cmd/Makefile                                  |   6 +-
> >>  cmd/elf.c                                     |   2 +-
> >>  cmd/net-lwip.c                                |  13 +
> >>  common/board_r.c                              |   4 +-
> >>  common/usb_kbd.c                              |   2 +-
> >>  drivers/net/Kconfig                           |   2 +-
> >>  include/net-lwip.h                            |   3 +
> >>  lib/tiny-printf.c                             |   3 +-
> >>  net/Makefile                                  |  14 +-
> >>  net/lwip/Makefile                             |   5 +
> >>  net/lwip/dhcp.c                               | 125 ++++++++
> >>  net/lwip/eth_internal.h                       |  35 +++
> >>  net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
> >>  net/lwip/tftp.c                               |  11 +
> >>  20 files changed, 560 insertions(+), 55 deletions(-)
> >>  create mode 100644 cmd/net-lwip.c
> >>  create mode 100644 net/lwip/Makefile
> >>  create mode 100644 net/lwip/dhcp.c
> >>  create mode 100644 net/lwip/eth_internal.h
> >>  create mode 100644 net/lwip/net-lwip.c
> >>  create mode 100644 net/lwip/tftp.c
> >>
> >> diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c
> >> index e2ed70caa43..bfdc447c478 100644
> >> --- a/board/engicam/imx8mp/icore_mx8mp.c
> >> +++ b/board/engicam/imx8mp/icore_mx8mp.c
> >> @@ -33,7 +33,7 @@ static void setup_fec(void)
> >>         setbits_le32(&gpr->gpr[1], BIT(22));
> >>  }
> >>
> >> -#if CONFIG_IS_ENABLED(NET)
> >> +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
> > 
> > How about making NET mean 'net', rather than having two options?
> > 
> > Perhaps the existing NET needs to be renamed to NET_INTERNAL or
> > something like that?
> 
> The problem with that is it will make it a bit harder to remove
> the legacy NET implementation, because every occurrence of
> "if NET" would need to be questioned if it is applicable to
> NET_INTERNAL only or to NET_LWIP too. IOW, some of the thinking
> already done here would need to be done again.

Would a new symbol instead help? Make both NET and NEW_LWIP select
HAS_NETWORKING or something along those lines.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240904/2f014352/attachment.sig>


More information about the U-Boot mailing list