add serial.c, based on inferno-rpi