mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
console: Add a console buffer
It is useful to be able to record console output and provide console input via a buffer. This provides sandbox with the ability to run a command and check its output. If the console is set to silent then no visible output is generated. This also provides a means to fix the problem where tests produce unwanted output, such as errors or warnings. This can be confusing. We can instead set the console to silent and record this output. It can be checked later in the test if required. It is possible that this may prove useful for non-test situations. For example the console output may be suppressed for normal operations, but recorded and stored for access by the OS. That feature is not implemented at present. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -280,6 +280,15 @@ static int initr_malloc(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int initr_console_record(void)
|
||||
{
|
||||
#if defined(CONFIG_CONSOLE_RECORD)
|
||||
return console_record_init();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYS_NONCACHED_MEMORY
|
||||
static int initr_noncached(void)
|
||||
{
|
||||
@@ -731,6 +740,7 @@ init_fnc_t init_sequence_r[] = {
|
||||
#endif
|
||||
initr_barrier,
|
||||
initr_malloc,
|
||||
initr_console_record,
|
||||
#ifdef CONFIG_SYS_NONCACHED_MEMORY
|
||||
initr_noncached,
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user