[BusyBox] still fighting with minit

Robert P. J. Day rpjday at mindspring.com
Thu Mar 25 11:04:26 UTC 2004


On Thu, 25 Mar 2004, Glenn McGrath wrote:

> On Wed, 24 Mar 2004 17:43:08 -0500 (GMT-05:00)
> "Robert P. J. Day" <rpjday at mindspring.com> wrote:
> 
> > i'm not in front of the system at the moment, but it's a hacked 
> > version of 2.4.22-pre8 that we got from the embedded linux
> > vendor we work with.
> 
> Erik's patch to fix it made it into 2.4.23, if you have a look at the
> kernel init/main.c you should be able to see the difference.

at a glance, i'm assuming that this is what i should have noticed.
in the current (2.4.22) version of our kernel, in init/main.c, i see
the code:

	static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
	...
	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);
        panic("No init found.  Try passing init= option to kernel.");

and in the 2.6 code in that same file, i find:

static void run_init_process(char *init_filename)
	{
        	argv_init[0] = init_filename;
        	execve(init_filename, argv_init, envp_init);
	}
	...

	if (execute_command)
                run_init_process(execute_command);

        run_init_process("/sbin/init");
        run_init_process("/etc/init");
        run_init_process("/bin/init");
        run_init_process("/bin/sh");

        panic("No init found.  Try passing init= option to kernel.");

which, to my untrained eye, seems to solve that particular problem.
is this what you were referring to?  again, thanks for your time.


rday



More information about the busybox mailing list