On 10/15/22 08:31, Heinrich Schuchardt wrote:
On 10/14/22 18:10, Jan Kiszka wrote:
From: Jan Kiszka <jan.kis...@siemens.com>

CONFIG_NET does not imply that there are actually network devices
available, only CONFIG_NETDEVICES does. Changing to this dependenc
CONFIG_NETDEVICES=y does not imply that any network driver is selected
it is just a tighter prerequisite than CONFIG_NET.

obsoletes the check in Kconfig because NETDEVICES means DM_ETH.

Suggested-by: Tom Rini <tr...@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

Thanks for the patch.

It is good to get rid of the dependency for CONFIG_EFI_LOADER.

Reviewed-by: Heinrich Schuchardt <xypron.g...@gmx.de>

For LicheePi_Zero_defconfig this patch results in:

arm-linux-gnueabi-ld.bfd: net/bootp.o: in function `dhcp_handler':
net/bootp.c:1080: undefined reference to `efi_net_set_dhcp_ack'

I guess we should add:

diff --git a/net/bootp.c b/net/bootp.c
index b260d5d09e..6c01e38153 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -1077,7 +1077,9 @@ static void dhcp_handler(uchar *pkt, unsigned
dest, struct in_addr sip,
                            strlen(CONFIG_SYS_BOOTFILE_PREFIX)) == 0) {
 #endif /* CONFIG_SYS_BOOTFILE_PREFIX */
                        dhcp_packet_process_options(bp);
-                       efi_net_set_dhcp_ack(pkt, len);
+                       if (CONFIG_IS_ENABLED(EFI_LOADER) &&
+                           CONFIG_IS_ENABLED(NET_DEVICES))
+                               efi_net_set_dhcp_ack(pkt, len);

As this was already incorrect before your patch:

Fixes: 0efe1bcf5c2c ("efi_loader: Add network access support")

Best regards

Heinrich

Reply via email to