mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-24 14:25:56 +00:00
sandbox: Allow puts() output before global_data is set up
We support putc() in this case but not puts(), but this is more useful since it is what printf() uses. This particularly affects debugging early in SPL, where currently printf() statements result in no output. Fix this by adding a special case into puts() for sandbox, just like putc(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
d66ddafaf9
commit
36bcea62af
1 changed files with 7 additions and 0 deletions
|
@ -535,6 +535,13 @@ void putc(const char c)
|
||||||
|
|
||||||
void puts(const char *s)
|
void puts(const char *s)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SANDBOX
|
||||||
|
/* sandbox can send characters to stdout before it has a console */
|
||||||
|
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
||||||
|
os_puts(s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_DEBUG_UART
|
#ifdef CONFIG_DEBUG_UART
|
||||||
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
|
||||||
while (*s) {
|
while (*s) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue