[PATCH] configs: am335x_evm: Use default log level

Lokesh Vutla lokeshvutla at ti.com
Fri Feb 28 14:38:15 CET 2020



On 26/02/20 10:48 PM, Sam Protsenko wrote:
> Commit 920e33411113 ("configs: am335x_evm: Reduce size of SPL") reduces
> log level from 4 (default) to 3 in order to reduce SPL size. Arguably
> the disadvantages of such a decision outweigh the benefits:
> 
>   (+) reducing SPL footprint by 1 KiB, but even with loglevel=4 we still
>       have 2 KiB of SRAM left
>   (-) we are missing error messages printed with pr_err() in U-Boot
>       proper
> 
> One can argue that loglevel can be increased locally for debugging
> purposes, which is true. But this way users are missing helpful messages
> when something goes wrong, which is really confusing. E.g. when trying
> to do "dfu tftp" without "dfu_alt_info" variable set, the only message
> we can see is:
> 
>     exit not allowed from main input shell.
> 
> while whith loglevel=4 user can see what is actually missing:
> 
>     "dfu_alt_info" env variable not defined!
> 
> Bottom line: U-Boot proper shouldn't suffer of shortcomings because of
> premature optimizations in SPL.
> 
> Let's use default loglevel, as we are not running out of SRAM yet. When
> (and if) we run out of SRAM, we'll see the error message during the
> build, as RAM size value in SPL linker script will be violated. Then we
> can think about reducing loglevel only in SPL (e.g. by separating
> CONFIG_SPL_LOGLEVEL option from CONFIG_LOGLEVEL).

There is SPL_LOGLEVEL already available, can you use it and disable SPL part for
am335x?

Thanks and regards,
Lokesh


More information about the U-Boot mailing list