linux 2.6.22.6 移植

Posted on 2011-12-01 10:38  lesson1  阅读(452)  评论(0)    收藏  举报

板子是国嵌的 GQ2440

主要移植步骤参考 韦东山老师的《嵌入式linux应用开发完全手册》

1、下载内核,打补丁

2、是用config_ok 配置内核

3、在 include/asm-arm/mach-types.h 中修改 MACH_TYPE_S3C2440 的值为 1999

  因为MACH_TYPE_S3C2440 对应的机器结构在 arch/arm/mach-s3c2440/mach-smdk2440.c 中定义

  所以 要把这个文件编译进内核,所以配置中有:System Type -> s3c2440 Machines -> SMDK2440

4、在arch/arm/mach-s3c2440/mach-smdk2440.c中修改时钟频率

 s3c24xx_init_clocks(12000000)

5、在 arch/arm/plat-s3c24xx/common-smdk.c中修改MTD分区

/* NAND parititon from 2.4.18-swl5 */

static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "kernel",
.size = SZ_2M,
.offset = 0,
},
[1] = {
.name = "jffs2",
.offset = MTDPART_OFS_APPEND,
.size = SZ_8M,
},
[2] = {
.name = "yaffs",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
}
};

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3