你不可不知的嵌入式内核_第1页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、你不可不知的嵌入式内核常用文件系统:cramfs,fat,nfs,ntfs,proc,sysfs内存,yaffs,jffs2,ext2,ext3,ext4.2.linux裁剪办法1)修改交错编译器:打开顶层makefie,搜寻arch,cross_compile,修改如下:183 arch = arm184 cross_compile = arm-linux-185 cross_compile = arm-none-linux-gnueabi-2)配置,裁剪功能。a.参考相近的配置文件,在此基础上举行修改。rootdhua linux-2.6.32.2 make help 把全部配置都列出来只

2、列出包含2440的配置文件rootdhua linux-2.6.32.2 make help | grep 2440mini2440_defconfig - build for mini2440b.备份配置好的文件,把.config文件保存为config_back这步的前提是你配置好过内核rootdhua linux-2.6.32.2 cp .config config_backc.4种配置办法:(1)make config:咨询式的(2)make xconfig:窗口模式,比较适合用法鼠标的人用法(3)make menuconfig:终端中显示菜单,比较适合认识键盘的人用法(4)挺直用法vi

3、编辑器/文本编辑器修改.config文件=参考mini2440_defconfig,把mini2440_defconfig的配置文件笼罩.config,rootdhua linux-2.6.32.2 make mini2440_defconfighostld scripts/kconfig/confconfiguration written to .configrootdhua linux-2.6.32.2 make menuconfig改版本号:在general setup 后面的local.里加system type- system type选对-s3c2440 machines-smdk

4、2440kernel features-memory split选3g/1g选上eabiboot options-kernel execute-in-place for rom在u-boot那里的那一场串环境变量userspace binary for-kernel support for elf binaries重点配置对象:device drivers-网卡支持:network device support-10 or 100-dm9000-character-ledl beep-graphices support-:帧缓冲设备-s3c2410 lcdlcd select-企鹅bootup

5、 logoconsole display d support-framebuffer console supportu盘usb support-usb mass storge support文件系统file system-network file system-语言native language support-简体中文 nls utf-8选上=make -j2然后在u-boot-1.3.4/tools/将mkimage拷到系统的bin名目下或者交错编译器的名目下去,然后:make uimage,编译出uiamge内核镜像3.linux内核映像制作4.添加菜单每一个名目都有一个kconfig和

6、makefile,kconfig管理本层菜单,makefile管理相应的c文件。有子菜单的选项用法menu作为关键字,如下:上层菜单包含下层菜单的kconfigmenu "device drivers"source "drivers/base/kconfig"source "drivers/connector/kconfig"一下是内部子菜单的书写格式:menu "generic driver options" 菜单名子菜单关键字是string ,表示菜单式输文字的config uevent_helper_path

7、 菜单对于宏string "path to uevent helper" 子菜单名depends on hotplug 依靠条件default "/sbin/hotplug" 默认值help 帮组信息path to uevent helper program forked by the kernel forevery uevent.子菜单关键字是bool ,表示这个选项惟独选中和不选中两中状态。config devtmpfsbool "create a kernel maintained /dev tmpfs (experimental)&qu

8、ot;depends on hotplug && shmem && tmpfshelpthis creates a tmpfs filesystem, and mounts it at bootupand mounts it at /dev. the kernel driver core creates devicenodes for all registered devices in that filesystem. all devicenodes are owned by root and have the default mode of 0600.user

9、space can add and delete the nodes as needed. this isintended to simplify bootup, and make it possible to delaythe initial coldplug at bootup done by udev in userspace.it should also provide a simpler way for rescue systemsto bring up a kernel with dynamic major/minor numbers.meaningful symlinks, pe

10、rmissions and device ownership muststill be handled by userspace.if unsure, say n here.关键字是tristate,有3种挑选,分离是编译进内核,编译出模块m,不选中。config s_s3c2440tristate "led support for s3c2440 gpio leds"depends on arch_default y if arch_s3c2410helpthis option enables support for leds connected to gpio line

11、son s3c2440 boards.-kconfig和.config的关系:每选中一项会在.config文件中把生成一个宏名:config_加上kconfig对应菜单宏名比如kconfig有如下选项:config leds_s3c2440tristate "led support for s3c2440 gpio leds"depends on arch_s3c2410 config_arch_s3c2410也是kconfig中的一个菜单宏名,假如arch_s3c2410选中,这项菜单才会显示出来,default y if arch_s3c2410 显示出来的默认状态:y

12、 显示 * ;m 显示 m ,n 显示不选中helpthis option enables support for leds connected to gpio lineson s3c2440 boards.选中时(*)后,对应.config的名字为:config_leds_s3c2440=y选中时(m)后,对应.config的名字为:config_leds_s3c2440=m不选中时,对应.config的名字为:config_leds_s3c2440 is not set深圳专业技术实训,qq754634522-.config和makefie的关系:在driver/char/makefie有以下语句:obj-$(conf

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论