Init hanging.... again.
Rob Landley
rob at landley.net
Sat Aug 12 17:42:41 UTC 2006
On Wednesday 02 August 2006 9:01 pm, yan wrote:
> yan wrote:
> > Can anyone shed some light on this?
> >
> I spent the last few hours shining some light into the dark corners of
> init.c....
>
> On my system, a cirrus-based ARM board, init_console() mis-identifies
> the console as /dev/tts/1, rather than /dev/ttyAM1.
>
> Then, when it goes to open it, open("/dev/tts/1",... | O_NONBLOCK)
> blocks.... and the system hangs. I don't know why it blocks; it
> shouldn't but it does.
>
> Since busybox is built to use on sometimes weird embedded systems, I
> suggest that an initial console option be added to the config menu....
> This might save a lot of trouble....
>
> From looking at the code, it seems that you can set an environmental
> variable for CONSOLE, but at least on my system that didn't work;
init is PID 1, which means it needs the environment variable to come from the
kernel. If you add "CONSOLE=/dev/blah" to your kernel command line it'll set
it as an environment variable (which is what it does with any argument that a
device driver doesn't claim.)
> I'll
> look into that tomorrow. In any case, it is not intuitive or obvious
> that not setting CONSOLE in root's .profile would make init lock up.
Root's .profile won't help here because that's parsed by the shell, and init
runs before the shell.
I need to fluff up the documentation a bit...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list