操作系統(tǒng)的生成
操作系統(tǒng)的生成
滿足特定硬件環(huán)境和用戶需要,組裝和構(gòu)建操作系統(tǒng)的過(guò)程
操作系統(tǒng)生成的主要步驟
1.根據(jù)硬件環(huán)境/用戶要求配置功能模塊和構(gòu)造參數(shù)
2.構(gòu)建(build)OS的映像
操作系統(tǒng)生成的前提
- 操作系統(tǒng)由可拆裝置模塊構(gòu)成
- 有交互式配置工具
- 有映像構(gòu)建(build)工具
linux操作系統(tǒng)的生成
1.獲取Linux內(nèi)核的源代碼
2.選擇和啟動(dòng)內(nèi)核配置程序
3.根據(jù)需要配置內(nèi)核模塊和參數(shù)
4.重新編譯新的內(nèi)核
5.編譯和安裝模塊
6.啟動(dòng)新內(nèi)核
1.獲取Linux內(nèi)核的源代碼
http://www.kevnel.org/
#cd /usr/src
#tar zxuf linux -2.6.38 -12.tar.gz
2.選擇和啟動(dòng)內(nèi)核配置程序
#cd/usr/src/linux -2.6
#make config(文本界面火脉,不推薦使用)
#make xconfig(圖形窗口模式柒啤,xwindow使用)
#make menuconfig(文本選擇界面担巩,字符終端)
make menuconfig
3.根據(jù)需要配置內(nèi)核模塊和參數(shù)
1.Loadable module suppout 設(shè)置對(duì)可見(jiàn)在模塊支持。
* Fnable loaddable nodule support (y)
* Set version info on all module Symboools (n)
* Kernel module loader (y)
2.Processor type and features 設(shè)置CPU類型
* Processor family 選擇CPU類型
* High Memory support(n)
* Math emulation (n)
* MTTR support;(n)
* Symmetric multi - processing support (n)
3.Grneral setup 對(duì)普通的一些屬性進(jìn)行設(shè)置
* Networking support:(y)
* PCI support (y)
* PCI access mode PCI:卡存取模式肯骇;BIOS.Direct和Any
* Support for not —pluggable devicess(n)
4.PCMCIA/ CardBus support 并口支持(y)
5. Plug and play config uration:即插即用配置(y)\
6.Black devices 塊設(shè)備指持的選項(xiàng)
* Normal PC floppy disk support 軟盤支持(y)
* Network block device support 網(wǎng)絡(luò)設(shè)備支持的選項(xiàng)(y)
7.Networking options 選取下TCP/IP net working 選項(xiàng)
8.Net work block device support 網(wǎng)絡(luò)設(shè)備支持的選項(xiàng)
* Ethernet (10 or 100M bit)(y)
* RealTeck RTL -8139 PCT Fast Ethernet Adupter supprt (y)
9.Mice 鼠標(biāo)設(shè)置選項(xiàng):串口笛丙,PS/I等類型鼠標(biāo)假颇。
10.File systems文件系統(tǒng)類型
* Dos FAT fs 選項(xiàng) :FAT16,F(xiàn)AT32
* NTFS file system support
* /proc file system support: (y)
11.Sound 聲卡驅(qū)動(dòng)笨鸡,選項(xiàng):聲卡型號(hào)形耗。
12.USB support SUB 接口的支持,根據(jù)需要選擇激涤。
4.重新編譯新的內(nèi)核
#make clep 生成依賴dependency信息
#make dean 清除舊的編譯結(jié)果
#make bzImage ./arch/i386/boot/bzImage
5.編譯和安裝模塊
#make modules
#make modules install
模塊被編譯且安裝到nsr/lib/<內(nèi)核版本號(hào)>目錄下。
6.啟動(dòng)新內(nèi)核
- cp bzImage /boot/bzinage
- GRUB
**配置 /boot/grub/grub.conf
title new linux builcl by zhang san Feb.28.2018
root (hd 0,1)
Kernel/boot/bzImage ro root = /dev/hda2
參考網(wǎng)址
*https://blog.csdn.net/xiaocainiaoshangxiao/article/details/21931801
ununtu 12.04的系統(tǒng)Linux2.6.30
*http://www.linuxidapc.com/linux/2011-01/31456.html
Fedra下內(nèi)核編碼
*http://www.zcto.com/os/201204/12945.html
fedora內(nèi)核更新(安裝及卸載)