lynxis / bbb_screwdriver_builder

A development util for ehci debug and spi flashing. See http://www.coreboot.org/BBB_screwdriver
GNU General Public License v3.0
20 stars 3 forks source link

Automatically configuring linebreaks on /dev/ttyGS0 #15

Open stefanct opened 7 years ago

stefanct commented 7 years ago

The documentation requires one to execute screen /dev/ttyGS0 once presumably to stop it from emitting \r characters at line breaks (the documentation fails to explain it). By default stty (from coreutils-stty) is not installed and I am not aware of any viable alternatives.

My proposed solution relies on stty and executes it once at every boot...

echo '#!/bin/sh  /etc/rc.common
START=95
boot() {
    stty -icrnl -inlcr -F /dev/ttyGS0
}
' > /etc/init.d/stty_GS0

chmod +x /etc/init.d/stty_GS0
ln -s ../init.d/stty_GS0 /etc/rc.d/S95stty_GS0