您的位置:首页 > 其它

kernel2.6.33移植

2010-03-07 21:42 190 查看
一、修改编译内核
1、解压linux-2.6.33.tar.gz2源码包
2、修改内核mtd分区和bootloader(vivi)使其一致
编辑文件arch/arm/plat-s3c24xx/common-smdk.c
static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "vivi",
.size = 0x00020000,
.offset = 0,
},
[1] = {
.name = "param",
.offset = 0x00020000,
.size = 0x00010000,
},
[2] = {
.name = "kernel",
.offset = 0x00030000,
.size = 0x00200000,
},
[3] = {
.name = "root",
.offset = 0x00230000,
.size = 0x00300000,
},
[4] = {
.name = "yaffs",
.offset = 0x00530000,
.size = 0x03A00000,
}
};

3、修改文件drivers/mtd/nand/s3c2410.c
将s3c2410_nand_init_chip函数里的NAND_ECC_SOFT改为:(因为在内核中默认配置不支持ECC校验,当然也可以在内核配置时选中ECC选项)
4、解压yaffs.tar.gz2源码包,进入yaffs2文件夹,给内核打上补丁使内核支持yaffs2
#./patch-ker.sh c /root/linux-2.6.33
5、到llinux-2.6.30.5目录下执行命令
#cp arch/arm/configs/s3c2410_defconfig .config
6、执行make menuconfig,并对选项进行配置
7.修改makefile文件
将arch改为arm
配置交叉编译链

8.进入make menuconfig
选项
A. userspace binary formats/[ ]Kernel support for a.out and ECOFF binaries (BINFMT_AOUT) (去除该选项)
选项Boot options(根据自己的root目录在那个mtd分区来改)
改成: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200
B.device drivers/network device support/ethernet (10 or 100) /cs89x0 support
C.选中File system/Miscellaneous filesystem/YAFFS2 file ststem support以支持yaffs
D.不修改system type,bus,kernel,power选项
E.去除device->中csci,并口,usb,无线网络,hid,声卡,led,ata
F.去除networking 中蓝牙和无线的驱动
9、执行make zImage,在arch/arm/boot目录下将生成一个zImage的文件
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: