Import 2.3.5
[davej-history.git] / init / main.c
blobbc0b2faf3eed1d1ce922fb025250c6650fe78ca8
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>
27 #include <asm/io.h>
28 #include <asm/bugs.h>
30 #ifdef CONFIG_PCI
31 #include <linux/pci.h>
32 #endif
34 #ifdef CONFIG_DIO
35 #include <linux/dio.h>
36 #endif
38 #ifdef CONFIG_ZORRO
39 #include <linux/zorro.h>
40 #endif
42 #ifdef CONFIG_MTRR
43 # include <asm/mtrr.h>
44 #endif
46 #ifdef CONFIG_APM
47 #include <linux/apm_bios.h>
48 #endif
50 #ifdef CONFIG_MAC
51 extern void nubus_init(void);
52 #endif
55 * Versions of gcc older than that listed below may actually compile
56 * and link okay, but the end product can have subtle run time bugs.
57 * To avoid associated bogus bug reports, we flatly refuse to compile
58 * with a gcc that is known to be too old from the very beginning.
60 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
61 #error sorry, your GCC is too old. It builds incorrect kernels.
62 #endif
64 extern char _stext, _etext;
65 extern char *linux_banner;
67 extern int console_loglevel;
69 static int init(void *);
70 extern int bdflush(void *);
71 extern int kswapd(void *);
72 extern int kpiod(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 uidcache_init(void);
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
337 #if defined(CONFIG_SYSVIPC)
338 extern void ipc_init(void);
339 #endif
340 #if defined(CONFIG_QUOTA)
341 extern void dquot_init_hash(void);
342 #endif
344 #ifdef CONFIG_MD_BOOT
345 extern void md_setup(char *str,int *ints) __init;
346 #endif
349 * Boot command-line arguments
351 #define MAX_INIT_ARGS 8
352 #define MAX_INIT_ENVS 8
354 extern void time_init(void);
356 static unsigned long memory_start = 0;
357 static unsigned long memory_end = 0;
359 int rows, cols;
361 #ifdef CONFIG_BLK_DEV_RAM
362 extern int rd_doload; /* 1 = load ramdisk, 0 = don't load 2 = dual disk */
363 extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
364 extern int rd_size; /* Size of the ramdisk(s) */
365 extern int rd_image_start; /* starting block # of image */
366 #ifdef CONFIG_BLK_DEV_INITRD
367 kdev_t real_root_dev;
368 #endif
369 #endif
371 int root_mountflags = MS_RDONLY;
372 char *execute_command = NULL;
374 static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
375 static char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
377 char *get_options(char *str, int *ints)
379 char *cur = str;
380 int i=1;
382 while (cur && (*cur=='-' || isdigit(*cur)) && i <= 10) {
383 ints[i++] = simple_strtol(cur,NULL,0);
384 if ((cur = strchr(cur,',')) != NULL)
385 cur++;
387 ints[0] = i-1;
388 return(cur);
391 static void __init profile_setup(char *str, int *ints)
393 if (ints[0] > 0)
394 prof_shift = (unsigned long) ints[1];
395 else
396 prof_shift = 2;
400 static struct dev_name_struct {
401 const char *name;
402 const int num;
403 } root_dev_names[] __initdata = {
404 #ifdef CONFIG_ROOT_NFS
405 { "nfs", 0x00ff },
406 #endif
407 #ifdef CONFIG_BLK_DEV_IDE
408 { "hda", 0x0300 },
409 { "hdb", 0x0340 },
410 { "hdc", 0x1600 },
411 { "hdd", 0x1640 },
412 { "hde", 0x2100 },
413 { "hdf", 0x2140 },
414 { "hdg", 0x2200 },
415 { "hdh", 0x2240 },
416 { "hdi", 0x3800 },
417 { "hdj", 0x3840 },
418 { "hdk", 0x3900 },
419 { "hdl", 0x3940 },
420 { "hdm", 0x5800 },
421 { "hdn", 0x5840 },
422 { "hdo", 0x5900 },
423 { "hdp", 0x5940 },
424 #endif
425 #ifdef CONFIG_BLK_DEV_SD
426 { "sda", 0x0800 },
427 { "sdb", 0x0810 },
428 { "sdc", 0x0820 },
429 { "sdd", 0x0830 },
430 { "sde", 0x0840 },
431 { "sdf", 0x0850 },
432 { "sdg", 0x0860 },
433 { "sdh", 0x0870 },
434 { "sdi", 0x0880 },
435 { "sdj", 0x0890 },
436 { "sdk", 0x08a0 },
437 { "sdl", 0x08b0 },
438 { "sdm", 0x08c0 },
439 { "sdn", 0x08d0 },
440 { "sdo", 0x08e0 },
441 { "sdp", 0x08f0 },
442 #endif
443 #ifdef CONFIG_ATARI_ACSI
444 { "ada", 0x1c00 },
445 { "adb", 0x1c10 },
446 { "adc", 0x1c20 },
447 { "add", 0x1c30 },
448 { "ade", 0x1c40 },
449 #endif
450 #ifdef CONFIG_BLK_DEV_FD
451 { "fd", 0x0200 },
452 #endif
453 #ifdef CONFIG_MD_BOOT
454 { "md", 0x0900 },
455 #endif
456 #ifdef CONFIG_BLK_DEV_XD
457 { "xda", 0x0d00 },
458 { "xdb", 0x0d40 },
459 #endif
460 #ifdef CONFIG_BLK_DEV_RAM
461 { "ram", 0x0100 },
462 #endif
463 #ifdef CONFIG_BLK_DEV_SR
464 { "scd", 0x0b00 },
465 #endif
466 #ifdef CONFIG_MCD
467 { "mcd", 0x1700 },
468 #endif
469 #ifdef CONFIG_CDU535
470 { "cdu535", 0x1800 },
471 { "sonycd", 0x1800 },
472 #endif
473 #ifdef CONFIG_AZTCD
474 { "aztcd", 0x1d00 },
475 #endif
476 #ifdef CONFIG_CM206
477 { "cm206cd", 0x2000 },
478 #endif
479 #ifdef CONFIG_GSCD
480 { "gscd", 0x1000 },
481 #endif
482 #ifdef CONFIG_SBPCD
483 { "sbpcd", 0x1900 },
484 #endif
485 #ifdef CONFIG_BLK_DEV_PS2
486 { "eda", 0x2400 },
487 { "edb", 0x2440 },
488 #endif
489 #ifdef CONFIG_PARIDE_PD
490 { "pda", 0x2d00 },
491 { "pdb", 0x2d10 },
492 { "pdc", 0x2d20 },
493 { "pdd", 0x2d30 },
494 #endif
495 #ifdef CONFIG_PARIDE_PCD
496 { "pcd", 0x2e00 },
497 #endif
498 #ifdef CONFIG_PARIDE_PF
499 { "pf", 0x2f00 },
500 #endif
501 #if CONFIG_APBLOCK
502 { "apblock", APBLOCK_MAJOR << 8},
503 #endif
504 #if CONFIG_DDV
505 { "ddv", DDV_MAJOR << 8},
506 #endif
507 { NULL, 0 }
510 kdev_t __init name_to_kdev_t(char *line)
512 int base = 0;
513 if (strncmp(line,"/dev/",5) == 0) {
514 struct dev_name_struct *dev = root_dev_names;
515 line += 5;
516 do {
517 int len = strlen(dev->name);
518 if (strncmp(line,dev->name,len) == 0) {
519 line += len;
520 base = dev->num;
521 break;
523 dev++;
524 } while (dev->name);
526 return to_kdev_t(base + simple_strtoul(line,NULL,base?10:16));
529 static void __init root_dev_setup(char *line, int *num)
531 ROOT_DEV = name_to_kdev_t(line);
535 * List of kernel command line parameters. The first table lists parameters
536 * which are subject to values parsing (leading numbers are converted to
537 * an array of ints and chopped off the string), the second table contains
538 * the few exceptions which obey their own syntax rules.
541 struct kernel_param {
542 const char *str;
543 void (*setup_func)(char *, int *);
546 static struct kernel_param cooked_params[] __initdata = {
547 /* FIXME: make PNP just become reserve_setup */
548 #ifndef CONFIG_KERNEL_PNP_RESOURCE
549 { "reserve=", reserve_setup },
550 #else
551 { "reserve=", pnp_reserve_setup },
552 #endif
553 { "profile=", profile_setup },
554 #ifdef __SMP__
555 { "nosmp", smp_setup },
556 { "maxcpus=", smp_setup },
557 #ifdef CONFIG_X86_IO_APIC
558 { "noapic", ioapic_setup },
559 { "pirq=", ioapic_pirq_setup },
560 #endif
561 #endif
562 #ifdef CONFIG_BLK_DEV_RAM
563 { "ramdisk_start=", ramdisk_start_setup },
564 { "load_ramdisk=", load_ramdisk },
565 { "prompt_ramdisk=", prompt_ramdisk },
566 { "ramdisk=", ramdisk_size },
567 { "ramdisk_size=", ramdisk_size },
568 #ifdef CONFIG_BLK_DEV_INITRD
569 { "noinitrd", no_initrd },
570 #endif
571 #endif
572 #ifdef CONFIG_FB
573 { "video=", video_setup },
574 #endif
575 { "panic=", panic_setup },
576 { "console=", console_setup },
577 #ifdef CONFIG_VGA_CONSOLE
578 { "no-scroll", no_scroll },
579 #endif
580 #ifdef CONFIG_MDA_CONSOLE
581 { "mdacon=", mdacon_setup },
582 #endif
583 #ifdef CONFIG_VT
584 { "kbd-reset", kbd_reset_setup },
585 #endif
586 #ifdef CONFIG_BUGi386
587 { "no-hlt", no_halt },
588 { "no387", no_387 },
589 { "reboot=", reboot_setup },
590 { "mca-pentium", mca_pentium },
591 #endif
592 #ifdef CONFIG_INET
593 { "ether=", eth_setup },
594 #endif
595 #ifdef CONFIG_ARCNET_COM20020
596 { "com20020=", com20020_setup },
597 #endif
598 #ifdef CONFIG_ARCNET_RIM_I
599 { "arcrimi=", arcrimi_setup },
600 #endif
601 #ifdef CONFIG_ARCNET_COM90xxIO
602 { "com90io=", com90io_setup },
603 #endif
604 #ifdef CONFIG_ARCNET_COM90xx
605 { "com90xx=", com90xx_setup },
606 #endif
607 #ifdef CONFIG_DECNET
608 { "decnet=", decnet_setup },
609 #endif
610 #ifdef CONFIG_PRINTER
611 { "lp=", lp_setup },
612 #endif
613 #ifdef CONFIG_JOY_AMIGA
614 { "js_am=", js_am_setup },
615 #endif
616 #ifdef CONFIG_JOY_ANALOG
617 { "js_an=", js_an_setup },
618 #endif
619 #ifdef CONFIG_JOY_ASSASIN
620 { "js_as=", js_as_setup },
621 #endif
622 #ifdef CONFIG_JOY_CONSOLE
623 { "js_console=", js_console_setup },
624 { "js_console2=", js_console_setup },
625 { "js_console3=", js_console_setup },
626 #endif
627 #ifdef CONFIG_JOY_DB9
628 { "js_db9=", js_db9_setup },
629 { "js_db9_2=", js_db9_setup },
630 { "js_db9_3=", js_db9_setup },
631 #endif
632 #ifdef CONFIG_JOY_TURBOGRAFX
633 { "js_tg=", js_tg_setup },
634 { "js_tg_2=", js_tg_setup },
635 { "js_tg_3=", js_tg_setup },
636 #endif
637 #ifdef CONFIG_SCSI
638 { "max_scsi_luns=", scsi_luns_setup },
639 { "scsi_logging=", scsi_logging_setup },
640 #endif
641 #ifdef CONFIG_JOY_LIGHTNING
642 { "js_l4=", js_l4_setup },
643 #endif
644 #ifdef CONFIG_SCSI_ADVANSYS
645 { "advansys=", advansys_setup },
646 #endif
647 #if defined(CONFIG_BLK_DEV_HD)
648 { "hd=", hd_setup },
649 #endif
650 #ifdef CONFIG_CHR_DEV_ST
651 { "st=", st_setup },
652 #endif
653 #ifdef CONFIG_BUSMOUSE
654 { "bmouse=", bmouse_setup },
655 #endif
656 #ifdef CONFIG_MS_BUSMOUSE
657 { "msmouse=", msmouse_setup },
658 #endif
659 #ifdef CONFIG_SCSI_SEAGATE
660 { "st0x=", st0x_setup },
661 { "tmc8xx=", tmc8xx_setup },
662 #endif
663 #ifdef CONFIG_SCSI_T128
664 { "t128=", t128_setup },
665 #endif
666 #ifdef CONFIG_SCSI_PAS16
667 { "pas16=", pas16_setup },
668 #endif
669 #ifdef CONFIG_SCSI_GENERIC_NCR5380
670 { "ncr5380=", generic_NCR5380_setup },
671 { "ncr53c400=", generic_NCR53C400_setup },
672 { "ncr53c400a=", generic_NCR53C400A_setup },
673 { "dtc3181e=", generic_DTC3181E_setup },
674 #endif
675 #ifdef CONFIG_SCSI_AHA152X
676 { "aha152x=", aha152x_setup},
677 #endif
678 #ifdef CONFIG_SCSI_AHA1542
679 { "aha1542=", aha1542_setup},
680 #endif
681 #ifdef CONFIG_SCSI_GDTH
682 { "gdth=", gdth_setup},
683 #endif
684 #ifdef CONFIG_SCSI_AIC7XXX
685 { "aic7xxx=", aic7xxx_setup},
686 #endif
687 #ifdef CONFIG_SCSI_BUSLOGIC
688 { "BusLogic=", BusLogic_Setup},
689 #endif
690 #ifdef CONFIG_SCSI_NCR53C8XX
691 { "ncr53c8xx=", ncr53c8xx_setup},
692 #endif
693 #ifdef CONFIG_SCSI_SYM53C8XX
694 { "sym53c8xx=", sym53c8xx_setup},
695 #endif
696 #ifdef CONFIG_SCSI_EATA
697 { "eata=", eata2x_setup},
698 #endif
699 #ifdef CONFIG_SCSI_U14_34F
700 { "u14-34f=", u14_34f_setup},
701 #endif
702 #ifdef CONFIG_SCSI_AM53C974
703 { "AM53C974=", AM53C974_setup},
704 #endif
705 #ifdef CONFIG_SCSI_NCR53C406A
706 { "ncr53c406a=", NCR53c406a_setup},
707 #endif
708 #ifdef CONFIG_SCSI_SYM53C416
709 { "sym53c416=", sym53c416_setup},
710 #endif
711 #ifdef CONFIG_SCSI_FUTURE_DOMAIN
712 { "fdomain=", fdomain_setup},
713 #endif
714 #ifdef CONFIG_SCSI_IN2000
715 { "in2000=", in2000_setup},
716 #endif
717 #ifdef CONFIG_SCSI_7000FASST
718 { "wd7000=", wd7000_setup},
719 #endif
720 #ifdef CONFIG_SCSI_IBMMCA
721 { "ibmmcascsi=", ibmmca_scsi_setup },
722 #endif
723 #ifdef CONFIG_SCSI_FD_MCS
724 { "fd_mcs=", fd_mcs_setup },
725 #endif
726 #if defined(CONFIG_SCSI_DC390T) && ! defined(CONFIG_SCSI_DC390T_NOGENSUPP)
727 { "tmscsim=", dc390_setup },
728 #endif
729 #ifdef CONFIG_BLK_DEV_XD
730 { "xd=", xd_setup },
731 { "xd_geo=", xd_manual_geo_init },
732 #endif
733 #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
734 { "floppy=", floppy_setup },
735 #endif
736 #ifdef CONFIG_BLK_DEV_PS2
737 { "eda=", ed_setup },
738 { "edb=", ed_setup },
739 { "tp720=", tp720_setup },
740 #endif
741 #ifdef CONFIG_CDU31A
742 { "cdu31a=", cdu31a_setup },
743 #endif CONFIG_CDU31A
744 #ifdef CONFIG_MCD
745 { "mcd=", mcd_setup },
746 #endif CONFIG_MCD
747 #ifdef CONFIG_MCDX
748 { "mcdx=", mcdx_setup },
749 #endif CONFIG_MCDX
750 #ifdef CONFIG_SBPCD
751 { "sbpcd=", sbpcd_setup },
752 #endif CONFIG_SBPCD
753 #ifdef CONFIG_AZTCD
754 { "aztcd=", aztcd_setup },
755 #endif CONFIG_AZTCD
756 #ifdef CONFIG_CDU535
757 { "sonycd535=", sonycd535_setup },
758 #endif CONFIG_CDU535
759 #ifdef CONFIG_GSCD
760 { "gscd=", gscd_setup },
761 #endif CONFIG_GSCD
762 #ifdef CONFIG_CM206
763 { "cm206=", cm206_setup },
764 #endif CONFIG_CM206
765 #ifdef CONFIG_OPTCD
766 { "optcd=", optcd_setup },
767 #endif CONFIG_OPTCD
768 #ifdef CONFIG_SJCD
769 { "sjcd=", sjcd_setup },
770 #endif CONFIG_SJCD
771 #ifdef CONFIG_ISP16_CDI
772 { "isp16=", isp16_setup },
773 #endif CONFIG_ISP16_CDI
774 #ifdef CONFIG_SOUND_OSS
775 { "sound=", sound_setup },
776 #endif
777 #ifdef CONFIG_ISDN_DRV_ICN
778 { "icn=", icn_setup },
779 #endif
780 #ifdef CONFIG_ISDN_DRV_HISAX
781 { "hisax=", HiSax_setup },
782 { "HiSax=", HiSax_setup },
783 #endif
784 #ifdef CONFIG_ISDN_DRV_PCBIT
785 { "pcbit=", pcbit_setup },
786 #endif
787 #ifdef CONFIG_ATARIMOUSE
788 { "atamouse=", atari_mouse_setup },
789 #endif
790 #ifdef CONFIG_DMASOUND
791 { "dmasound=", dmasound_setup },
792 #endif
793 #ifdef CONFIG_ATARI_SCSI
794 { "atascsi=", atari_scsi_setup },
795 #endif
796 #ifdef CONFIG_STRAM_SWAP
797 { "stram_swap=", stram_swap_setup },
798 #endif
799 #if defined(CONFIG_A4000T_SCSI) || defined(CONFIG_WARPENGINE_SCSI) \
800 || defined(CONFIG_A4091_SCSI) || defined(CONFIG_MVME16x_SCSI) \
801 || defined(CONFIG_BVME6000_SCSI) \
802 || defined(CONFIG_BLZ603EPLUS_SCSI)
803 { "53c7xx=", ncr53c7xx_setup },
804 #endif
805 #if defined(CONFIG_A3000_SCSI) || defined(CONFIG_A2091_SCSI) \
806 || defined(CONFIG_GVP11_SCSI)
807 { "wd33c93=", wd33c93_setup },
808 #endif
809 #if defined(CONFIG_GVP11_SCSI)
810 { "gvp11=", gvp11_setup },
811 #endif
812 #ifdef CONFIG_MAC_SCSI
813 { "mac5380=", mac_scsi_setup },
814 #endif
815 #ifdef CONFIG_CYCLADES
816 { "cyclades=", cy_setup },
817 #endif
818 #ifdef CONFIG_DIGI
819 { "digi=", pcxx_setup },
820 #endif
821 #ifdef CONFIG_DIGIEPCA
822 { "digiepca=", epca_setup },
823 #endif
824 #ifdef CONFIG_RISCOM8
825 { "riscom8=", riscom8_setup },
826 #endif
827 #ifdef CONFIG_DMASCC
828 { "dmascc=", dmascc_setup },
829 #endif
830 #ifdef CONFIG_SPECIALIX
831 { "specialix=", specialix_setup },
832 #endif
833 #ifdef CONFIG_BAYCOM_PAR
834 { "baycom_par=", baycom_par_setup },
835 #endif
836 #ifdef CONFIG_BAYCOM_SER_FDX
837 { "baycom_ser_fdx=", baycom_ser_fdx_setup },
838 #endif
839 #ifdef CONFIG_BAYCOM_SER_HDX
840 { "baycom_ser_hdx=", baycom_ser_hdx_setup },
841 #endif
842 #ifdef CONFIG_SOUNDMODEM
843 { "soundmodem=", sm_setup },
844 #endif
845 #ifdef CONFIG_WDT
846 { "wdt=", wdt_setup },
847 #endif
848 #ifdef CONFIG_PARPORT
849 { "parport=", parport_setup },
850 #endif
851 #ifdef CONFIG_PLIP
852 { "plip=", plip_setup },
853 #endif
854 #ifdef CONFIG_HFMODEM
855 { "hfmodem=", hfmodem_setup },
856 #endif
857 #ifdef CONFIG_FTAPE
858 { "ftape=", ftape_setup},
859 #endif
860 #ifdef CONFIG_MD_BOOT
861 { "md=", md_setup},
862 #endif
863 #ifdef CONFIG_ADBMOUSE
864 { "adb_buttons=", adb_mouse_setup },
865 #endif
866 #ifdef CONFIG_LTPC
867 { "ltpc=", ltpc_setup },
868 #endif
869 { 0, 0 }
872 static struct kernel_param raw_params[] __initdata = {
873 { "root=", root_dev_setup },
874 #ifdef CONFIG_ROOT_NFS
875 { "nfsroot=", nfs_root_setup },
876 { "nfsaddrs=", ip_auto_config_setup },
877 #endif
878 #ifdef CONFIG_IP_PNP
879 { "ip=", ip_auto_config_setup },
880 #endif
881 #ifdef CONFIG_PCI
882 { "pci=", pci_setup },
883 #endif
884 #ifdef CONFIG_PARIDE_PD
885 { "pd.", pd_setup },
886 #endif
887 #ifdef CONFIG_PARIDE_PCD
888 { "pcd.", pcd_setup },
889 #endif
890 #ifdef CONFIG_PARIDE_PF
891 { "pf.", pf_setup },
892 #endif
893 #ifdef CONFIG_PARIDE_PT
894 { "pt.", pt_setup },
895 #endif
896 #ifdef CONFIG_PARIDE_PG
897 { "pg.", pg_setup },
898 #endif
899 #ifdef CONFIG_APM
900 { "apm=", apm_setup },
901 #endif
902 { 0, 0 }
905 #ifdef CONFIG_BLK_DEV_RAM
906 static void __init ramdisk_start_setup(char *str, int *ints)
908 if (ints[0] > 0 && ints[1] >= 0)
909 rd_image_start = ints[1];
912 static void __init load_ramdisk(char *str, int *ints)
914 if (ints[0] > 0 && ints[1] >= 0)
915 rd_doload = ints[1] & 3;
918 static void __init prompt_ramdisk(char *str, int *ints)
920 if (ints[0] > 0 && ints[1] >= 0)
921 rd_prompt = ints[1] & 1;
924 static void __init ramdisk_size(char *str, int *ints)
926 if (ints[0] > 0 && ints[1] >= 0)
927 rd_size = ints[1];
929 #endif
931 static int __init checksetup(char *line)
933 int i, ints[11];
935 #ifdef CONFIG_BLK_DEV_IDE
936 /* ide driver needs the basic string, rather than pre-processed values */
937 if (!strncmp(line,"ide",3) ||
938 #ifdef CONFIG_BLK_DEV_VIA82C586
939 !strncmp(line,"splitfifo",9) ||
940 #endif /* CONFIG_BLK_DEV_VIA82C586 */
941 (!strncmp(line,"hd",2) && line[2] != '=')) {
942 ide_setup(line);
943 return 1;
945 #endif
946 for (i=0; raw_params[i].str; i++) {
947 int n = strlen(raw_params[i].str);
948 if (!strncmp(line,raw_params[i].str,n)) {
949 raw_params[i].setup_func(line+n, NULL);
950 return 1;
953 for (i=0; cooked_params[i].str; i++) {
954 int n = strlen(cooked_params[i].str);
955 if (!strncmp(line,cooked_params[i].str,n)) {
956 cooked_params[i].setup_func(get_options(line+n, ints), ints);
957 return 1;
960 return 0;
963 /* this should be approx 2 Bo*oMips to start (note initial shift), and will
964 still work even if initially too large, it will just take slightly longer */
965 unsigned long loops_per_sec = (1<<12);
967 /* This is the number of bits of precision for the loops_per_second. Each
968 bit takes on average 1.5/HZ seconds. This (like the original) is a little
969 better than 1% */
970 #define LPS_PREC 8
972 void __init calibrate_delay(void)
974 unsigned long ticks, loopbit;
975 int lps_precision = LPS_PREC;
977 loops_per_sec = (1<<12);
979 printk("Calibrating delay loop... ");
980 while (loops_per_sec <<= 1) {
981 /* wait for "start of" clock tick */
982 ticks = jiffies;
983 while (ticks == jiffies)
984 /* nothing */;
985 /* Go .. */
986 ticks = jiffies;
987 __delay(loops_per_sec);
988 ticks = jiffies - ticks;
989 if (ticks)
990 break;
993 /* Do a binary approximation to get loops_per_second set to equal one clock
994 (up to lps_precision bits) */
995 loops_per_sec >>= 1;
996 loopbit = loops_per_sec;
997 while ( lps_precision-- && (loopbit >>= 1) ) {
998 loops_per_sec |= loopbit;
999 ticks = jiffies;
1000 while (ticks == jiffies);
1001 ticks = jiffies;
1002 __delay(loops_per_sec);
1003 if (jiffies != ticks) /* longer than 1 tick */
1004 loops_per_sec &= ~loopbit;
1007 /* finally, adjust loops per second in terms of seconds instead of clocks */
1008 loops_per_sec *= HZ;
1009 /* Round the value and print it */
1010 printk("%lu.%02lu BogoMIPS\n",
1011 (loops_per_sec+2500)/500000,
1012 ((loops_per_sec+2500)/5000) % 100);
1016 * This is a simple kernel command line parsing function: it parses
1017 * the command line, and fills in the arguments/environment to init
1018 * as appropriate. Any cmd-line option is taken to be an environment
1019 * variable if it contains the character '='.
1021 * This routine also checks for options meant for the kernel.
1022 * These options are not given to init - they are for internal kernel use only.
1024 static void __init parse_options(char *line)
1026 char *next;
1027 int args, envs;
1029 if (!*line)
1030 return;
1031 args = 0;
1032 envs = 1; /* TERM is set to 'linux' by default */
1033 next = line;
1034 while ((line = next) != NULL) {
1035 if ((next = strchr(line,' ')) != NULL)
1036 *next++ = 0;
1038 * check for kernel options first..
1040 if (!strcmp(line,"ro")) {
1041 root_mountflags |= MS_RDONLY;
1042 continue;
1044 if (!strcmp(line,"rw")) {
1045 root_mountflags &= ~MS_RDONLY;
1046 continue;
1048 if (!strcmp(line,"debug")) {
1049 console_loglevel = 10;
1050 continue;
1052 if (!strncmp(line,"init=",5)) {
1053 line += 5;
1054 execute_command = line;
1055 /* In case LILO is going to boot us with default command line,
1056 * it prepends "auto" before the whole cmdline which makes
1057 * the shell think it should execute a script with such name.
1058 * So we ignore all arguments entered _before_ init=... [MJ]
1060 args = 0;
1061 continue;
1063 if (checksetup(line))
1064 continue;
1067 * Then check if it's an environment variable or
1068 * an option.
1070 if (strchr(line,'=')) {
1071 if (envs >= MAX_INIT_ENVS)
1072 break;
1073 envp_init[++envs] = line;
1074 } else {
1075 if (args >= MAX_INIT_ARGS)
1076 break;
1077 argv_init[++args] = line;
1080 argv_init[args+1] = NULL;
1081 envp_init[envs+1] = NULL;
1085 extern void setup_arch(char **, unsigned long *, unsigned long *);
1087 #ifndef __SMP__
1090 * Uniprocessor idle thread
1093 int cpu_idle(void *unused)
1095 for(;;)
1096 idle();
1099 #define smp_init() do { } while (0)
1101 #else
1104 * Multiprocessor idle thread is in arch/...
1107 extern int cpu_idle(void * unused);
1109 /* Called by boot processor to activate the rest. */
1110 static void __init smp_init(void)
1112 /* Get other processors into their bootup holding patterns. */
1113 smp_boot_cpus();
1114 smp_threads_ready=1;
1115 smp_commence();
1118 #endif
1120 extern void initialize_secondary(void);
1123 * Activate the first processor.
1126 asmlinkage void __init start_kernel(void)
1128 char * command_line;
1130 #ifdef __SMP__
1131 static int boot_cpu = 1;
1132 /* "current" has been set up, we need to load it now */
1133 if (!boot_cpu)
1134 initialize_secondary();
1135 boot_cpu = 0;
1136 #endif
1139 * Interrupts are still disabled. Do necessary setups, then
1140 * enable them
1142 printk(linux_banner);
1143 setup_arch(&command_line, &memory_start, &memory_end);
1144 memory_start = paging_init(memory_start,memory_end);
1145 trap_init();
1146 init_IRQ();
1147 sched_init();
1148 time_init();
1149 parse_options(command_line);
1152 * HACK ALERT! This is early. We're enabling the console before
1153 * we've done PCI setups etc, and console_init() must be aware of
1154 * this. But we do want output early, in case something goes wrong.
1156 memory_start = console_init(memory_start,memory_end);
1157 #ifdef CONFIG_MODULES
1158 init_modules();
1159 #endif
1160 if (prof_shift) {
1161 prof_buffer = (unsigned int *) memory_start;
1162 /* only text is profiled */
1163 prof_len = (unsigned long) &_etext - (unsigned long) &_stext;
1164 prof_len >>= prof_shift;
1165 memory_start += prof_len * sizeof(unsigned int);
1166 memset(prof_buffer, 0, prof_len * sizeof(unsigned int));
1169 memory_start = kmem_cache_init(memory_start, memory_end);
1170 sti();
1171 calibrate_delay();
1172 #ifdef CONFIG_BLK_DEV_INITRD
1173 if (initrd_start && !initrd_below_start_ok && initrd_start < memory_start) {
1174 printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
1175 "disabling it.\n",initrd_start,memory_start);
1176 initrd_start = 0;
1178 #endif
1179 mem_init(memory_start,memory_end);
1180 kmem_cache_sizes_init();
1181 #ifdef CONFIG_PROC_FS
1182 proc_root_init();
1183 #endif
1184 uidcache_init();
1185 filescache_init();
1186 dcache_init();
1187 vma_init();
1188 buffer_init(memory_end-memory_start);
1189 signals_init();
1190 inode_init();
1191 file_table_init();
1192 #if defined(CONFIG_SYSVIPC)
1193 ipc_init();
1194 #endif
1195 #if defined(CONFIG_QUOTA)
1196 dquot_init_hash();
1197 #endif
1198 check_bugs();
1199 printk("POSIX conformance testing by UNIFIX\n");
1202 * We count on the initial thread going ok
1203 * Like idlers init is an unlocked kernel thread, which will
1204 * make syscalls (and thus be locked).
1206 smp_init();
1207 kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1208 current->need_resched = 1;
1209 cpu_idle(NULL);
1212 #ifdef CONFIG_BLK_DEV_INITRD
1213 static int do_linuxrc(void * shell)
1215 static char *argv[] = { "linuxrc", NULL, };
1217 close(0);close(1);close(2);
1218 setsid();
1219 (void) open("/dev/console",O_RDWR,0);
1220 (void) dup(0);
1221 (void) dup(0);
1222 return execve(shell, argv, envp_init);
1225 static void __init no_initrd(char *s,int *ints)
1227 mount_initrd = 0;
1229 #endif
1231 struct task_struct *child_reaper = &init_task;
1234 * Ok, the machine is now initialized. None of the devices
1235 * have been touched yet, but the CPU subsystem is up and
1236 * running, and memory and process management works.
1238 * Now we can finally start doing some real work..
1240 static void __init do_basic_setup(void)
1242 #ifdef CONFIG_BLK_DEV_INITRD
1243 int real_root_mountflags;
1244 #endif
1247 * Tell the world that we're going to be the grim
1248 * reaper of innocent orphaned children.
1250 * We don't want people to have to make incorrect
1251 * assumptions about where in the task array this
1252 * can be found.
1254 child_reaper = current;
1256 #if defined(CONFIG_MTRR) /* Do this after SMP initialization */
1258 * We should probably create some architecture-dependent "fixup after
1259 * everything is up" style function where this would belong better
1260 * than in init/main.c..
1262 mtrr_init();
1263 #endif
1265 #ifdef CONFIG_SYSCTL
1266 sysctl_init();
1267 #endif
1270 * Ok, at this point all CPU's should be initialized, so
1271 * we can start looking into devices..
1273 #ifdef CONFIG_PCI
1274 pci_init();
1275 #endif
1276 #ifdef CONFIG_SBUS
1277 sbus_init();
1278 #endif
1279 #if defined(CONFIG_PPC)
1280 ppc_init();
1281 #endif
1282 #ifdef CONFIG_MCA
1283 mca_init();
1284 #endif
1285 #ifdef CONFIG_ARCH_ACORN
1286 ecard_init();
1287 #endif
1288 #ifdef CONFIG_ZORRO
1289 zorro_init();
1290 #endif
1291 #ifdef CONFIG_DIO
1292 dio_init();
1293 #endif
1294 #ifdef CONFIG_MAC
1295 nubus_init();
1296 #endif
1298 /* Networking initialization needs a process context */
1299 sock_init();
1301 /* Launch bdflush from here, instead of the old syscall way. */
1302 kernel_thread(bdflush, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1303 /* Start the background pageout daemon. */
1304 kswapd_setup();
1305 kernel_thread(kpiod, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1306 kernel_thread(kswapd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1308 #if CONFIG_AP1000
1309 /* Start the async paging daemon. */
1311 extern int asyncd(void *);
1312 kernel_thread(asyncd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
1314 #endif
1316 #ifdef CONFIG_BLK_DEV_INITRD
1318 real_root_dev = ROOT_DEV;
1319 real_root_mountflags = root_mountflags;
1320 if (initrd_start && mount_initrd) root_mountflags &= ~MS_RDONLY;
1321 else mount_initrd =0;
1322 #endif
1324 /* Set up devices .. */
1325 device_setup();
1327 /* .. executable formats .. */
1328 binfmt_setup();
1330 /* .. filesystems .. */
1331 filesystem_setup();
1333 /* Mount the root filesystem.. */
1334 mount_root();
1336 #ifdef CONFIG_BLK_DEV_INITRD
1337 root_mountflags = real_root_mountflags;
1338 if (mount_initrd && ROOT_DEV != real_root_dev
1339 && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
1340 int error;
1341 int i, pid;
1343 pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
1344 if (pid>0)
1345 while (pid != wait(&i));
1346 if (MAJOR(real_root_dev) != RAMDISK_MAJOR
1347 || MINOR(real_root_dev) != 0) {
1348 error = change_root(real_root_dev,"/initrd");
1349 if (error)
1350 printk(KERN_ERR "Change root to /initrd: "
1351 "error %d\n",error);
1354 #endif
1357 static int init(void * unused)
1359 lock_kernel();
1360 do_basic_setup();
1363 * Ok, we have completed the initial bootup, and
1364 * we're essentially up and running. Get rid of the
1365 * initmem segments and start the user-mode stuff..
1367 free_initmem();
1368 unlock_kernel();
1370 if (open("/dev/console", O_RDWR, 0) < 0)
1371 printk("Warning: unable to open an initial console.\n");
1373 (void) dup(0);
1374 (void) dup(0);
1377 * We try each of these until one succeeds.
1379 * The Bourne shell can be used instead of init if we are
1380 * trying to recover a really broken machine.
1383 if (execute_command)
1384 execve(execute_command,argv_init,envp_init);
1385 execve("/sbin/init",argv_init,envp_init);
1386 execve("/etc/init",argv_init,envp_init);
1387 execve("/bin/init",argv_init,envp_init);
1388 execve("/bin/sh",argv_init,envp_init);
1389 panic("No init found. Try passing init= option to kernel.");