Could not use printf after init process

View: New views
3 Messages — Rating Filter:   Alert me  

Could not use printf after init process

by wilbur.chan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When booting , Kernel could not print on console after calling  run_init_process-->kernel_execve("/sbin/init")
 
I guess that printf in busybox  might fail  after the init process began.
 
Any sugguestion on how to trace this problem? Thank you in advance.
 
 
Regards,
 
 
 

Re: Could not use printf after init process

by Ralf Baechle DL5RB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 10, 2009 at 11:37:20PM +0800, wilbur.chan wrote:

> When booting , Kernel could not print on console after calling
> run_init_process-->kernel_execve("/sbin/init")
>
> I guess that printf in busybox  might fail  after the init process began.
>
> Any sugguestion on how to trace this problem? Thank you in advance.

I assume you meant printk, not printf.

If kernel_execve() is successful the function won't return so code following
that statement won't be executed.

  Ralf


Re: Could not use printf after init process

by wilbur.chan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



2009/11/11 Ralf Baechle <ralf@...>
On Tue, Nov 10, 2009 at 11:37:20PM +0800, wilbur.chan wrote:


I assume you meant printk, not printf.

If kernel_execve() is successful the function won't return so code following
that statement won't be executed.

 Ralf

It was 'printf' in init process which was generated by busybox.
 
After I replaced 'init' with a simple 'hello wolrd' executable , which was like kernel_execve("/hello wolrd"),
 
it could not print the 'hello wolrd' either.