Import 2.3.13pre1
[davej-history.git] / init / main.c
blob41113ea3c4d0e90512c2a9b6cb847dde8f1b1744
1 /*
2 * linux/init/main.c
4 * Copyright (C) 1991, 1992 Linus Torvalds
6 * GK 2/5/95 - Changed to support mounting root fs via NFS
7 * Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96
8 * Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96
9 * Simplified starting of init: Michael A. Griffith <grif@acm.org>
12 #define __KERNEL_SYSCALLS__
14 #include <linux/config.h>
15 #include <linux/proc_fs.h>
16 #include <linux/unistd.h>
17 #include <linux/string.h>
18 #include <linux/ctype.h>
19 #include <linux/delay.h>
20 #include <linux/utsname.h>
21 #include <linux/ioport.h>
22 #include <linux/init.h>
23 #include <linux/smp_lock.h>
24 #include <linux/blk.h>
25 #include <linux/hdreg.h>
26 #include <linux/iobuf.h>
28 #include <asm/io.h>
29 #include <asm/bugs.h>
31 #ifdef CONFIG_PCI
32 #include <linux/pci.h>
33 #endif
35 #ifdef CONFIG_DIO
36 #include <linux/dio.h>
37 #endif
39 #ifdef CONFIG_ZORRO
40 #include <linux/zorro.h>
41 #endif
43 #ifdef CONFIG_MTRR
44 # include <asm/mtrr.h>
45 #endif
47 #ifdef CONFIG_APM
48 #include <linux/apm_bios.h>
49 #endif
51 #ifdef CONFIG_MAC
52 extern void nubus_init(void);
53 #endif
56 * Versions of gcc older than that listed below may actually compile
57 * and link okay, but the end product can have subtle run time bugs.
58 * To avoid associated bogus bug reports, we flatly refuse to compile
59 * with a gcc that is known to be too old from the very beginning.
61 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
62 #error sorry, your GCC is too old. It builds incorrect kernels.
63 #endif
65 extern char _stext, _etext;
66 extern char *linux_banner;
68 extern int console_loglevel;
70 static int init(void *);
71 extern int bdflush(void *);
72 extern int kswapd(void *);
73 extern void kswapd_setup(void);
75 extern void init_IRQ(void);
76 extern void init_modules(void);
77 extern long console_init(long, long);
78 extern void sock_init(void);
79 extern void fork_init(unsigned long);
80 extern void mca_init(void);
81 extern void sbus_init(void);
82 extern void ppc_init(void);
83 extern void sysctl_init(void);
84 extern void filescache_init(void);
85 extern void signals_init(void);
87 extern void device_setup(void);
88 extern void binfmt_setup(void);
89 extern void free_initmem(void);
90 extern void filesystem_setup(void);
92 #ifdef CONFIG_ARCH_ACORN
93 extern void ecard_init(void);
94 #endif
96 extern void smp_setup(char *str, int *ints);
97 #ifdef __i386__
98 extern void ioapic_pirq_setup(char *str, int *ints);
99 extern void ioapic_setup(char *str, int *ints);
100 #endif
101 extern void no_scroll(char *str, int *ints);
102 extern void kbd_reset_setup(char *str, int *ints);
103 extern void panic_setup(char *str, int *ints);
104 extern void bmouse_setup(char *str, int *ints);
105 extern void msmouse_setup(char *str, int *ints);
106 extern void console_setup(char *str, int *ints);
107 #ifdef CONFIG_PRINTER
108 extern void lp_setup(char *str, int *ints);
109 #endif
110 #ifdef CONFIG_JOY_AMIGA
111 extern void js_am_setup(char *str, int *ints);
112 #endif
113 #ifdef CONFIG_JOY_ANALOG
114 extern void js_an_setup(char *str, int *ints);
115 #endif
116 #ifdef CONFIG_JOY_ASSASIN
117 extern void js_as_setup(char *str, int *ints);
118 #endif
119 #ifdef CONFIG_JOY_CONSOLE
120 extern void js_console_setup(char *str, int *ints);
121 #endif
122 #ifdef CONFIG_JOY_DB9
123 extern void js_db9_setup(char *str, int *ints);
124 #endif
125 #ifdef CONFIG_JOY_TURBOGRAFX
126 extern void js_tg_setup(char *str, int *ints);
127 #endif
128 #ifdef CONFIG_JOY_LIGHTNING
129 extern void js_l4_setup(char *str, int *ints);
130 #endif
131 extern void eth_setup(char *str, int *ints);
132 #ifdef CONFIG_ARCNET_COM20020
133 extern void com20020_setup(char *str, int *ints);
134 #endif
135 #ifdef CONFIG_ARCNET_RIM_I
136 extern void arcrimi_setup(char *str, int *ints);
137 #endif
138 #ifdef CONFIG_ARCNET_COM90xxIO
139 extern void com90io_setup(char *str, int *ints);
140 #endif
141 #ifdef CONFIG_ARCNET_COM90xx
142 extern void com90xx_setup(char *str, int *ints);
143 #endif
144 #ifdef CONFIG_DECNET
145 extern void decnet_setup(char *str, int *ints);
146 #endif
147 #ifdef CONFIG_BLK_DEV_XD
148 extern void xd_setup(char *str, int *ints);
149 extern void xd_manual_geo_init(char *str, int *ints);
150 #endif
151 #ifdef CONFIG_BLK_DEV_IDE
152 extern void ide_setup(char *);
153 #endif
154 #ifdef CONFIG_PARIDE_PD
155 extern void pd_setup(char *str, int *ints);
156 #endif
157 #ifdef CONFIG_PARIDE_PF
158 extern void pf_setup(char *str, int *ints);
159 #endif
160 #ifdef CONFIG_PARIDE_PT
161 extern void pt_setup(char *str, int *ints);
162 #endif
163 #ifdef CONFIG_PARIDE_PG
164 extern void pg_setup(char *str, int *ints);
165 #endif
166 #ifdef CONFIG_PARIDE_PCD
167 extern void pcd_setup(char *str, int *ints);
168 #endif
169 extern void floppy_setup(char *str, int *ints);
170 extern void st_setup(char *str, int *ints);
171 extern void st0x_setup(char *str, int *ints);
172 extern void advansys_setup(char *str, int *ints);
173 extern void tmc8xx_setup(char *str, int *ints);
174 extern void t128_setup(char *str, int *ints);
175 extern void pas16_setup(char *str, int *ints);
176 extern void generic_NCR5380_setup(char *str, int *intr);
177 extern void generic_NCR53C400_setup(char *str, int *intr);
178 extern void generic_NCR53C400A_setup(char *str, int *intr);
179 extern void generic_DTC3181E_setup(char *str, int *intr);
180 extern void aha152x_setup(char *str, int *ints);
181 extern void aha1542_setup(char *str, int *ints);
182 extern void gdth_setup(char *str, int *ints);
183 extern void aic7xxx_setup(char *str, int *ints);
184 extern void AM53C974_setup(char *str, int *ints);
185 extern void BusLogic_Setup(char *str, int *ints);
186 extern void ncr53c8xx_setup(char *str, int *ints);
187 extern void sym53c8xx_setup(char *str, int *ints);
188 extern void eata2x_setup(char *str, int *ints);
189 extern void u14_34f_setup(char *str, int *ints);
190 extern void fdomain_setup(char *str, int *ints);
191 extern void ibmmca_scsi_setup(char *str, int *ints);
192 extern void fd_mcs_setup(char *str, int *ints);
193 extern void in2000_setup(char *str, int *ints);
194 extern void NCR53c406a_setup(char *str, int *ints);
195 extern void sym53c416_setup(char *str, int *ints);
196 extern void wd7000_setup(char *str, int *ints);
197 extern void dc390_setup(char* str, int *ints);
198 extern void scsi_luns_setup(char *str, int *ints);
199 extern void scsi_logging_setup(char *str, int *ints);
200 extern void sound_setup(char *str, int *ints);
201 extern void reboot_setup(char *str, int *ints);
202 extern void video_setup(char *str, int *ints);
203 #ifdef CONFIG_CDU31A
204 extern void cdu31a_setup(char *str, int *ints);
205 #endif CONFIG_CDU31A
206 #ifdef CONFIG_BLK_DEV_PS2
207 extern void ed_setup(char *str, int *ints);
208 extern void tp720_setup(char *str, int *ints);
209 #endif CONFIG_BLK_DEV_PS2
210 #ifdef CONFIG_MCD
211 extern void mcd_setup(char *str, int *ints);
212 #endif CONFIG_MCD
213 #ifdef CONFIG_MCDX
214 extern void mcdx_setup(char *str, int *ints);
215 #endif CONFIG_MCDX
216 #ifdef CONFIG_SBPCD
217 extern void sbpcd_setup(char *str, int *ints);
218 #endif CONFIG_SBPCD
219 #ifdef CONFIG_AZTCD
220 extern void aztcd_setup(char *str, int *ints);
221 #endif CONFIG_AZTCD
222 #ifdef CONFIG_CDU535
223 extern void sonycd535_setup(char *str, int *ints);
224 #endif CONFIG_CDU535
225 #ifdef CONFIG_GSCD
226 extern void gscd_setup(char *str, int *ints);
227 #endif CONFIG_GSCD
228 #ifdef CONFIG_CM206
229 extern void cm206_setup(char *str, int *ints);
230 #endif CONFIG_CM206
231 #ifdef CONFIG_OPTCD
232 extern void optcd_setup(char *str, int *ints);
233 #endif CONFIG_OPTCD
234 #ifdef CONFIG_SJCD
235 extern void sjcd_setup(char *str, int *ints);
236 #endif CONFIG_SJCD
237 #ifdef CONFIG_ISP16_CDI
238 extern void isp16_setup(char *str, int *ints);
239 #endif CONFIG_ISP16_CDI
240 #ifdef CONFIG_BLK_DEV_RAM
241 static void ramdisk_start_setup(char *str, int *ints);
242 static void load_ramdisk(char *str, int *ints);
243 static void prompt_ramdisk(char *str, int *ints);
244 static void ramdisk_size(char *str, int *ints);
245 #ifdef CONFIG_BLK_DEV_INITRD
246 static void no_initrd(char *s,int *ints);
247 #endif
248 #endif CONFIG_BLK_DEV_RAM
249 #ifdef CONFIG_ISDN_DRV_ICN
250 extern void icn_setup(char *str, int *ints);
251 #endif
252 #ifdef CONFIG_ISDN_DRV_HISAX
253 extern void HiSax_setup(char *str, int *ints);
254 #endif
255 #ifdef CONFIG_DIGIEPCA
256 extern void epca_setup(char *str, int *ints);
257 #endif
258 #ifdef CONFIG_ISDN_DRV_PCBIT
259 extern void pcbit_setup(char *str, int *ints);
260 #endif
262 #ifdef CONFIG_ATARIMOUSE
263 extern void atari_mouse_setup (char *str, int *ints);
264 #endif
265 #ifdef CONFIG_DMASOUND
266 extern void dmasound_setup (char *str, int *ints);
267 #endif
268 #ifdef CONFIG_ATARI_SCSI
269 extern void atari_scsi_setup (char *str, int *ints);
270 #endif
271 extern void stram_swap_setup (char *str, int *ints);
272 extern void wd33c93_setup (char *str, int *ints);
273 extern void gvp11_setup (char *str, int *ints);
274 extern void ncr53c7xx_setup (char *str, int *ints);
275 #ifdef CONFIG_MAC_SCSI
276 extern void mac_scsi_setup (char *str, int *ints);
277 #endif
279 #ifdef CONFIG_CYCLADES
280 extern void cy_setup(char *str, int *ints);
281 #endif
282 #ifdef CONFIG_DIGI
283 extern void pcxx_setup(char *str, int *ints);
284 #endif
285 #ifdef CONFIG_RISCOM8
286 extern void riscom8_setup(char *str, int *ints);
287 #endif
288 #ifdef CONFIG_SPECIALIX
289 extern void specialix_setup(char *str, int *ints);
290 #endif
291 #ifdef CONFIG_DMASCC
292 extern void dmascc_setup(char *str, int *ints);
293 #endif
294 #ifdef CONFIG_BAYCOM_PAR
295 extern void baycom_par_setup(char *str, int *ints);
296 #endif
297 #ifdef CONFIG_BAYCOM_SER_FDX
298 extern void baycom_ser_fdx_setup(char *str, int *ints);
299 #endif
300 #ifdef CONFIG_BAYCOM_SER_HDX
301 extern void baycom_ser_hdx_setup(char *str, int *ints);
302 #endif
303 #ifdef CONFIG_SOUNDMODEM
304 extern void sm_setup(char *str, int *ints);
305 #endif
306 #ifdef CONFIG_ADBMOUSE
307 extern void adb_mouse_setup(char *str, int *ints);
308 #endif
309 #ifdef CONFIG_WDT
310 extern void wdt_setup(char *str, int *ints);
311 #endif
312 #ifdef CONFIG_PARPORT
313 extern void parport_setup(char *str, int *ints);
314 #endif
315 #ifdef CONFIG_PLIP
316 extern void plip_setup(char *str, int *ints);
317 #endif
318 #ifdef CONFIG_HFMODEM
319 extern void hfmodem_setup(char *str, int *ints);
320 #endif
321 #ifdef CONFIG_IP_PNP
322 extern void ip_auto_config_setup(char *str, int *ints);
323 #endif
324 #ifdef CONFIG_ROOT_NFS
325 extern void nfs_root_setup(char *str, int *ints);
326 #endif
327 #ifdef CONFIG_FTAPE
328 extern void ftape_setup(char *str, int *ints);
329 #endif
330 #ifdef CONFIG_MDA_CONSOLE
331 extern void mdacon_setup(char *str, int *ints);
332 #endif
333 #ifdef CONFIG_LTPC
334 extern void ltpc_setup(char *str, int *ints);
335 #endif
336 #ifdef CONFIG_BLK_CPQ_DA
337 extern void cpqarray_setup(char *str, int *ints);
338 #endif
340 #if defined(CONFIG_SYSVIPC)
341 extern void ipc_init(void);
342 #endif
343 #if defined(CONFIG_QUOTA)
344 extern void dquot_init_hash(void);
345 #endif
347 #ifdef CONFIG_MD_BOOT
348 extern void md_setup(char *str,int *ints) __init;
349 #endif
352 * Boot command-line arguments
354 #define MAX_INIT_ARGS 8
355 #define MAX_INIT_ENVS 8
357 extern void time_init(void);
359 static unsigned long memory_start = 0;
360 static unsigned long memory_end = 0;
362 int rows, cols;
364 #ifdef CONFIG_BLK_DEV_RAM
365 extern int rd_doload; /* 1 = load ramdisk, 0 = don't load 2 = dual disk */
366 extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
367 extern int rd_size; /* Size of the ramdisk(s) */
368 extern int rd_image_start; /* starting block # of image */
369 #ifdef CONFIG_BLK_DEV_INITRD
370 kdev_t real_root_dev;
371 #endif
372 #endif
374 int root_mountflags = MS_RDONLY;
375 char *execute_command = NULL;
377 static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
378 static char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
380 char *get_options(char *str, int *ints)
382 char *cur = str;
383 int i=1;
385 while (cur && (*cur=='-' || isdigit(*cur)) && i <= 10) {
386 ints[i++] = simple_strtol(cur,NULL,0);
387 if ((cur = strchr(cur,',')) != NULL)
388 cur++;
390 ints[0] = i-1;
391 return(cur);
394 static void __init profile_setup(char *str, int *ints)
396 if (ints[0] > 0)
397 prof_shift = (unsigned long) ints[1];
398 else
399 prof_shift = 2;
403 static struct dev_name_struct {
404 const char *name;
405 const int num;
406 } root_dev_names[] __initdata = {
407 #ifdef CONFIG_ROOT_NFS
408 { "nfs", 0x00ff },
409 #endif
410 #ifdef CONFIG_BLK_DEV_IDE
411 { "hda", 0x0300 },
412 { "hdb", 0x0340 },
413 { "hdc", 0x1600 },
414 { "hdd", 0x1640 },
415 { "hde", 0x2100 },
416 { "hdf", 0x2140 },
417 { "hdg", 0x2200 },
418 { "hdh", 0x2240 },
419 { "hdi", 0x3800 },
420 { "hdj", 0x3840 },
421 { "hdk", 0x3900 },
422 { "hdl", 0x3940 },
423 { "hdm", 0x5800 },
424 { "hdn", 0x5840 },
425 { "hdo", 0x5900 },
426 { "hdp", 0x5940 },
427 #endif
428 #ifdef CONFIG_BLK_DEV_SD
429 { "sda", 0x0800 },
430 { "sdb", 0x0810 },
431 { "sdc", 0x0820 },
432 { "sdd", 0x0830 },
433 { "sde", 0x0840 },
434 { "sdf", 0x0850 },
435 { "sdg", 0x0860 },
436 { "sdh", 0x0870 },
437 { "sdi", 0x0880 },
438 { "sdj", 0x0890 },
439 { "sdk", 0x08a0 },
440 { "sdl", 0x08b0 },
441 { "sdm", 0x08c0 },
442 { "sdn", 0x08d0 },
443 { "sdo", 0x08e0 },
444 { "sdp", 0x08f0 },
445 #endif
446 #ifdef CONFIG_ATARI_ACSI
447 { "ada", 0x1c00 },
448 { "adb", 0x1c10 },
449 { "adc", 0x1c20 },
450 { "add", 0x1c30 },
451 { "ade", 0x1c40 },
452 #endif
453 #ifdef CONFIG_BLK_DEV_FD
454 { "fd", 0x0200 },
455 #endif
456 #ifdef CONFIG_MD_BOOT
457 { "md", 0x0900 },
458 #endif
459 #ifdef CONFIG_BLK_DEV_XD
460 { "xda", 0x0d00 },
461 { "xdb", 0x0d40 },
462 #endif
463 #ifdef CONFIG_BLK_DEV_RAM
464 { "ram", 0x0100 },
465 #endif
466 #ifdef CONFIG_BLK_DEV_SR
467 { "scd", 0x0b00 },
468 #endif
469 #ifdef CONFIG_MCD
470 { "mcd", 0x1700 },
471 #endif
472 #ifdef CONFIG_CDU535
473 { "cdu535", 0x1800 },
474 { "sonycd", 0x1800 },
475 #endif
476 #ifdef CONFIG_AZTCD
477 { "aztcd", 0x1d00 },
478 #endif
479 #ifdef CONFIG_CM206
480 { "cm206cd", 0x2000 },
481 #endif
482 #ifdef CONFIG_GSCD
483 { "gscd", 0x1000 },
484 #endif
485 #ifdef CONFIG_SBPCD
486 { "sbpcd", 0x1900 },
487 #endif
488 #ifdef CONFIG_BLK_DEV_PS2
489 { "eda", 0x2400 },
490 { "edb", 0x2440 },
491 #endif
492 #ifdef CONFIG_PARIDE_PD
493 { "pda", 0x2d00 },
494 { "pdb", 0x2d10 },
495 { "pdc", 0x2d20 },
496 { "pdd", 0x2d30 },
497 #endif
498 #ifdef CONFIG_PARIDE_PCD
499 { "pcd", 0x2e00 },
500 #endif
501 #ifdef CONFIG_PARIDE_PF
502 { "pf", 0x2f00 },
503 #endif
504 #if CONFIG_APBLOCK
505 { "apblock", APBLOCK_MAJOR << 8},
506 #endif
507 #if CONFIG_DDV
508 { "ddv", DDV_MAJOR << 8},
509 #endif
510 { NULL, 0 }
513 kdev_t __init name_to_kdev_t(char *line)
515 int base = 0;
516 if (strncmp(line,"/dev/",5) == 0) {
517 struct dev_name_struct *dev = root_dev_names;
518 line += 5;
519 do {
520 int len = strlen(dev->name);
521 if (strncmp(line,dev->name,len) == 0) {
522 line += len;
523 base = dev->num;
524 break;
526 dev++;
527 } while (dev->name);
529 return to_kdev_t(base + simple_strtoul(line,NULL,base?10:16));
532 static void __init root_dev_setup(char *line, int *num)
534 ROOT_DEV = name_to_kdev_t(line);
538 * List of kernel command line parameters. The first table lists parameters
539 * which are subject to values parsing (leading numbers are converted to
540 * an array of ints and chopped off the string), the second table contains
541 * the few exceptions which obey their own syntax rules.
544 struct kernel_param {
545 const char *str;
546 void (*setup_func)(char *, int *);
549 static struct kernel_param cooked_params[] __initdata = {
550 /* FIXME: make PNP just become reserve_setup */
551 #ifndef CONFIG_KERNEL_PNP_RESOURCE
552 { "reserve=", reserve_setup },
553 #else
554 { "reserve=", pnp_reserve_setup },
555 #endif
556 { "profile=", profile_setup },
557 #ifdef __SMP__
558 { "nosmp", smp_setup },
559 { "maxcpus=", smp_setup },
560 #ifdef CONFIG_X86_IO_APIC
561 { "noapic", ioapic_setup },
562 { "pirq=", ioapic_pirq_setup },
563 #endif
564 #endif
565 #ifdef CONFIG_BLK_DEV_RAM
566 { "ramdisk_start=", ramdisk_start_setup },
567 { "load_ramdisk=", load_ramdisk },
568 { "prompt_ramdisk=", prompt_ramdisk },
569 { "ramdisk=", ramdisk_size },
570 { "ramdisk_size=", ramdisk_size },
571 #ifdef CONFIG_BLK_DEV_INITRD
572 { "noinitrd", no_initrd },
573 #endif
574 #endif
575 #ifdef CONFIG_FB
576 { "video=", video_setup },
577 #endif
578 { "panic=", panic_setup },
579 { "console=", console_setup },
580 #ifdef CONFIG_VGA_CONSOLE
581 { "no-scroll", no_scroll },
582 #endif
583 #ifdef CONFIG_MDA_CONSOLE
584 { "mdacon=", mdacon_setup },
585 #endif
586 #ifdef CONFIG_VT
587 { "kbd-reset", kbd_reset_setup },
588 #endif
589 #ifdef CONFIG_BUGi386
590 { "no-hlt", no_halt },
591 { "no387", no_387 },
592 { "reboot=", reboot_setup },
593 { "mca-pentium", mca_pentium },
594 #endif
595 #ifdef CONFIG_INET
596 { "ether=", eth_setup },
597 #endif
598 #ifdef CONFIG_ARCNET_COM20020
599 { "com20020=", com20020_setup },
600 #endif
601 #ifdef CONFIG_ARCNET_RIM_I
602 { "arcrimi=", arcrimi_setup },
603 #endif
604 #ifdef CONFIG_ARCNET_COM90xxIO
605 { "com90io=", com90io_setup },
606 #endif
607 #ifdef CONFIG_ARCNET_COM90xx
608 { "com90xx=", com90xx_setup },
609 #endif
610 #ifdef CONFIG_DECNET
611 { "decnet=", decnet_setup },
612 #endif
613 #ifdef CONFIG_PRINTER
614 { "lp=", lp_setup },
615 #endif
616 #ifdef CONFIG_JOY_AMIGA
617 { "js_am=", js_am_setup },
618 #endif
619 #ifdef CONFIG_JOY_ANALOG
620 { "js_an=", js_an_setup },
621 #endif
622 #ifdef CONFIG_JOY_ASSASIN
623 { "js_as=", js_as_setup },
624 #endif
625 #ifdef CONFIG_JOY_CONSOLE
626 { "js_console=", js_console_setup },
627 { "js_console2=", js_console_setup },
628 { "js_console3=", js_console_setup },
629 #endif
630 #ifdef CONFIG_JOY_DB9
631 { "js_db9=", js_db9_setup },
632 { "js_db9_2=", js_db9_setup },
633 { "js_db9_3=", js_db9_setup },
634 #endif
635 #ifdef CONFIG_JOY_TURBOGRAFX
636 { "js_tg=", js_tg_setup },
637 { "js_tg_2=", js_tg_setup },
638 { "js_tg_3=", js_tg_setup },
639 #endif
640 #ifdef CONFIG_SCSI
641 { "max_scsi_luns=", scsi_luns_setup },
642 { "scsi_logging=", scsi_logging_setup },
643 #endif
644 #ifdef CONFIG_JOY_LIGHTNING
645 { "js_l4=", js_l4_setup },
646 #endif
647 #ifdef CONFIG_SCSI_ADVANSYS
648 { "advansys=", advansys_setup },
649 #endif
650 #if defined(CONFIG_BLK_DEV_HD)
651 { "hd=", hd_setup },
652 #endif
653 #ifdef CONFIG_CHR_DEV_ST
654 { "st=", st_setup },
655 #endif
656 #ifdef CONFIG_BUSMOUSE
657 { "bmouse=", bmouse_setup },
658 #endif
659 #ifdef CONFIG_MS_BUSMOUSE
660 { "msmouse=", msmouse_setup },
661 #endif
662 #ifdef CONFIG_SCSI_SEAGATE
663 { "st0x=", st0x_setup },
664 { "tmc8xx=", tmc8xx_setup },
665 #endif
666 #ifdef CONFIG_SCSI_T128
667 { "t128=", t128_setup },
668 #endif
669 #ifdef CONFIG_SCSI_PAS16
670 { "pas16=", pas16_setup },
671 #endif
672 #ifdef CONFIG_SCSI_GENERIC_NCR5380
673 { "ncr5380=", generic_NCR5380_setup },
674 { "ncr53c400=", generic_NCR53C400_setup },
675 { "ncr53c400a=", generic_NCR53C400A_setup },
676 { "dtc3181e=", generic_DTC3181E_setup },
677 #endif
678 #ifdef CONFIG_SCSI_AHA152X
679 { "aha152x=", aha152x_setup},
680 #endif
681 #ifdef CONFIG_SCSI_AHA1542
682 { "aha1542=", aha1542_setup},
683 #endif
684 #ifdef CONFIG_SCSI_GDTH
685 { "gdth=", gdth_setup},
686 #endif
687 #ifdef CONFIG_SCSI_AIC7XXX
688 { "aic7xxx=", aic7xxx_setup},
689 #endif
690 #ifdef CONFIG_SCSI_BUSLOGIC
691 { "BusLogic=", BusLogic_Setup},
692 #endif
693 #ifdef CONFIG_SCSI_NCR53C8XX
694 { "ncr53c8xx=", ncr53c8xx_setup},
695 #endif
696 #ifdef CONFIG_SCSI_SYM53C8XX
697 { "sym53c8xx=", sym53c8xx_setup},
698 #endif
699 #ifdef CONFIG_SCSI_EATA
700 { "eata=", eata2x_setup},
701 #endif
702 #ifdef CONFIG_SCSI_U14_34F
703 { "u14-34f=", u14_34f_setup},
704 #endif
705 #ifdef CONFIG_SCSI_AM53C974
706 { "AM53C974=", AM53C974_setup},
707 #endif
708 #ifdef CONFIG_SCSI_NCR53C406A
709 { "ncr53c406a=", NCR53c406a_setup},
710 #endif
711 #ifdef CONFIG_SCSI_SYM53C416
712 { "sym53c416=", sym53c416_setup},
713 #endif
714 #ifdef CONFIG_SCSI_FUTURE_DOMAIN
715 { "fdomain=", fdomain_setup},
716 #endif
717 #ifdef CONFIG_SCSI_IN2000
718 { "in2000=", in2000_setup},
719 #endif
720 #ifdef CONFIG_SCSI_7000FASST
721 { "wd7000=", wd7000_setup},
722 #endif
723 #ifdef CONFIG_SCSI_IBMMCA
724 { "ibmmcascsi=", ibmmca_scsi_setup },
725 #endif
726 #ifdef CONFIG_SCSI_FD_MCS
727 { "fd_mcs=", fd_mcs_setup },
728 #endif
729 #if defined(CONFIG_SCSI_DC390T) && ! defined(CONFIG_SCSI_DC390T_NOGENSUPP)
730 { "tmscsim=", dc390_setup },
731 #endif
732 #ifdef CONFIG_BLK_DEV_XD
733 { "xd=", xd_setup },
734 { "xd_geo=", xd_manual_geo_init },
735 #endif
736 #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
737 { "floppy=", floppy_setup },
738 #endif
739 #ifdef CONFIG_BLK_DEV_PS2
740 { "eda=", ed_setup },
741 { "edb=", ed_setup },
742 { "tp720=", tp720_setup },
743 #endif
744 #ifdef CONFIG_CDU31A
745 { "cdu31a=", cdu31a_setup },
746 #endif CONFIG_CDU31A
747 #ifdef CONFIG_MCD
748 { "mcd=", mcd_setup },
749 #endif CONFIG_MCD
750 #ifdef CONFIG_MCDX
751 { "mcdx=", mcdx_setup },
752 #endif CONFIG_MCDX
753 #ifdef CONFIG_SBPCD
754 { "sbpcd=", sbpcd_setup },
755 #endif CONFIG_SBPCD
756 #ifdef CONFIG_AZTCD
757 { "aztcd=", aztcd_setup },
758 #endif CONFIG_AZTCD
759 #ifdef CONFIG_CDU535
760 { "sonycd535=", sonycd535_setup },
761 #endif CONFIG_CDU535
762 #ifdef CONFIG_GSCD
763 { "gscd=", gscd_setup },
764 #endif CONFIG_GSCD
765 #ifdef CONFIG_CM206
766 { "cm206=", cm206_setup },
767 #endif CONFIG_CM206
768 #ifdef CONFIG_OPTCD
769 { "optcd=", optcd_setup },
770 #endif CONFIG_OPTCD
771 #ifdef CONFIG_SJCD
772 { "sjcd=", sjcd_setup },
773 #endif CONFIG_SJCD
774 #ifdef CONFIG_ISP16_CDI
775 { "isp16=", isp16_setup },
776 #endif CONFIG_ISP16_CDI
777 #ifdef CONFIG_SOUND_OSS
778 { "sound=", sound_setup },
779 #endif
780 #ifdef CONFIG_ISDN_DRV_ICN
781 { "icn=", icn_setup },
782 #endif
783 #ifdef CONFIG_ISDN_DRV_HISAX
784 { "hisax=", HiSax_setup },
785 { "HiSax=", HiSax_setup },
786 #endif
787 #ifdef CONFIG_ISDN_DRV_PCBIT
788 { "pcbit=", pcbit_setup },
789 #endif
790 #ifdef CONFIG_ATARIMOUSE
791 { "atamouse=", atari_mouse_setup },
792 #endif
793 #ifdef CONFIG_DMASOUND
794 { "dmasound=", dmasound_setup },
795 #endif
796 #ifdef CONFIG_ATARI_SCSI
797 { "atascsi=", atari_scsi_setup },
798 #endif
799 #ifdef CONFIG_STRAM_SWAP
800 { "stram_swap=", stram_swap_setup },
801 #endif
802 #if defined(CONFIG_A4000T_SCSI) || defined(CONFIG_WARPENGINE_SCSI) \
803 || defined(CONFIG_A4091_SCSI) || defined(CONFIG_MVME16x_SCSI) \
804 || defined(CONFIG_BVME6000_SCSI) \
805 || defined(CONFIG_BLZ603EPLUS_SCSI)
806 { "53c7xx=", ncr53c7xx_setup },
807 #endif
808 #if defined(CONFIG_A3000_SCSI) || defined(CONFIG_A2091_SCSI) \
809 || defined(CONFIG_GVP11_SCSI)
810 { "wd33c93=", wd33c93_setup },
811 #endif
812 #if defined(CONFIG_GVP11_SCSI)
813 { "gvp11=", gvp11_setup },
814 #endif
815 #ifdef CONFIG_MAC_SCSI
816 { "mac5380=", mac_scsi_setup },
817 #endif
818 #ifdef CONFIG_CYCLADES
819 { "cyclades=", cy_setup },
820 #endif
821 #ifdef CONFIG_DIGI
822 { "digi=", pcxx_setup },
823 #endif
824 #ifdef CONFIG_DIGIEPCA
825 { "digiepca=", epca_setup },
826 #endif
827 #ifdef CONFIG_RISCOM8
828 { "riscom8=", riscom8_setup },
829 #endif
830 #ifdef CONFIG_DMASCC
831 { "dmascc=", dmascc_setup },
832 #endif
833 #ifdef CONFIG_SPECIALIX
834 { "specialix=", specialix_setup },
835 #endif
836 #ifdef CONFIG_BAYCOM_PAR
837 { "baycom_par=", baycom_par_setup },
838 #endif
839 #ifdef CONFIG_BAYCOM_SER_FDX
840 { "baycom_ser_fdx=", baycom_ser_fdx_setup },
841 #endif
842 #ifdef CONFIG_BAYCOM_SER_HDX
843 { "baycom_ser_hdx=", baycom_ser_hdx_setup },
844 #endif
845 #ifdef CONFIG_SOUNDMODEM
846 { "soundmodem=", sm_setup },
847 #endif
848 #ifdef CONFIG_WDT
849 { "wdt=", wdt_setup },
850 #endif
851 #ifdef CONFIG_PARPORT
852 { "parport=", parport_setup },
853 #endif
854 #ifdef CONFIG_PLIP
855 { "plip=", plip_setup },
856 #endif
857 #ifdef CONFIG_HFMODEM
858 { "hfmodem=", hfmodem_setup },
859 #endif
860 #ifdef CONFIG_FTAPE
861 { "ftape=", ftape_setup},
862 #endif
863 #ifdef CONFIG_MD_BOOT
864 { "md=", md_setup},
865 #endif
866 #ifdef CONFIG_ADBMOUSE
867 { "adb_buttons=", adb_mouse_setup },
868 #endif
869 #ifdef CONFIG_LTPC
870 { "ltpc=", ltpc_setup },
871 #endif
872 #ifdef CONFIG_BLK_CPQ_DA
873 { "smart2=", cpqarray_setup },
874 #endif
875 { 0, 0 }
878 static struct kernel_param raw_params[] __initdata = {
879 { "root=", root_dev_setup },
880 #ifdef CONFIG_ROOT_NFS
881 { "nfsroot=", nfs_root_setup },
882 { "nfsaddrs=", ip_auto_config_setup },
883 #endif
884 #ifdef CONFIG_IP_PNP
885 { "ip=", ip_auto_config_setup },
886 #endif
887 #ifdef CONFIG_PCI
888 { "pci=", pci_setup },
889 #endif
890 #ifdef CONFIG_PARIDE_PD
891 { "pd.", pd_setup },
892 #endif
893 #ifdef CONFIG_PARIDE_PCD
894 { "pcd.", pcd_setup },
895 #endif
896 #ifdef CONFIG_PARIDE_PF
897 { "pf.", pf_setup },
898 #endif
899 #ifdef CONFIG_PARIDE_PT
900 { "pt.", pt_setup },
901 #endif
902 #ifdef CONFIG_PARIDE_PG
903 { "pg.", pg_setup },
904 #endif
905 #ifdef CONFIG_APM
906 { "apm=", apm_setup },
907 #endif
908 { 0, 0 }
911 #ifdef CONFIG_BLK_DEV_RAM
912 static void __init ramdisk_start_setup(char *str, int *ints)
914 if (ints[0] > 0 && ints[1] >= 0)
915 rd_image_start = ints[1];
918 static void __init load_ramdisk(char *str, int *ints)
920 if (ints[0] > 0 && ints[1] >= 0)
921 rd_doload = ints[1] & 3;
924 static void __init prompt_ramdisk(char *str, int *ints)
926 if (ints[0] > 0 && ints[1] >= 0)
927 rd_prompt = ints[1] & 1;
930 static void __init ramdisk_size(char *str, int *ints)
932 if (ints[0] > 0 && ints[1] >= 0)
933 rd_size = ints[1];
935 #endif
937 static int __init checksetup(char *line)
939 int i, ints[11];
941 #ifdef CONFIG_BLK_DEV_IDE
942 /* ide driver needs the basic string, rather than pre-processed values */
943 if (!strncmp(line,"ide",3) ||
944 #ifdef CONFIG_BLK_DEV_VIA82C586
945 !strncmp(line,"splitfifo",9) ||
946 #endif /* CONFIG_BLK_DEV_VIA82C586 */
947 (!strncmp(line,"hd",2) && line[2] != '=')) {
948 ide_setup(line);
949 return 1;
951 #endif
952 for (i=0; raw_params[i].str; i++) {
953 int n = strlen(raw_params[i].str);
954 if (!strncmp(line,raw_params[i].str,n)) {
955 raw_params[i].setup_func(line+n, NULL);
956 return 1;
959 for (i=0; cooked_params[i].str; i++) {
960 int n = strlen(cooked_params[i].str);
961 if (!strncmp(line,cooked_params[i].str,n)) {
962 cooked_params[i].setup_func(get_options(line+n, ints), ints);
963 return 1;
966 return 0;
969 /* this should be approx 2 Bo*oMips to start (note initial shift), and will
970 still work even if initially too large, it will just take slightly longer */
971 unsigned long loops_per_sec = (1<<12);
973 /* This is the number of bits of precision for the loops_per_second. Each
974 bit takes on average 1.5/HZ seconds. This (like the original) is a little
975 better than 1% */
976 #define LPS_PREC 8
978 void __init calibrate_delay(void)
980 unsigned long ticks, loopbit;
981 int lps_precision = LPS_PREC;
983 loops_per_sec = (1<<12);
985 printk("Calibrating delay loop... ");
986 while (loops_per_sec <<= 1) {
987 /* wait for "start of" clock tick */
988 ticks = jiffies;
989 while (ticks == jiffies)
990 /* nothing */;
991 /* Go .. */
992 ticks = jiffies;
993 __delay(loops_per_sec);
994 ticks = jiffies - ticks;
995 if (ticks)
996 break;
999 /* Do a binary approximation to get loops_per_second set to equal one clock
1000 (up to lps_precision bits) */
1001 loops_per_sec >>= 1;
1002 loopbit = loops_per_sec;
1003 while ( lps_precision-- && (loopbit >>= 1) ) {
1004 loops_per_sec |= loopbit;
1005 ticks = jiffies;
1006 while (ticks == jiffies);
1007 ticks = jiffies;
1008 __delay(loops_per_sec);
1009 if (jiffies != ticks) /* longer than 1 tick */
1010 loops_per_sec &= ~loopbit;
1013 /* finally, adjust loops per second in terms of seconds instead of clocks */
1014 loops_per_sec *= HZ;
1015 /* Round the value and print it */
1016 printk("%lu.%02lu BogoMIPS\n",
1017 (loops_per_sec+2500)/500000,
1018 ((loops_per_sec+2500)/5000) % 100);
1022 * This is a simple kernel command line parsing function: it parses
1023 * the command line, and fills in the arguments/environment to init
1024 * as appropriate. Any cmd-line option is taken to be an environment
1025 * variable if it contains the character '='.
1027 * This routine also checks for options meant for the kernel.
1028 * These options are not given to init - they are for internal kernel use only.
1030 static void __init parse_options(char *line)
1032 char *next;
1033 int args, envs;
1035 if (!*line)
1036 return;
1037 args = 0;
1038 envs = 1; /* TERM is set to 'linux' by default */
1039 next = line;
1040 while ((line = next) != NULL) {
1041 if ((next = strchr(line,' ')) != NULL)
1042 *next++ = 0;
1044 * check for kernel options first..
1046 if (!strcmp(line,"ro")) {
1047 root_mountflags |= MS_RDONLY;
1048 continue;
1050 if (!strcmp(line,"rw")) {
1051 root_mountflags &= ~MS_RDONLY;
1052 continue;
1054 if (!strcmp(line,"debug")) {
1055 console_loglevel = 10;
1056 continue;
1058 if (!strncmp(line,"init=",5)) {
1059 line += 5;
1060 execute_command = line;
1061 /* In case LILO is going to boot us with default command line,
1062 * it prepends "auto" before the whole cmdline which makes
1063 * the shell think it should execute a script with such name.
1064 * So we ignore all arguments entered _before_ init=... [MJ]
1066 args = 0;
1067 continue;
1069 if (checksetup(line))
1070 continue;
1073 * Then check if it's an environment variable or
1074 * an option.
1076 if (strchr(line,'=')) {
1077 if (envs >= MAX_INIT_ENVS)
1078 break;
1079 envp_init[++envs] = line;
1080 } else {
1081 if (args >= MAX_INIT_ARGS)
1082 break;
1083 argv_init[++args] = line;
1086 argv_init[args+1] = NULL;
1087 envp_init[envs+1] = NULL;
1091 extern void setup_arch(char **, unsigned long *, unsigned long *);
1092 extern int cpu_idle(void * unused);
1094 #ifndef __SMP__
1096 #define smp_init() do { } while (0)
1098 #else
1100 /* Called by boot processor to activate the rest. */
1101 static void __init smp_init(void)
1103 /* Get other processors into their bootup holding patterns. */
1104 smp_boot_cpus();
1105 smp_threads_ready=1;
1106 smp_commence();
1109 #endif
1111 extern void initialize_secondary(void);
1114 * Activate the first processor.
1117 asmlinkage void __init start_kernel(void)
1119 char * command_line;
1121 #ifdef __SMP__
1122 static int boot_cpu = 1;
1123 /* "current" has been set up, we need to load it now */
1124 if (!boot_cpu)
1125 initialize_secondary();
1126 boot_cpu = 0;
1127 #endif
1130 * Interrupts are still disabled. Do necessary setups, then
1131 * enable them
1133 lock_kernel();
1134 printk(linux_banner);
1135 setup_arch(&command_line, &memory_start, &memory_end);
1136 memory_start = paging_init(memory_start,memory_end);
1137 trap_init();
1138 init_IRQ();
1139 sched_init();
1140 time_init();
1141 parse_options(command_line);
1144 * HACK ALERT! This is early. We're enabling the console before
1145 * we've done PCI setups etc, and console_init() must be aware of
1146 * this. But we do want output early, in case something goes wrong.
1148 memory_start = console_init(memory_start,memory_end);
1149 #ifdef CONFIG_MODULES
1150 init_modules();
1151 #endif
1152 if (prof_shift) {
1153 prof_buffer = (unsigned int *) memory_start;
1154 /* only text is profiled */
1155 prof_len = (unsigned long) &_etext - (unsigned long) &_stext;
1156 prof_len >>= prof_shift;
1157 memory_start += prof_len * sizeof(unsigned int);
1158 memset(prof_buffer, 0, prof_len * sizeof(unsigned int));
1161 memory_start = kmem_cache_init(memory_start, memory_end);
1162 sti();
1163 calibrate_delay();
1164 #ifdef CONFIG_BLK_DEV_INITRD
1165 if (initrd_start && !initrd_below_start_ok && initrd_start < memory_start) {
1166 printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
1167 "disabling it.\n",initrd_start,memory_start);
1168 initrd_start = 0;
1170 #endif
1171 mem_init(memory_start,memory_end);
1172 kmem_cache_sizes_init();
1173 #ifdef CONFIG_PROC_FS
1174 proc_root_init();
1175 #endif
1176 fork_init(memory_end-memory_start);
1177 filescache_init();
1178 dcache_init();
1179 vma_init();
1180 buffer_init(memory_end-memory_start);
1181 page_cache_init(memory_end-memory_start);
1182 kiobuf_init();
1183 signals_init();
1184 inode_init();
1185 file_table_init();
1186 #if defined(CONFIG_SYSVIPC)
1187 ipc_init();
1188 #endif
1189 #if defined(CONFIG_QUOTA)
1190 dquot_init_hash();
1191 #endif
1192 check_bugs();
1193 printk("POSIX conformance testing by UNIFIX\n");
1196 * We count on the initial thread going ok
1197 * Like idlers init is an unlocked kernel thread, which will
1198 * make syscalls (and thus be locked).
1200 smp_init();
1201 kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1202 unlock_kernel();
1203 current->need_resched = 1;
1204 cpu_idle(NULL);
1207 #ifdef CONFIG_BLK_DEV_INITRD
1208 static int do_linuxrc(void * shell)
1210 static char *argv[] = { "linuxrc", NULL, };
1212 close(0);close(1);close(2);
1213 setsid();
1214 (void) open("/dev/console",O_RDWR,0);
1215 (void) dup(0);
1216 (void) dup(0);
1217 return execve(shell, argv, envp_init);
1220 static void __init no_initrd(char *s,int *ints)
1222 mount_initrd = 0;
1224 #endif
1226 struct task_struct *child_reaper = &init_task;
1229 * Ok, the machine is now initialized. None of the devices
1230 * have been touched yet, but the CPU subsystem is up and
1231 * running, and memory and process management works.
1233 * Now we can finally start doing some real work..
1235 static void __init do_basic_setup(void)
1237 #ifdef CONFIG_BLK_DEV_INITRD
1238 int real_root_mountflags;
1239 #endif
1242 * Tell the world that we're going to be the grim
1243 * reaper of innocent orphaned children.
1245 * We don't want people to have to make incorrect
1246 * assumptions about where in the task array this
1247 * can be found.
1249 child_reaper = current;
1251 #if defined(CONFIG_MTRR) /* Do this after SMP initialization */
1253 * We should probably create some architecture-dependent "fixup after
1254 * everything is up" style function where this would belong better
1255 * than in init/main.c..
1257 mtrr_init();
1258 #endif
1260 #ifdef CONFIG_SYSCTL
1261 sysctl_init();
1262 #endif
1265 * Ok, at this point all CPU's should be initialized, so
1266 * we can start looking into devices..
1268 #ifdef CONFIG_PCI
1269 pci_init();
1270 #endif
1271 #ifdef CONFIG_SBUS
1272 sbus_init();
1273 #endif
1274 #if defined(CONFIG_PPC)
1275 ppc_init();
1276 #endif
1277 #ifdef CONFIG_MCA
1278 mca_init();
1279 #endif
1280 #ifdef CONFIG_ARCH_ACORN
1281 ecard_init();
1282 #endif
1283 #ifdef CONFIG_ZORRO
1284 zorro_init();
1285 #endif
1286 #ifdef CONFIG_DIO
1287 dio_init();
1288 #endif
1289 #ifdef CONFIG_MAC
1290 nubus_init();
1291 #endif
1292 #ifdef CONFIG_APM
1293 apm_init();
1294 #endif
1296 /* Networking initialization needs a process context */
1297 sock_init();
1299 /* Launch bdflush from here, instead of the old syscall way. */
1300 kernel_thread(bdflush, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1301 /* Start the background pageout daemon. */
1302 kswapd_setup();
1303 kernel_thread(kswapd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1305 #if CONFIG_AP1000
1306 /* Start the async paging daemon. */
1308 extern int asyncd(void *);
1309 kernel_thread(asyncd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1311 #endif
1313 #ifdef CONFIG_BLK_DEV_INITRD
1315 real_root_dev = ROOT_DEV;
1316 real_root_mountflags = root_mountflags;
1317 if (initrd_start && mount_initrd) root_mountflags &= ~MS_RDONLY;
1318 else mount_initrd =0;
1319 #endif
1321 /* Set up devices .. */
1322 device_setup();
1324 /* .. executable formats .. */
1325 binfmt_setup();
1327 /* .. filesystems .. */
1328 filesystem_setup();
1330 /* Mount the root filesystem.. */
1331 mount_root();
1333 #ifdef CONFIG_BLK_DEV_INITRD
1334 root_mountflags = real_root_mountflags;
1335 if (mount_initrd && ROOT_DEV != real_root_dev
1336 && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
1337 int error;
1338 int i, pid;
1340 pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
1341 if (pid>0)
1342 while (pid != wait(&i));
1343 if (MAJOR(real_root_dev) != RAMDISK_MAJOR
1344 || MINOR(real_root_dev) != 0) {
1345 error = change_root(real_root_dev,"/initrd");
1346 if (error)
1347 printk(KERN_ERR "Change root to /initrd: "
1348 "error %d\n",error);
1351 #endif
1354 static int init(void * unused)
1356 lock_kernel();
1357 do_basic_setup();
1360 * Ok, we have completed the initial bootup, and
1361 * we're essentially up and running. Get rid of the
1362 * initmem segments and start the user-mode stuff..
1364 free_initmem();
1365 unlock_kernel();
1367 if (open("/dev/console", O_RDWR, 0) < 0)
1368 printk("Warning: unable to open an initial console.\n");
1370 (void) dup(0);
1371 (void) dup(0);
1374 * We try each of these until one succeeds.
1376 * The Bourne shell can be used instead of init if we are
1377 * trying to recover a really broken machine.
1380 if (execute_command)
1381 execve(execute_command,argv_init,envp_init);
1382 execve("/sbin/init",argv_init,envp_init);
1383 execve("/etc/init",argv_init,envp_init);
1384 execve("/bin/init",argv_init,envp_init);
1385 execve("/bin/sh",argv_init,envp_init);
1386 panic("No init found. Try passing init= option to kernel.");