09/06/2014

Interactive Shell Achieved

Success! On the /etc/inittab line normally starting an ash shell instance with the serial port as stdin/out, I have substituted my own binary (gritty, a hack, not complete, caveat emptor and so on) which identifies which /dev/input/event* is a keyboard and starts reading from it. Gritty then starts a pseudoterminal, and runs ash, feeding it the keypresses it detects, and putting returned outputting returned data (on the serial port as it were)
main screen turn on

The latter part could possibly be automated by some extra dup2() calls, but if that is a good idea would also depend on wether I want to do some translation first, e.g. as of now I have no handling of escape codes, so any terminal output with colour, or worse yet, curses apps makes everything go bananas. Another thing that remains to be done is the correct interpretation of modifier/special keys.

No comments:

Post a comment