After learning some basic knowledge of 9260, we will make some preparations for porting the kernel to the terminal.
Working environment: XP + Virtual Machine ubuntu9.10;
Kernel version: linux-2.6.27 + latest patch (http://www.at91.com/linux4sam/bin/view/Linux4SAM/LinuxKernel );
Compiler: arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu
Target machine: terminal product
1. Install the cross compiler:
Download Cross Compiler: arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Create directory: sudo mkdir-P/usr/local/ARM/toolchain
Decompress the toolchain package: sudo tar xjvf arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2-C/usr/local/ARM/toolchain/
Add the compiler environment variable: sudo VI/etc/profile, add: Export Path =: $ path:/usr/local/ARM/toolchain/arm-2007q1/bin at the bottom
Make environment variables take effect: Source/etc/profile
Check whether the cross-compiler has been installed successfully: Arm-None-Linux-gnueabi-gcc-v.
2. First download the kernel source code: wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2
Unzip the tar xvjf linux-2.6.27.tar.bz2 after the download
Go to the kernel source code Directory: CD linux-2.6.27/
3. Install patches. Pay attention to the following two patches:
Patch the maintainer:
Wget http://maxim.org.za/AT91RM9200/2.6/2.6.27-at91.patch.gz
Patch: zcat 2.6.27-at91.patch.gz | patch-P1. When executing the command, my ubuntu9.10 will prompt "Patch: Command not found". Then, Run "sudo aptitude Install patch" to install the patch.
Patch the community (pay attention to the patch version ):
Wget ftp://www.linux4sam.org/pub/linux/2.6.27-at91-exp.patch.gz
Patching: zcat linux-2.6.xx-at91-exp.diff.gz | patch-p1