linux内核ufs设备树,Linux内核初始化流程笔记
Linux內(nèi)核初始化流程筆記
分類: LINUX
作者:gfree.wind@http://www.doczj.com/doc/fc580419c1c708a1294a4409.html
博客:http://www.doczj.com/doc/fc580419c1c708a1294a4409.html http://www.doczj.com/doc/fc580419c1c708a1294a4409.html
本文的copyleft歸gfree.wind@http://www.doczj.com/doc/fc580419c1c708a1294a4409.html所有,使用GPL發(fā)布,可以自由拷貝,轉(zhuǎn)載。但轉(zhuǎn)載請(qǐng)保持文檔的完整性,注明原作者及原鏈接,嚴(yán)禁用于任何商業(yè)用途。
=============================================================================== =======================
如前文http://http://www.doczj.com/doc/fc580419c1c708a1294a4409.html/space.php?uid=23629988&do=blog&id=3129477的流程,bootloader將kerenel加載到內(nèi)存中。
全部引導(dǎo)過程是四步
1:boot PROM phase
2:boot Programs phase
3:kernel initialization phase
4:init phase
system初始化,檢測(cè)內(nèi)存和cpu,檢查設(shè)備和創(chuàng)建設(shè)備樹,設(shè)置console
kernel初始化過程
kernel self -initialization 內(nèi)核自檢
loading of kernel modules 載入內(nèi)核模塊
reading of the kernel configuration file in /etc/system 讀內(nèi)核配置文件
staring of the /sbin/init process 運(yùn)行/sbin/init進(jìn)程
bootblk是用于裝載第二個(gè)引導(dǎo)程序ufsboot的主引導(dǎo)程序
bootblk是被PROM的boot設(shè)備的引導(dǎo)扇區(qū)裝載的
ufsboot程序是用了裝載兩部分核心genunix和unix的
installboot是用來(lái)在磁盤分區(qū)上安裝bootblk的
genunix is the platform-independent generic kernel file ,while unix is the platform-specific kernel component.
整個(gè)的引導(dǎo)過程:
PROM from the boot sector of the boot device-->bookblk-->ufsboot-->genunix(是一個(gè)獨(dú)立平臺(tái)的普通內(nèi)核文件) and unix(是一個(gè)特殊平臺(tái)內(nèi)核文件)-->其它
這里加載的kernel鏡像,并不是真正的可執(zhí)行文件,而是一個(gè)壓縮的鏡像文件。主要有兩種類型zImage和bzImage(即為Big zImage)。其中zImage小于512KB,而bzImage可以為一個(gè)大的壓縮鏡像文件。zImage可以用于在沒有bootloader的情況下,直接啟動(dòng)kernel。而目前一般都是使用bzImage。以我目前的Fedora13為例,執(zhí)行file /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE
1./boot/vmlinuz-
2.6.3
3.3-85.fc13.i686.PAE: Linux kernel x86 boot executable bzImage,
version 2.6.33.3-85.fc13.i686.PAE (mock, RO-rootFS, root_dev 0x902, swap_dev 0x3,
Normal VGA
總結(jié)
以上是生活随笔為你收集整理的linux内核ufs设备树,Linux内核初始化流程笔记的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 深度概览卷积神经网络全景图,没有比这更全
- 下一篇: 关于Python的一切:2018年,你读