All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] BUG: cannot boot with CONFIG_LOG
@ 2018-05-03 18:54 Heinrich Schuchardt
  2018-05-03 19:02 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2018-05-03 18:54 UTC (permalink / raw)
  To: u-boot

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.

Best regards

Heinrich

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] BUG: cannot boot with CONFIG_LOG
  2018-05-03 18:54 [U-Boot] BUG: cannot boot with CONFIG_LOG Heinrich Schuchardt
@ 2018-05-03 19:02 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2018-05-03 19:02 UTC (permalink / raw)
  To: u-boot

Hi Heinrich,

On 3 May 2018 at 12:54, Heinrich Schuchardt <xypron.glpk@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-03 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 18:54 [U-Boot] BUG: cannot boot with CONFIG_LOG Heinrich Schuchardt
2018-05-03 19:02 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.