tty: add tee

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-17 02:38:00 -04:00
commit 4909482a2e
5 changed files with 88 additions and 10 deletions

View file

@ -36,8 +36,10 @@
typedef void (*initcall_t)(void);
struct tty *fbcon_init();
void arch_ap_startup();
extern initcall_t __initcall_start, __initcall_end;
extern void fbcon_init(void);
struct tty *tty_printf = NULL;
bool kernel_init_ready = false;
@ -74,16 +76,19 @@ static void kmain()
tty_layer_init();
/* init main fallback tty */
struct tty *main_tty = NULL;
serial_port_tty_init(&main_tty);
struct tty *serial_tty = NULL;
serial_port_tty_init(&serial_tty);
tty_printf = main_tty;
struct tty *visual_tty = fbcon_init();
fbcon_init();
struct tty *tee = tty_tee_create("broadcast");
tty_tee_add(tee, serial_tty);
tty_tee_add(tee, visual_tty);
tty_printf = tee;
do_initcalls();
void arch_ap_startup();
arch_ap_startup();
/* do nothing, for now :) */