[uClinux-dev] Problem opening console

David McCullough davidm at snapgear.com
Tue Mar 11 21:26:03 EST 2003


Jivin Selvam lays it down ...
> Hi, I've problem opening the console device  
> 
> init() , main.c
>  ------------------------------------------------------------
>  if (open("/dev/console", O_RDWR, 0) < 0)
>  ? ? ? ? printk("Warning: unable to open an initial console.\n");
>  -------------------------------------------------------------
> When the above line executes I get  junk chars printed on my console. 
> No error opening the console. 

Check you baud rate,  it may have changed when init opened the console.
9600 is a good try.


> Subsequently when the following line executed,
> I get continous junk output and certain processes got killed (PID 12, 20
> sometimes 30).
> 
> -----------------------------------------
>  if (execute_command)
>  	execve(execute_command,argv_init,envp_init);
>  execve("/sbin/init",argv_init,envp_init);
>  execve("/etc/init",argv_init,envp_init);
>  execve("/bin/init",argv_init,envp_init);
>  execve("/bin/sh",argv_init,envp_init);
> --------------------------------------------
> 
> I've no idea what's really wrong. Appreciate any help from you guys.

If it doesn't look like a baudrate problem (ie., you can read some of the
output) then I suspect your serial driver is unhappy,

Cheers,
Davidm

-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  Custom Embedded Solutions + Security



More information about the uClinux-dev mailing list