Chinaunix首页 | 论坛 | 博客
  • 博客访问: 474979
  • 博文数量: 112
  • 博客积分: 2436
  • 博客等级: 大尉
  • 技术积分: 2769
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-04 19:48
文章分类

全部博文(112)

文章存档

2013年(7)

2012年(105)

分类: 嵌入式

2012-05-15 17:22:54


1) 解压 mc2440 下的 linux-2.6.15.4.tar.bz2 到 /home/akaedu/下,得到文件夹linux-2.6.27
$ tar zxvf linux-2.6.15.4.tar.bz2

2) 进入内核目录
$ cd linux-2.6.27

3) 修改Makefile,找到 (此处不用修改Makefile,)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= 
    改为:
ARCH ?= arm (后面不能有空格)
CROSS_COMPILE ?= arm-linux-

4) 对内核打patch (打patch不要重复打)
$ patch -p1 <../patch-2.6.27-aka (忽略最外层名字的改变,进到二级目录打patch)

5) 以内核源代码自带的smdk2440基本配置文件为基础,使用menuconfig定制内核 (确认你的主机上安装了libncurses-dev软件包)
$ cp arch/arm/configs/akae2440_defconfig .config
$ make menuconfig
    查看配置菜单中的如下选项(有些已经默认选中):
#1 选中 Floating point emulation——>NWFPE math emulation
(由于ARM920T没有浮点协处理器,浮点指令需要其他指令仿真实现)
#2 选中 File systems——>Pseudo filesystems——> /proc file system support
  Sysctl support(/proc/sys)
  sysfs file system support
  Virtual memory file system support(former shm fs)
  Tmpfs POSIX Access control Lists
#3 不需要改变Boot options——>Default kernel command string
(因为bootloader中的内核启动参数会取代这里的设置)
#4 选中 Device Drivers——>Network device support——>Ethernet(10 or 100Mbit)——>CS8900A support
  选中 File systems——>Network File Systems——>NFS client support
   NFS client support for NFS version3
   NFS client support for the NFSv3 ACL protocol extension
   Root file system on NFS
#5 选中 Device Drivers——>Memory Technology Devices(MTD)——>MTD partitioning support
 NAND Device Support for S3C2410/S3C2440 SoC
 S3C2410 NAND driver debug
#6 选中 File systems——>Miscellaneous filesystems——>YAFFS2 file system support
 Auto select yaffs2 format
 cache short names in RAM
 Compressed ROM file system support (cramfs)
#7 选中 Device Drivers——>Graphics support——>Support for frame buffer devices——>Enable firmware EDID
  Enable video Mode Handling Helpers
  S3C2410 LCD framebuffer support
#8 选中 Device Drivers——>USB support——>Support for Host-side USB——>OHCI HCD support
  选中 Device Drivers——>Input device support——>Mouse interface,
设置屏幕分辨率Horizontal screen resolution和Vertical screen resolution为 1024 和 768
#9 选中 Device Drivers——>Real time clock——> Set system time from RTC on startup and resume
      /sys/class/rtc/rtcN (sysfs)
      /proc/drive/rtc (procfs for rtc0)
      /dev/rtcN (character devices)
      Test driver/device
#10 如果不希望在/dev目录下生成大量伪终端设备文件,可以取消选择 Device Drivers——>Character devices——>Legacy (BSD) PTY support

    配置完成后用make命令编译内核,这个过程需要较长时间,编译好的内核位于~/linux-2.6.27/arch/arm/boot/zImage。
    现在将自己编译好的内核下载到开发板,看系统能不能正常启动(用nfs)
阅读(3025) | 评论(0) | 转发(2) |
0

上一篇:制作根文件系统

下一篇:内存分配

给主人留下些什么吧!~~