Chinaunix首页 | 论坛 | 博客
  • 博客访问: 175186
  • 博文数量: 44
  • 博客积分: 2762
  • 博客等级: 少校
  • 技术积分: 520
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-04 19:19
文章分类
文章存档

2011年(28)

2010年(16)

我的朋友

分类: LINUX

2011-12-08 09:08:55




In this tutorial, I'll quickly show you how easy it is to compile a kernel for the mini2440. If you haven't already installed git, you should do so now. In Ubuntu, you simply install the package git-core. 


Setting up Your Toolchain

Follow the instructions from this tutorial. 




Obtaining the Correct Kernel Sources


In order for you to get a kernel thats patched for all the hardware on your Mini2440, you need to get the kernel sources from the correct place. While it's possible to simply go and download a kernel directly from kernel.org and cross compile it, you won't get the patches included with that for all the hardware on the Mini2440. 


Create a directory for your source tree and change to it and use git to clone the repository.

Code:
$ mkdir mini2440-kernel
$ git clone git://repo.or.cz/linux-2.6/mini2440.git
$ cd mini2440


You should now be in the top directory with the kernel source. 

Compiling Your Kernel

The first step in compiling is to create the default configuration file. 

Code:
$ CROSS_COMPILE=/usr/local/arm-2008q3/bin/arm-none-linux-gnueabi- ARCH=arm make mini2440_defconfig

This creates the default configuration file for the mini2440. I'll show you later how to modify this.

Now you simply run make.

Code:
$ CROSS_COMPILE=/usr/local/arm-2008q3/bin/arm-none-linux-gnueabi- ARCH=arm make


When this is complete. Your kernel is compiled. 

Now we need to create a uImage.

Code:
$ CROSS_COMPILE=/usr/local/arm-2008q3/bin/arm-none-linux-gnueabi- ARCH=arm make uImage


Your uImage for booting your device is in arch/arm/boot and you can copy that to your SD card, or NFS directory or NAND.
阅读(1242) | 评论(0) | 转发(0) |
0

上一篇:VxWorks使用说明书

下一篇:Gedit快捷键

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