linux 1.2.13 网络解析--入口

190 篇文章 1 订阅
187 篇文章 1 订阅

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();
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值