安装包准备

1.linux-2.6.30.tar.bz2        原始包

2.2.6.30-at91.patch.gz      at91些列的包

3.2.6.30-at91-exp.4.tar.gz   9g45等的芯片包

 

安装

1.官方方法

wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.xx.tar.bz2
tar xvjf linux-2.6.xx.tar.bz2
cd linux-2.6.xx

 

wget http://maxim.org.za/AT91RM9200/2.6/2.6.xx-at91.patch.gz
zcat 2.6.xx-at91.patch.gz | patch -p1

 

BEFORE LINUX 2.6.30 EXPERIMENTAL PATCHES 

Download experimental patch:

wget ftp://www.linux4sam.org/pub/linux/2.6.xx-at91-exp.patch.gz

or

wget ftp://www.linux4sam.org/pub/linux/2.6.xx.at91.y/2.6.xx.at91.y-exp.patch.gz

And then:

zcat linux-2.6.xx-at91-exp.diff.gz | patch -p1

 

LINUX 2.6.30 EXPERIMENTAL PATCHES AND ONWARDS

Download experimental patch archive:

wget ftp://www.linux4sam.org/pub/linux/2.6.xx.at91/2.6.xx-at91-exp.y.tar.gz

Decompress archive with:

tar xvzf 2.6.xx-at91-exp.y.tar.gz

And then apply patchset one patch after the other in proper order:

for p in 2.6.xx-at91-exp.y/*; do patch -p1 < $p ; done

 

2.自己下载方法

1
2
3
4
5
6
7
8
9
10
tar jxvf linux-2.6.30.tar.bz2
cd linux-2.6.30
cp ../2.6.30-at91.patch.gz .
 
cp ../2.6.30-at91-exp.4.tar.gz  .
zcat 2.6.30-at91.patch.gz | patch –p1
 
tar xvzf 2.6.30-at91-exp.4.tar.gz
 
for p in 2.6.30-at91-exp.4/*; do patch -p1 < $p ; done

 

编译

1.官方方法

wget http://www.at91.com/linux4sam/pub/Linux4SAM/LinuxKernel/at91sam926yek_defconfig
cd linux-2.6.xx
cp at91sam926yek_defconfig .config
make ARCH=arm oldconfig 

 

make ARCH=arm menuconfig 
make ARCH=arm  CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix->

 

2.实际应用

1
make at91sam945ekes_defconfig .config
1
vi Makefile

然后

ARCH ?= arm

CROSS_COMPILE ?= arm-linux-

1
2
3
make oldconfig
 
make menuconfig
1
make uImage

Logo

更多推荐