Page 2 of 2

Re: A first test port of SamyGO to E-Series

Posted: Mon Dec 03, 2012 3:59 am
by E3V3A
@ mamaich:
Thanks for you effort and replies. I'm starting to feel much more comfortable with the idea to root and run the SamyGo ES version quite soon, as soon as the above problem have been resolved. I then hope to be able to contribute more to what you guys are doing here.

This could be OT. But there is another thing in the inittab that I have been wondering about. It's the cttyhack binary.

Code: Select all

::sysinit:/etc/rc.local
::respawn:/bin/cttyhack -/bin/sh
I've been looking at the source of that in an older busybox version, but I just don't understand what it does or supposed to do...

However, it seem to resolve the first problem mentioned by hades in the 2nd post.

Any ideas?

Re: A first test port of SamyGO to E-Series

Posted: Tue Dec 04, 2012 3:28 am
by mamaich
E3V3A wrote:It's the cttyhack binary.
..., but I just don't understand what it does or supposed to do...
Idea is written somewhere in its readme: shell can't work without tty device (console stdin/stdout), and we don't have tty in kernel. Cttyhack redirects stdin/stdout to null and this allows shell to run normally.

Re: A first test port of SamyGO to E-Series

Posted: Wed Dec 05, 2012 3:13 am
by E3V3A
Could we use one of the serial lines (/dev/ttyS[0-2]) for this?
And then perhaps use "nc" (or something) to map it to ethernet port?

On my set it seem that:

Code: Select all

/dev/ttyS0      unknown
/dev/ttyS1      "UART"  
/dev/ttyS2      "debug"  
Not sure if this is correct, but there seem to be a MUX that switches
"service jack" to/from ttyS1 and ttyS2.

In addition I found this:
SpoilerShow

Code: Select all

shell>stty -a -F /dev/ttyS2

speed 115200 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

shell>stty -a -F /dev/ttyS1

speed 9600 baud; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>;
eol = <undef>; eol2 = <undef>; swtch = <undef>; start = <undef>;
stop = <undef>; susp = <undef>; rprnt = <undef>; werase = <undef>;
lnext = <undef>; flush = <undef>; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl -echoke

shell>stty -a -F /dev/ttyS0

speed 9600 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

shell>stty -a -F /dev/tty

speed 115200 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
This may explain why when using UART, you get 115200 output at boot, but shortly thereafter nothing.
But perhaps its still there but just at 9600? (I still have to test...) EDIT: NO, it is not...

Also, from dmesg:

Code: Select all

Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0xfd201300 (irq = 192) is a 16550
serial8250: ttyS1 at I/O 0xfd220c00 (irq = 231) is a 16550
serial8250: ttyS2 at I/O 0xfd220d00 (irq = 242) is a 16550

Re: A first test port of SamyGO to E-Series

Posted: Wed Apr 03, 2013 8:22 am
by yepp
any hint how to make script auto run on TV start up.
E-Series