Problems starting /init
Geoff Thorpe
Geoff.Thorpe at freescale.com
Thu Jan 5 10:20:10 EST 2006
On January 4, 2006 06:03 pm, David H. Lynch Jr. wrote:
[snip]
> starting a c "Hello World" application that uses glibc, fputs,
> printf, fwrite, to display a string - again works fine.
>
> But I can not get busybox to output a thing either run as /init or
> run as /bin/sh.
busybox tries to open the console device and does fairly extensive
surgery with the stdio descriptors. So your apps that assume fds
0,1,2 to be stdin/stdout/stderr are functioning fine, but busybox is
probably choking because it's opening/configuring the console
devices. I've worked through this with someone before when we wanted
busybox to just run with the existing fds - we eventually beat it
into submission but then ended up changing/replacing the console
driver instead and going back to vanilla busybox. If you take a look
through the busybox source, you should find the various
fork/dup/ctrl/exit gymnastics and with a little patience, you might
be able to hack around it. But it might be easier in the long run to
figure out where the opening/manipulation of /dev/console (or
whatever it's opening) is going wrong.
Sorry I can't help you further. Good luck.
Cheers,
Geoff
--
Geoff Thorpe
Freescale Semiconductor
More information about the Linuxppc-embedded
mailing list