[U-Boot] BUG: cannot boot with CONFIG_LOG

Simon Glass sjg at chromium.org
Thu May 3 19:02:11 UTC 2018


Hi Heinrich,

On 3 May 2018 at 12:54, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> Hello Simon,
>
> I am running vexpress_ca15_tc2_defconfig with qemu:
>
> QEMU_AUDIO_DRV=none qemu-system-arm \
> -M vexpress-a15 -cpu cortex-a15 \
> -kernel u-boot \
> -net user -net nic,model=lan9118 \
> -m 1024M --nographic \
> -drive if=sd,file=../img.vexpress,media=disk,format=raw
>
> If I enable CONFIG_LOG=y starting U-Boot fails.
>
> This is due to log_init() returning -ENOMEM.
> If I change
> return -ENOMEM;
> to
> return 0;
> the board boots.
>
> log_init() is called twice:
> common/board_r.c:680:   log_init,
> common/board_f.c:760:   log_init,
>
> If I remove the call from common/board_f.c the board boots.
>
> What do you expect
> debug("%s: Cannot allocate memory\n", __func__);
> to do if logging is not yet initialized and the board is out of memory?
>
> Even if I #define DEBUG 1
> I get no output created by this line.

There is a check for GD_FLG_LOG_READY in _log(). Perhaps we need to
have a fallback call?

>
> Best regards
>
> Heinrich
>
>

Regards,
Simon


More information about the U-Boot mailing list