Albert Serra i Monner <[EMAIL PROTECTED]> writes:

> 
> Hello,
> 
> I have troubles when trying to boot Linux on L4.
> 
> During the Linux startup I get some messages like:
> 
> copy_mm: going to SET_PAGE_DIRfor someone else
> 
> but this does not stop Linux until it mounts the root filesystem. At this
> point that message is printed continously. It looks like if the system was 
> into an endless loop ... 
> 
> I have followed the steps described in README.linux, but it seems that I
> have make some mistake ...
> 
> Thanks for your help.
> 
> Albert.
> 

Sorry for the late answer, but we are busy preparing for sosp. 

> copy_mm: going to SET_PAGE_DIRfor someone else

This message is just a simple debug statement that somehow made it
into the distribution. It should be save to disable it (at least we
think so). Have a look at kernel/fork.c, function copy_mm.

static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
{
...
#if 1
        printk("copy_mm: going to SET_PAGE_DIR");
        if (tsk == current)
          printk("for myself\n");
        else
          printk("for someone else\n");
#endif
        SET_PAGE_DIR(tsk, current->mm->pgd);

> but this does not stop Linux until it mounts the root filesystem. At this
> point that message is printed continously. It looks like if the system was 
> into an endless loop ... 

Hmm, it sounds like the init process is forking endlessly. Could you
check whether the kernel_thread kflushd and bflush are started
correctly? Have a look at init/main.c function 

"static int init(void * unused)".

After starting the kernel thread and calling setup() to initialize
devices etc init() tries to execute the real init program.

        if (!execute_command) {
                execve("/etc/init",argv_init,envp_init);
                execve("/bin/init",argv_init,envp_init);
                execve("/sbin/init",argv_init,envp_init);
                /* if this fails, fall through to original stuff */

                pid = kernel_thread(do_rc, "/etc/rc", SIGCHLD);
                if (pid>0)
                        while (pid != wait(&i))
                                /* nothing */;
        }

        while (1) {
                pid = kernel_thread(do_shell,
                        execute_command ? execute_command : "/bin/sh",
                        SIGCHLD);
                if (pid < 0) {
                        printf("Fork failed in init\n\r");
                        continue;
                }
                while (1)
                        if (pid == wait(&i))
                                break;
                printf("\n\rchild %d died with code %04x\n\r",pid,i);
                sync();
        }
        return -1;

After reading your description I guess that somehow exec fails and the
while(1) loop is entered. To find the point where linux loops
endlessly you can insert enter_kdebug statements, for instance:

        if (!execute_command) {
                execve("/etc/init",argv_init,envp_init);
                enter_kdebug("execve /etc/init failed");
                execve("/bin/init",argv_init,envp_init);
                enter_kdebug("execve /bin/init failed");
                ...


Please let us now if you have some more details about your problem.

If it doesn't help, you can send us your boot disk (compiled for an
ncr53c810 and root device /dev/sda5) so that we can have a closer look
at the problem.

If you have some more time maybe you can wait for our next major
release. We hope that we are able to provide our current L4Linux
version after the sosp.

Jean

Reply via email to