免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2146 | 回复: 3
打印 上一主题 下一主题

嵌入式Linux内核优化裁剪 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-05 13:52 |只看该作者 |倒序浏览
优化1、取消虚拟内存的支持
General setup  --->
     [ ] Support for paging of anonymous memory (swap)

优化2、使用默认的IO调度器,取消其他的调度器
-*- Enable the block layer  --->
      IO Schedulers  --->
  < > Anticipatory I/O scheduler
  <*> Deadline I/O scheduler
  < > CFQ I/O scheduler
  Default I/O scheduler (Deadline)  --->

优化3、取消对旧版本二进制执行文件的支持
Userspace binary formats  --->
< > Kernel support for a.out and ECOFF binaries

优化4、取消不必要的设备的支持
Device Drivers  --->
<*> Memory Technology Device (MTD) support  --->  
  
  •    MTD partitioning support
      < >     RedBoot partition table parsing
        RAM/ROM/Flash chip drivers  --->
       < > Detect flash chips by Common Flash Interface (CFI) probe
       < > Detect non-CFI AMD/JEDEC-compatible flash chips
       < > Support for RAM chips in bus mapping
       < > Support for ROM chips in bus mapping
       < > Support for absent chips in bus mapping
    < > Parallel port support  --->
    [ ] Block devices  --->
    < > ATA/ATAPI/MFM/RLL support  --->
       Input device support  --->
      
  •    Keyboards  --->
       < >   AT keyboard
      Character devices  --->
      [ ] Non-standard serial port support
        Serial drivers  --->
       < > 8250/16550 and compatible serial support
           *** Non-8250 serial port support ***
       <*> Samsung S3C2410/S3C2440/S3C2442/S3C2412 Serial port support
       
  •    Support for console on S3C2410 serial port
      [ ] Legacy (BSD) PTY support
       SPI support  --->
      [ ] SPI support
    < > Hardware Monitoring support  --->

    优化5、取消不需要的文件系统的支持
    File systems  --->
      < > Second extended fs support   
      < > Ext3 journalling file system support   
      < > Ext4dev/ext4 extended fs support development (EXPERIMENTAL)
       Miscellaneous filesystems  --->  
       < > Journalling Flash File System v2 (JFFS2) support

    完成以上的优化配置有,内核镜像会由之前的1.9MB缩减到1.7MB左右。
  • 论坛徽章:
    0
    2 [报告]
    发表于 2009-08-05 14:14 |只看该作者
    其实还可以取消不必要的网卡支持、硬盘支持、netfilter 支持、ipv6 支持、QoS 支持
    弄完了会更小的

    论坛徽章:
    0
    3 [报告]
    发表于 2009-08-05 22:46 |只看该作者
    已经够小的了。
    就是每次编译内核时间太长了。着急

    论坛徽章:
    0
    4 [报告]
    发表于 2009-08-06 09:02 |只看该作者
    原帖由 emmoblin 于 2009-8-5 22:46 发表
    已经够小的了。
    就是每次编译内核时间太长了。着急

    我使用的是 gentoo 自带的 genkernel 来编译,差量编译,速度很快
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP