定製Linux系統
簡單回顧下系統啟動的相關內容
編譯過程:編譯核心、busybox
為系統上的新硬碟建立分區,這雷根據需要先建立一個大小為200M的主要磁碟分割作為建立系統的boot分區和一個512M的分區作為目標系統(即正在構建的新系統,後面將沿用此名稱)的根分區;200M的分區格式化後將其掛載至/mnt/boot目錄下;512M的分區格式化後將掛載至/mnt/sysroot目錄;兩個分區的檔案系統均為ext4。
此處還可以添加第三個分區用於swap,大小為256MB或其它你喜歡的空間額度。記得使用mkswap將其建立為swap分區。
一、編譯Linux核心
1.擷取核心源碼,解壓至/usr/src
# tar xflinux-3.13.6.tar.xz -C /usr/src/
2.建立軟連結
[root@station75 src]#ln -sv linux-3.13.6/ linux
3.組建組態檔案
[root@station75linux]# make allnoconfig
4.配置
[root@station75linux]# make menuconfig
主要的配置選項
64位系統支援 |
[*] 64-bit kernel |
設定版本資訊 |
General setup --->() Local version - append to kernel release |
選擇cpu類型 |
Processor type and features --->Processor family (Generic-x86-64) --->(X) Core 2/newer Xeon |
支援多核心 |
Processor type and features --->[*] Symmetric multi-processing support |
支援動態模組載入 |
[*] Enable loadable module support ---> |
PCI匯流排支援(cpu需要匯流排與其他模組溝通) |
Bus options (PCI etc.) --->[*] PCI support |
scsi硬碟驅動 (lspci查看硬碟類型) |
Device Drivers ---> SCSI device support ---> <*> SCSI device supportà<*> SCSI disk support 另:Device Drivers ---> [*] Fusion MPT device support ---> <*> Fusion MPT ScsiHost drivers for SPI <*> Fusion MPT misc device (ioctl) driver |
檔案系統 |
File systems ---> <*> The Extended 4 (ext4) filesystem |
支援ELF(可執行檔) |
Executable file formats / Emulations à [*] Kernel support for ELF binaries <*> Kernel support for scripts starting with #! |
I/O驅動 |
Device Drivers ---> Input device support ---> [*] Keyboards ---> [*] Mice ---> 支援USB驅動Device Drivers ---> [*] USB support ---> <*> Support for Host-side USB à <*> EHCI HCD (USB 2.0) support <*> UHCI HCD (most Intel and VIA) support <*> OHCI HCD (USB 1.1) support |
系統時鐘 |
Device Drivers ---> [*] Real Time Clock ---> |
devtmfs |
Device Drivers ---> Generic Driver Options --> [*] Maintain a devtmpfs filesystem to mount at /dev |
網卡 |
協議[*] Networking support ---> Networking options ---> [*] TCP/IP networking <*> Unix domain sockets 驅動Device Drivers ---> [*] Network device support ---> [*] Ethernet driver support (NEW) ---> <*> Intel(R) PRO/1000 Gigabit Ethernet support/ <*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support |