linux 内核版本 1.2.13
文件:init/main.c
asmlinkage void start_kernel(void)
{char * command_line;
/*
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
setup_arch(&command_line, &memory_start, &memory_end);
memory_start = paging_init(memory_start,memory_end);
trap_init();
init_IRQ();
sched_init();
parse_options(command_line);
init_modules();
#ifdef CONFIG_PROFILE
prof_buffer = (unsigned long *) memory_start;
/* only text is profiled */
prof_len = (unsigned long) &etext;
prof_len >>= CONFIG_PROFILE_SHIFT;
memory_start += prof_len * sizeof(unsigned long);
#endif
memory_start = console_init(memory_start,memory_end);
memory_start = bios32_init(memory_start,memory_end);
memory_start = kmalloc_init(memory_start,memory_end);
sti();
calibrate_delay();
memory_start = chr_dev_init(memory_start,memory_end);
memory_start = blk_dev_init(memory_start,memory_end);
sti();
#ifdef CONFIG_SCSI
memory_start = scsi_dev_init(memory_start,memory_end);
#endif
#ifdef CONFIG_INET
memory_start = net_dev_init(memory_start,memory_end);
#endif
memory_start = inode_init(memory_start,memory_end);
memory_start = file_table_init(memory_start,memory_end);
memory_start = name_cache_init(memory_start,memory_end);
mem_init(memory_start,memory_end);
buffer_init();
time_init();
sock_init();// here init all net protocols
#ifdef CONFIG_SYSVIPC
ipc_init();
#endif
sti();
check_bugs();
printk(linux_banner);
if (!fork()) /* we count on this going ok */
init();
/*
* task[0] is meant to be used as an "idle" task: it may not sleep, but
* it might do some general things like count free pages or it could be
* used to implement a reasonable LRU algorithm for the paging routines:
* anything that can be useful, but shouldn't take time from the real
* processes.
*
* Right now task[0] just does a infinite idle loop.
*/
for(;;)
idle();
}