美文网首页
操作系统学习笔记(七)

操作系统学习笔记(七)

作者: itczt | 来源:发表于2019-04-13 14:57 被阅读0次

    操作系统的生成

    操作系统的生成

    满足特定硬件环境和用户需要,组装和构建操作系统的过程

    操作系统生成的主要步骤

    1.根据硬件环境/用户要求配置功能模块和构造参数
    2.构建(build)OS的映像

    操作系统生成的前提

    • 操作系统由可拆装置模块构成
    • 有交互式配置工具
    • 有映像构建(build)工具

    linux操作系统的生成

    1.获取Linux内核的源代码
    2.选择和启动内核配置程序
    3.根据需要配置内核模块和参数
    4.重新编译新的内核
    5.编译和安装模块
    6.启动新内核

    1.获取Linux内核的源代码

    http://www.kevnel.org/
    #cd /usr/src
    #tar zxuf linux -2.6.38 -12.tar.gz
    

    2.选择和启动内核配置程序

    #cd/usr/src/linux -2.6
    #make config(文本界面,不推荐使用)
    #make xconfig(图形窗口模式,xwindow使用)
    #make menuconfig(文本选择界面,字符终端)
    
    make menuconfig

    3.根据需要配置内核模块和参数

    1.Loadable module suppout 设置对可见在模块支持。
    * Fnable loaddable nodule support (y)
    * Set version info on all module Symboools (n)
    * Kernel module loader (y)
    2.Processor type and features 设置CPU类型
    * Processor  family 选择CPU类型
    * High Memory support(n)
    * Math emulation (n)
    * MTTR support;(n)
    * Symmetric multi - processing support (n)
    3.Grneral setup 对普通的一些属性进行设置
    * 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 块设备指持的选项
    * Normal PC floppy disk support 软盘支持(y)
    * Network block device support 网络设备支持的选项(y)
    7.Networking options 选取下TCP/IP net working 选项
    8.Net work block device support 网络设备支持的选项
    * Ethernet (10 or 100M bit)(y)
    * RealTeck RTL -8139 PCT Fast Ethernet Adupter supprt (y)
    9.Mice 鼠标设置选项:串口,PS/I等类型鼠标。
    10.File systems文件系统类型
    *  Dos FAT fs 选项 :FAT16,FAT32
    * NTFS file system support
    * /proc file system support: (y)
    11.Sound 声卡驱动,选项:声卡型号。
    12.USB support SUB 接口的支持,根据需要选择。
    

    4.重新编译新的内核

    #make clep 生成依赖dependency信息
    #make dean 清除旧的编译结果
    #make bzImage ./arch/i386/boot/bzImage
    

    5.编译和安装模块

    #make modules
    #make modules install
    模块被编译且安装到nsr/lib/<内核版本号>目录下。
    

    6.启动新内核

    • 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

    参考网址
    *https://blog.csdn.net/xiaocainiaoshangxiao/article/details/21931801
    ununtu 12.04的系统Linux2.6.30
    *http://www.linuxidapc.com/linux/2011-01/31456.html
    Fedra下内核编码
    *http://www.zcto.com/os/201204/12945.html
    fedora内核更新(安装及卸载)

    相关文章

      网友评论

          本文标题:操作系统学习笔记(七)

          本文链接:https://www.haomeiwen.com/subject/zhnlwqtx.html