On Tuesday 23 September 2008 19:15, Michael Davis wrote:
> 
> I am working with the cirrus EP9301 ARM CPU.  The current environment 
> they supply uses Busybox 1.1.3.  I decided to upgrade to 1.11.2.  So I 
> rebuilt it with all the configuration options I wanted, but ran into a 
> problem.  If I include -msoft-float in the compile it hangs at the 
> following point.  Note debug mode on init is turned on.
> 
> init started: BusyBox v1.11.2 (2008-09-22 16:26:05 CDT)
> command='/etc/rc.sysinit' action=1 tty='/dev/null'
> 
> command='-/sbin/start-opie' action=2 tty='/dev/tty1'
> 
> command='-/bin/sh' action=4 tty='/dev/tty2'
> 
> command='-/bin/sh' action=2 tty='/dev/ttyAM0'
> 
> command='/bin/umount -a' action=64 tty='/dev/null'

These messages come from new_init_action() routine, and it is called here
in init.c, parse_inittab():

                for (a = actions; a[0]; a += strlen(a) + 1) {
                        if (strcmp(a + 1, action + 1) == 0) {
                                *runlev = '\0';
                                if (*id != '\0') {
                                        if (strncmp(id, "/dev/", 5) == 0)
                                                id += 5;
                                        strcpy(tmpConsole, "/dev/");
                                        safe_strncpy(tmpConsole + 5, id,
                                                sizeof(tmpConsole) - 5);
                                        id = tmpConsole;
                                }
======>                         new_init_action((uint8_t)a[0], command + 1, id);
                                goto next_line;
                        }
                }
                *command = ':';
                /* Choke on an unknown action */
 bad_entry:
                message(L_LOG | L_CONSOLE, "Bad inittab entry: %s", id);
 next_line: ;
        }
        fclose(file);
}

(Calls to new_init_action() elsewhere would not trigger for you I think).

Apparently init segfaults somewhere after this.
Can you add these debug prints in the above code fragment
and tell us what do you see?


                for (a = actions; a[0]; a += strlen(a) + 1) {
                        if (strcmp(a + 1, action + 1) == 0) {
                                *runlev = '\0';
                                if (*id != '\0') {
                                        if (strncmp(id, "/dev/", 5) == 0)
                                                id += 5;
                                        strcpy(tmpConsole, "/dev/");
                                        safe_strncpy(tmpConsole + 5, id,
                                                sizeof(tmpConsole) - 5);
                                        id = tmpConsole;
                                }
bb_error_msg("before new_init_action");
                                new_init_action((uint8_t)a[0], command + 1, id);
bb_error_msg("after new_init_action");
                                goto next_line;
                        }
                }
                *command = ':';
                /* Choke on an unknown action */
 bad_entry:
                message(L_LOG | L_CONSOLE, "Bad inittab entry: %s", id);
 next_line: ;
        }
bb_error_msg("finished parsing iniitab");
        fclose(file);
}

--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to