All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [BUG] sandbox: './u-boot -l ' fails
Date: Sun, 27 Sep 2020 22:24:38 -0600	[thread overview]
Message-ID: <CAPnjgZ3ns0qBuwYWkzPcPC51y6=SKr_m9zDZ-NmOAeXX7W95wA@mail.gmail.com> (raw)
In-Reply-To: <dc2089b4-4e6f-1483-08ba-da7db3985837@gmx.de>

Hi Heinrich,

On Sat, 19 Sep 2020 at 13:48, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Hello Simon,
>
> when I try to run ./u-boot -l the sandbox stalls. Shouldn't it run out
> of the box?
>
> $ ./u-boot -l -d arch/sandbox/dts/sandbox.dtb

For the record you should be able to use -D to get the same effect as
your -d above.

>
> U-Boot 2020.10-rc4-00018-g21a10244f9-dirty (Sep 19 2020 - 19:55:39 +0200)
>
> Model: sandbox
> DRAM:  128 MiB
>
> Warning: host_lo MAC addresses don't match:
> Address in ROM is               26:4b:ca:6c:98:f4
> Address in environment is       00:00:11:22:33:44
>
> Warning: host_virbr0 MAC addresses don't match:
> Address in ROM is               ee:3e:c9:ce:1f:9c
> Address in environment is       00:00:11:22:33:45
>
> Warning: host_docker0 MAC addresses don't match:
> Address in ROM is               c2:85:07:7b:9a:18
> Address in environment is       00:00:11:22:33:46
> WDT:   Not found!
> MMC:
>
> No output after this point.
>
> The problem also exists with U-Boot v2020.07, v2019.10, v2018.11.
>
> CONFIG_SANDBOX_SDL=y
>
> SDL_InitSubSystem() never returns. It is looping somewhere in U-Boot's
> __serial_getc(). I wonder how it gets there without returning from the
> function.
>
> I compiled SDL2.cpp from
> https://gist.github.com/miguelmartin75/6946310#file-sdl2-cpp-L18
> with
>
> g++ SDL2.cpp -D_REENTRANT -I/usr/include/SDL2 -lSDL2 -lGL -o test
>
> and it runs fine showing an X11 windows with red background.
>
> So there seems to be no general problem with the SDL2 library.

I hit this myself on another computer and it turned out to be that SDL
defined getc(), as does U-Boot, and things get confused. At least I
think it is getc.

I hacked around with changing the name of getc (I think it was getc)
in U-Boot and the problem went away.

Regards,
Simon

  reply	other threads:[~2020-09-28  4:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 19:48 [BUG] sandbox: './u-boot -l ' fails Heinrich Schuchardt
2020-09-28  4:24 ` Simon Glass [this message]
2020-09-28  4:46   ` Heinrich Schuchardt
2020-09-28 11:31     ` Heinrich Schuchardt
2020-09-28 13:22       ` Simon Glass
2020-09-28 13:30         ` Heinrich Schuchardt
2020-09-28 13:42           ` Simon Glass
2020-09-28 21:23             ` Heinrich Schuchardt
2020-09-28 22:19               ` Simon Glass
2020-09-28 23:59                 ` Heinrich Schuchardt
2020-09-29  1:21                   ` Heinrich Schuchardt
2020-09-29 11:12           ` Wolfgang Denk
2020-09-29 11:47             ` Heinrich Schuchardt
2020-09-29 13:05               ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ3ns0qBuwYWkzPcPC51y6=SKr_m9zDZ-NmOAeXX7W95wA@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.