[J-core] correction (Linux is now working) (Re: Achievable clock speed, bottlenecks?)

Rob Landley rob at landley.net
Wed Oct 5 07:52:29 EDT 2016

On 10/01/2016 01:53 PM, BGB wrote:
>> but, trying to type stuff gave garbage characters, and I have been
>> unable to reproduce this result in subsequent runs (ex: actually
>> getting to a prompt).
> garbage appears to be ANSI codes.

The ansi codes are a terminal size probe. (It saves the current
location, jumps to the bottom right corner, asks the terminal to send
back the current cursor position, and jumps back to the saved location.)

This is because asking Linux what it thinks the terminal size is
(through the tty ioctl) won't help if you're on a serial console where
the window is on the other side of a serial device, so it doesn't know
how big a window it is. When the ioctl probe fails (says "we have a
terminal but it's zero by zero"), you have to do in-band signalling with
an escape sequence the terminal responds to. (Basically all modern
xterms respond, I'm guessing yours doesn't because it's windows?)

The emulated system thinks it has a serial console, and a decade ago I
taught the busybox shell to do the ANSI probe on serial consoles.

> there appears there is some difference between what I am getting from
> the Windows command-prompt vs WS4L console which effects what happens in
> the emulated Linux.

I.E. above. :)

It sounds like the ansi probe is _confusing_ the windows terminal.


More information about the J-core mailing list