|
|
hacking 4.4BSD-Lite2之启动顺序 |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
不记得是去年还是前年了,就已经买了那本《The Design and Implementation of the 4.4BSD Operating System》,可是一直没有认真地看过。最近想边hacking source codes,边看看,研究一下。 看了几天4.4BSD-Lite2的代码,但是总搞不清楚具体的启动顺序,今天花了点时间终于是研究出来了。 (由于没有找到HP300方面的资料所以就先看看I386的先吧:) +------+ | BIOS | +------+ | v +-----------+ |wdbootblk.c| 其中,wdbootblk.c and bootxx.c应该是写在硬盘的启动表中的吧!? | or | |fdbootblk.c| wdbootblk.c通过call _main来调用bootxx.c中的main(dev, unix, off) +-----------+ | V +--------+ |bootxx.c| bootxx.c最后读取文件/boot来进行执行的 +--------+ | v +--------+ | srt0.c | 其中,srt0.c and boot.c就是bootxx.c读取的/boot +--------+ srt0通过call _main来调用boot.c中的main(howto, dev, off) | v +--------+ | boot.c | boot.c最后读取文件/vmunix(也就是真正的内核:)来进行执行的 +--------+ | v +--------+ |locore.s| locore.s内核的开始 +--------+ | v +-----------+ |init_main.c| |(process 0)|----------| +-----------+ | | | v v +------------+ +--------------+ |(process 1) | | (process 2) | | /sbin/init | |pageout daemon| +------------+ +--------------+

|
|
相关文章:相关软件: |
|