Allow to record the console output before before U-Boot
has a console ready.
This patch allows to test the console output in sandbox test
based on console record.
It is possible because GD_FLG_RECORD and GD_FLG_SERIAL_READY
are 2 independent flags.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
+#ifdef CONFIG_CONSOLE_RECORD
+ if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start)
+ membuff_putbyte((struct membuff *)&gd->console_out, c);
+#endif
#ifdef CONFIG_SANDBOX
/* sandbox can send characters to stdout before it has a console */
if (!(gd->flags & GD_FLG_SERIAL_READY)) {
#ifdef CONFIG_SANDBOX
/* sandbox can send characters to stdout before it has a console */
if (!(gd->flags & GD_FLG_SERIAL_READY)) {
-#ifdef CONFIG_CONSOLE_RECORD
- if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start)
- membuff_putbyte((struct membuff *)&gd->console_out, c);
-#endif
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT) {
if (!(gd->flags & GD_FLG_DEVINIT))
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT) {
if (!(gd->flags & GD_FLG_DEVINIT))
+#ifdef CONFIG_CONSOLE_RECORD
+ if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start)
+ membuff_put((struct membuff *)&gd->console_out, s, strlen(s));
+#endif
#ifdef CONFIG_SANDBOX
/* sandbox can send characters to stdout before it has a console */
if (!(gd->flags & GD_FLG_SERIAL_READY)) {
#ifdef CONFIG_SANDBOX
/* sandbox can send characters to stdout before it has a console */
if (!(gd->flags & GD_FLG_SERIAL_READY)) {
-#ifdef CONFIG_CONSOLE_RECORD
- if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start)
- membuff_put((struct membuff *)&gd->console_out, s, strlen(s));
-#endif
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT) {
if (!(gd->flags & GD_FLG_DEVINIT))
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT) {
if (!(gd->flags & GD_FLG_DEVINIT))