vvaltchev / tilck

A Tiny Linux-Compatible Kernel
BSD 2-Clause "Simplified" License
2.38k stars 103 forks source link

[term] No echo output on serial port when using lua and panic_kb #234

Open aenrbes opened 1 week ago

aenrbes commented 1 week ago

Hi @vvaltchev

When boot tilck with "-sercon" (whether it's riscv64 or i386), lua and panic_kb can read serial input, but there is no echo on the serial port. I think the reason for this problem may have something to do with some of the presupposition of the tty subsystem, but this part code is a little complicated for me to understand at the moment.

lua works, it can read comand (print("hello!")) from serial input, but no echo on serial port image

same problem using cat image

I've observed so far that serial port is treated differently, at least in the tty_keypress_echo function:

static void tty_keypress_echo(struct tty *t, char c)
{
   struct termios *const c_term = &t->c_term;

   if (t->serial_port_fwd)
      return;

...
}
vvaltchev commented 1 week ago

Thanks for reporting this. I agree that it has nothing to do with RISCV.