]> git.sur5r.net Git - u-boot/blobdiff - common/console.c
libfdt: migrate include/libfdt_env.h to a wrapper
[u-boot] / common / console.c
index d763f2c68460df82aae6ce933823835b0e419200..0e0295514b21687fadced9a8827a0c7e4700eb6c 100644 (file)
@@ -489,6 +489,13 @@ static inline void print_pre_console_buffer(int flushpoint) {}
 
 void putc(const char c)
 {
+#ifdef CONFIG_SANDBOX
+       /* sandbox can send characters to stdout before it has a console */
+       if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
+               os_putc(c);
+               return;
+       }
+#endif
 #ifdef CONFIG_DEBUG_UART
        /* if we don't have a console yet, use the debug UART */
        if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {