After the build is complete a busybox.links file is generated which is
then used by 'make install' to create symlinks to the busybox binary
for all compiled in functions. By default, 'make install' will place
-the symlink forest into `pwd`/busybox_install unless you have defined
-the PREFIX environment variable.
+the symlink forest into `pwd`/_install unless you have defined the
+PREFIX environment variable.
Please feed suggestions, bug reports, insults, and bribes back to:
Erik Andersen
<andersen@lineo.com>
<andersee@deban.org>
+<blatent plug>
+Many thanks to go to Lineo for paying me to work on busybox.
+</blatent plug>
+
* Allow tar to create archives with sockets, devices, and other special files
* Add in a mini insmod, rmmod, lsmod
+* init clearly needs to support some type of minimalist /etc/inittab. I
+ currently have _way_ too much policy hardcoded in the source. Adding
+ support for getty has made me realize how much that sucks.
* dnsdomainname
* traceroute/nslookup/netstat
* rdate
pid_t pid1 = 0;
pid_t pid2 = 0;
struct stat statbuf;
+ char which_vt1[30];
+ char which_vt2[30];
const char* const rc_script_command[] = { INITSCRIPT, INITSCRIPT, 0};
- const char* const getty1_command[] = { GETTY, GETTY, VT_PRIMARY, 0};
- const char* const getty2_command[] = { GETTY, GETTY, VT_SECONDARY, 0};
+ const char* const getty1_command[] = { GETTY, GETTY, "38400", which_vt1, 0};
+ const char* const getty2_command[] = { GETTY, GETTY, "38400", which_vt2, 0};
const char* const shell_command[] = { SHELL, "-" SHELL, 0};
const char* const* tty1_command = shell_command;
const char* const* tty2_command = shell_command;
} else
message(CONSOLE|LOG, "Mounting /proc: failed!\n");
-fprintf(stderr, "got proc\n");
-
/* Make sure there is enough memory to do something useful. */
check_memory();
-fprintf(stderr, "got check_memory\n");
/* Check if we are supposed to be in single user mode */
if ( argc > 1 && (!strcmp(argv[1], "single") ||
tty1_command = shell_command;
tty2_command = shell_command;
}
-fprintf(stderr, "got single\n");
/* Make sure an init script exists before trying to run it */
if (single==FALSE && stat(INITSCRIPT, &statbuf)==0) {
/* Make sure /sbin/getty exists before trying to run it */
if (stat(GETTY, &statbuf)==0) {
char* where;
-fprintf(stderr, "\n");
+ /* First do tty2 */
wait_for_enter_tty2 = FALSE;
- where = strrchr( console, '/');
+ where = strrchr( second_console, '/');
if ( where != NULL) {
- strcpy( (char*)getty2_command[2], where);
+ where++;
+ strncpy( which_vt2, where, sizeof(which_vt2));
}
tty2_command = getty2_command;
+
/* Check on hooking a getty onto tty1 */
if (run_rc == FALSE && single==FALSE) {
wait_for_enter_tty1 = FALSE;
- where = strrchr( second_console, '/');
+ where = strrchr( console, '/');
if ( where != NULL) {
- strcpy( (char*)getty1_command[2], where);
+ where++;
+ strncpy( which_vt1, where, sizeof(which_vt1));
}
tty1_command = getty1_command;
}
pid_t pid1 = 0;
pid_t pid2 = 0;
struct stat statbuf;
+ char which_vt1[30];
+ char which_vt2[30];
const char* const rc_script_command[] = { INITSCRIPT, INITSCRIPT, 0};
- const char* const getty1_command[] = { GETTY, GETTY, VT_PRIMARY, 0};
- const char* const getty2_command[] = { GETTY, GETTY, VT_SECONDARY, 0};
+ const char* const getty1_command[] = { GETTY, GETTY, "38400", which_vt1, 0};
+ const char* const getty2_command[] = { GETTY, GETTY, "38400", which_vt2, 0};
const char* const shell_command[] = { SHELL, "-" SHELL, 0};
const char* const* tty1_command = shell_command;
const char* const* tty2_command = shell_command;
} else
message(CONSOLE|LOG, "Mounting /proc: failed!\n");
-fprintf(stderr, "got proc\n");
-
/* Make sure there is enough memory to do something useful. */
check_memory();
-fprintf(stderr, "got check_memory\n");
/* Check if we are supposed to be in single user mode */
if ( argc > 1 && (!strcmp(argv[1], "single") ||
tty1_command = shell_command;
tty2_command = shell_command;
}
-fprintf(stderr, "got single\n");
/* Make sure an init script exists before trying to run it */
if (single==FALSE && stat(INITSCRIPT, &statbuf)==0) {
/* Make sure /sbin/getty exists before trying to run it */
if (stat(GETTY, &statbuf)==0) {
char* where;
-fprintf(stderr, "\n");
+ /* First do tty2 */
wait_for_enter_tty2 = FALSE;
- where = strrchr( console, '/');
+ where = strrchr( second_console, '/');
if ( where != NULL) {
- strcpy( (char*)getty2_command[2], where);
+ where++;
+ strncpy( which_vt2, where, sizeof(which_vt2));
}
tty2_command = getty2_command;
+
/* Check on hooking a getty onto tty1 */
if (run_rc == FALSE && single==FALSE) {
wait_for_enter_tty1 = FALSE;
- where = strrchr( second_console, '/');
+ where = strrchr( console, '/');
if ( where != NULL) {
- strcpy( (char*)getty1_command[2], where);
+ where++;
+ strncpy( which_vt1, where, sizeof(which_vt1));
}
tty1_command = getty1_command;
}