I've chasing a busybox init hanging issue for a while... Occassionally
the busybox init will just hang at "Freeing init memory'. On my last
rebuild, it started happening consistently, so I did some testing...
I am using busybox 1.2.1, which is the latest stable release.
The problem is in init.c, in the console_init() function. It tries to
autodetect the console; in the following snippet it wrongly figures
out that console is at /dev/tts/1, rather than /dev/ttyAM1:
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
/* this is a serial console */
snprintf(console, sizeof(console) - 1,
SC_FORMAT, sr.line);
}
It then goes on to try and open that device:
while ((fd = open(console, O_RDONLY | O_NONBLOCK)) < 0 && tried < 2) {...}
and the system hangs. It apparently hangs totally, since after this
call the system will no longer respond to pings.
I am not much of a console/system programmer, so I would like to know
if there is a general fix for this - can we make the autodetection
work? For now, I've brute-forced this to skip the autodetection and
just open /dev/ttyAM1, which works fine.
--Yan
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|