I'm testing the 3.14.19 kernel on imx28evk, with a Yocto build that uses the linux-fslc kernel provider. I've added the following to my local.conf to build extra packages:
IMAGE_INSTALL_append = " lrzsz alsa-utils screen nano strace dropbear"
I've found that running Busybox 'less' and GNU 'screen' both generate no output, but seem to lock up. E.g. for 'less':
# less /etc/passwd
Nothing. Ctrl-C to quit. But ordinary 'cat' works fine:
# cat /etc/passwd root::0:0:root:/home/root:/bin/sh daemon:*:1:1:daemon:/usr/sbin:/bin/sh ...
Busybox less can be terminated with Ctrl-C. GNU screen can't be terminated with Ctrl-C, but can be terminated with Ctrl-\.
Running strace on 'less /etc/passwd', I see the last few lines are:
# strace less /etc/passwd ... fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(204, 64), ...}) = 0 readlink("/proc/self/fd/1", "/dev/ttyAMA0", 126) = 12 stat64("/dev/ttyAMA0", {st_mode=S_IFCHR|0600, st_rdev=makedev(204, 64), ...}) = 0 open("/dev/ttyAMA0", O_RDONLY|O_LARGEFILE
It halts at that point until Ctrl-C is pressed.
For GNU 'screen', it's not so obvious how to make sense of it. I will attach strace output for each.
Any suggestions on diagnosis of this would be appreciated.
Original Attachment has been moved to: screen-strace.txt.zip
Original Attachment has been moved to: less-strace.txt.zip
I've reported this to the meta-freescale mailing list, and others have confirmed it and said that Busybox getty should be patched or have some extra command-line option provided. I found that this issue is resolved by modifying the getty line in /etc/intttab to add the -L option:
AMA0:12345:respawn:/sbin/getty -L 115200 ttyAMA0
It will be patched soon in the OE-core repository by the looks of it.
I made some progress by comparing to a system running 3.14 kernel built with a different build system, which didn't exhibit the problem. If I run this command on the imx28evk:
stty clocal
then less and screen both work fine! Now I just need to understand why, and how clocal may be set on ttyAMA0 at boot time...