How to execute a static program from the kernel.
I am coding on the 2.6.11 linux kernel.
I need to run my program when the kernel is booting up.
I checked in init/main.c
execute_command = "/init" seems to be running
from the initrd image. I checked there is no init in /
If I comment this code and add my own init to /init or /sbin/init
and run it by calling execve("/init") or execve("/sbin/init")
the kernel builds fine, but does not boot up
and issues kernel panic : init not found...pass init= to kernel.
How can we add our own version of init and run it
instead of the kernel loading the init from its initrd image?