[PATCH] efi_loader: Let networking support depend on NETDEVICES
Jan Kiszka
jan.kiszka at siemens.com
Tue Oct 25 14:38:02 CEST 2022
On 24.10.22 22:47, Heinrich Schuchardt wrote:
> On 10/15/22 08:31, Heinrich Schuchardt wrote:
>> On 10/14/22 18:10, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka at 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 <trini at konsulko.com>
>>> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
>>
>> Thanks for the patch.
>>
>> It is good to get rid of the dependency for CONFIG_EFI_LOADER.
>>
>> Reviewed-by: Heinrich Schuchardt <xypron.glpk at 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
Will you send this, or should I submit a v2 of my patch with this included?
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
More information about the U-Boot
mailing list