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 ToolchainFollow the instructions from this tutorial.
Obtaining the Correct Kernel SourcesIn 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 KernelThe 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) |