Shell (ash) access to console

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 22 22:41:12 UTC 2008


On Wednesday 23 July 2008 00:14, Greg Huber wrote:
> Hello,
> I'm currently porting BB-1.5.1 from uClinux to a Coldfire MCF5485.
> Everything seems to work until init spawns the final shell, ash in
> this case (I get the same results with sash). The shell continuously
> exits and is respawned. I haven't traced the exact failure yet but I'm
> betting that the console/tty devices are not configured correctly,
> and I haven't ruled out a missing or problem with the kernel drivers.
> Ash also runs the rc script without problem earlier in init.
> 
> My console UART driver is ttyS0 and I have nodes  /dev/console, /dev/ttyS0
> and /dev/tty0 created. BB is currently using /dev/tty0, but ttyS0 acts
> the same as does /dev/console, but I read that I shouldn't use this node.
> I'm not exactly sure which device I should be using.  In addition, the
> "Please press Enter to activate this console." trap never returns when
> enter is typed.
> 
> I do, however, have full console output (using printf) during all this.
> 
> I guess I need to know which console device I should be using and how
> to configure either BB or the base system to use it as I'm forcing the
> device in init/init.c/console_init currently. (env CONSOLE ???)
> 
> Also, Please let know if I'm looking in the wrong place also.

I think you are looking in the right place.
Just lirally sprinkle

bb_error_msg("at line %d", __LINE__);

throughout ash.c, recompile busybox and try the boot again.
Repeat (add more prints) until you find where in ash.c execution
deviates from expected path.
--
vda



More information about the busybox mailing list