Skip to contentSkip to conversation

On-the-fly suppressing stdin, stdout and stderr

U-Boot-Users Mark Jackson 1 participant 1 message Jul 29, 2008

lore
Share & tools
lore
#0 lore raw

I'd like to know if it's possible to suppress comms to / from stdio, stdout and stderr.

I know there's support to suppress the console output (stdout and stderr) using CONFIG_SILENT_CONSOLE and the "silent" env variable, but this isn't particularly dynamic.

Our target board has a bitlink which I'd like to read at boot time. If the link is not connected, all comms to / from the u-boot console should be suppress (including any key presses).

In normal running mode, we are wanting to use the comms port for (say) a printer or connected to a host system. As such, when the unit boots we're not wanting it to output the u-boot console text to the printer.

But in debug / test / repair / maintenance / upgrade mode, we'd remove any printer / etc, we'd fit the link, which would then give us the normal u-boot startup and prompt.

From what I can see in the code, there's no real way to do this "on-the-fly" suppressing.

Any ideas ?

Thanks
Mark