交叉编译器版本为4.4.3
1. 下载源码包2.6.34.12
http://www.kernel.org/
2. 解压
tar -xvf linux-2.6.34.12.tar.bz2
1)修改Makefile
ARCH ?=arm
CROSS_COMPILE ?=arm-linux-
2) 设置环境变量
export PATH=/usr/local/arm/4.4.3/bin/:$PATH
3.下载 yaffs2.tar.gz
tar -xvf yaffs2.tar.gz
1) 进入yaffs2文件夹,给内核打上补丁使内核支持yaffs2
2)#./patch-ker.sh c /home/linux-2.6.34.12
4. 执行make menuconfig,并对选项进行配置
1)SystemType --->
S3C2440 and S3C2442 machines --->
仅保留SMDK2440 与SMDK2440 whith S3C2440CPU module两个选项,将其他的选项全部勾掉
2)Kernel Features --->
[*]Usethe arm EABI to compile the kernel(选中该选项,因为我们采用的编译器是带EABI(软浮点运算)的编译器)
3)Filesystems --->
a、把与ext2 ext3 ext4相关的所有选项全部去掉(为了减小编译完内核的体积、可选)
b、Miscellaneous filesystems --->
<*>yaffs2file system support(选中此选项)
4)Device Drivers----->
Character devices--->
[*]/dev/kmem virtual device support
[*]Legacy(BSD) PTY support
Block devices--->
<>Loopback device support
<>RAW block device support
5. make zImage
Linux内核编译error: `PCIMEM_BASE ' undeclared
drivers/video/console/vgacon.c:292: error: `PCIMEM_BASE ' undeclared (first use in this function)
解决方法:
device drivers->
Graphics support->
Console display driver support->
[ ]VGA text console
1. 下载源码包2.6.34.12
http://www.kernel.org/
2. 解压
tar -xvf linux-2.6.34.12.tar.bz2
1)修改Makefile
ARCH ?=arm
CROSS_COMPILE ?=arm-linux-
2) 设置环境变量
export PATH=/usr/local/arm/4.4.3/bin/:$PATH
3.下载 yaffs2.tar.gz
tar -xvf yaffs2.tar.gz
1) 进入yaffs2文件夹,给内核打上补丁使内核支持yaffs2
2)#./patch-ker.sh c /home/linux-2.6.34.12
4. 执行make menuconfig,并对选项进行配置
1)SystemType --->
S3C2440 and S3C2442 machines --->
仅保留SMDK2440 与SMDK2440 whith S3C2440CPU module两个选项,将其他的选项全部勾掉
2)Kernel Features --->
[*]Usethe arm EABI to compile the kernel(选中该选项,因为我们采用的编译器是带EABI(软浮点运算)的编译器)
3)Filesystems --->
a、把与ext2 ext3 ext4相关的所有选项全部去掉(为了减小编译完内核的体积、可选)
b、Miscellaneous filesystems --->
<*>yaffs2file system support(选中此选项)
4)Device Drivers----->
Character devices--->
[*]/dev/kmem virtual device support
[*]Legacy(BSD) PTY support
Block devices--->
<>Loopback device support
<>RAW block device support
5. make zImage
Linux内核编译error: `PCIMEM_BASE ' undeclared
drivers/video/console/vgacon.c:292: error: `PCIMEM_BASE ' undeclared (first use in this function)
解决方法:
device drivers->
Graphics support->
Console display driver support->
[ ]VGA text console