[PATCH v7 08/20] net-lwip: add DHCP support and dhcp commmand

Jerome Forissier jerome.forissier at linaro.org
Wed Aug 7 14:41:25 CEST 2024



On 8/2/24 21:33, Tom Rini wrote:
> On Fri, Aug 02, 2024 at 06:26:35PM +0200, Jerome Forissier 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>
> [snip]
>> diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
>> index 9a70c6095b3..c2492b69a13 100644
>> --- a/lib/tiny-printf.c
>> +++ b/lib/tiny-printf.c
>> @@ -269,7 +269,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
>>  				}
>>  				break;
>>  			case 'p':
>> -				if (CONFIG_IS_ENABLED(NET) || _DEBUG) {
>> +				if (!CONFIG_IS_ENABLED(NO_NET) || _DEBUG) {
>>  					pointer(info, fmt, va_arg(va, void *));
>>  					/*
>>  					 * Skip this because it pulls in _ctype which is
> 
> This is subtly wrong, and you can see for example that _vsprintf grows
> in TPL in pinephone-pro-rk3399.
> 

I see. I wrongly believed that !NO_NET was the same as (NET || NET_LWIP)
since it is a Kconfig choice with only 3 options. But that was ignoring
the SPL/TPL complexity :-/
I will replace all tests on NO_NET with tests on (NET || NET_LWIP) in v8.


Thanks,
-- 
Jerome


More information about the U-Boot mailing list