[BusyBox] cannot use console in init.c of busybox 1.00
Levin Du
zsdjw at 21cn.com
Sat Jul 2 06:08:30 UTC 2005
Hi all,
I'm maintaining an installer. The installer patch the init.c of busybox to
run a loader just after parse_inittab() and fixup_argv(), like this:
[code]
/* Make the command line just say "init" -- thats all, nothing else */
fixup_argv(argc, argv, "init");
/* Now run everything that needs to be run */
if (pre_sysprep(message, LOG | CONSOLE)) {
init_reboot(RB_AUTOBOOT);
loop_forever();
}
run_actions(SYSPREP);
if (post_sysprep(message, LOG | CONSOLE)) {
init_reboot(RB_AUTOBOOT);
loop_forever();
}
/* First run the sysinit command */
run_actions(SYSINIT);
[/code]
where SYSPREP is a new customed action. pre_sysprep() mounts the rootfs
and /proc, and post_sysprep() do the pivot_root.
The problem is the loader (called magicbooter) associated with SYSPREP cannot
use the console, i.e. printf() does not show anything. The kernel is
configured to use virtual terminal on frame buffer. I can see the nice logo
at first, but when I switch to tty3 (some debug message is printed there, and
it is fine) and then back to tty1, the logo disappeared, leaving a blank
screen.
I try to printf sth after fixup_argv(argc, argv, "init"), but also see
nothing.
It's very strange. If I turn to busybox 0.65, everything works just fine.
Any comment is welcome, thanks in advance.
Best reguards,
Levin Du
More information about the busybox
mailing list