首页 > 代码库 > linux-3.4.2移植到FL2440上(二)--修改MTD分区
linux-3.4.2移植到FL2440上(二)--修改MTD分区
修改MTD分区:
在/arch/arm/mach-s3c24xx/common-smdk.c
修改:
1 /* NAND parititon from 2.4.18-swl5 */ 2 3 static struct mtd_partition smdk_default_nand_part[] = { 4 [0] = { 5 .name = "Boot Agent", 6 .size = SZ_16K, 7 .offset = 0, 8 }, 9 [1] = {10 .name = "S3C2410 flash partition 1",11 .offset = 0,12 .size = SZ_2M,13 },14 [2] = {15 .name = "S3C2410 flash partition 2",16 .offset = SZ_4M,17 .size = SZ_4M,18 },19 [3] = {20 .name = "S3C2410 flash partition 3",21 .offset = SZ_8M,22 .size = SZ_2M,23 },24 [4] = {25 .name = "S3C2410 flash partition 4",26 .offset = SZ_1M * 10,27 .size = SZ_4M,28 },29 [5] = {30 .name = "S3C2410 flash partition 5",31 .offset = SZ_1M * 14,32 .size = SZ_1M * 10,33 },34 [6] = {35 .name = "S3C2410 flash partition 6",36 .offset = SZ_1M * 24,37 .size = SZ_1M * 24,38 },39 [7] = {40 .name = "S3C2410 flash partition 7",41 .offset = SZ_1M * 48,42 .size = MTDPART_SIZ_FULL,43 }44 };45 46 47
1 改为如下: 2 3 /* NAND parititon from 2.4.18-swl5 */ 4 /* by zhutao */ 5 static struct mtd_partition smdk_default_nand_part[] = { 6 [0] = { 7 .name = "U-BOOT", 8 .size = SZ_2M, 9 .offset = 0,10 },11 [1] = {12 .name = "KERNEL",13 .offset = MTDPART_OFS_APPEND,14 .size = SZ_4M,15 },16 [2] = {17 .name = "YAFFS2",18 .offset = MTDPART_OFS_APPEND,19 .size = MTDPART_SIZ_FULL,20 }21 };
编译启动内核:
打印信息分区信息:
Creating 3 MTD partitions on "NAND": 0x000000000000-0x000000200000 : "U-BOOT" 0x000000200000-0x000000600000 : "KERNEL" 0x000000600000-0x000010000000 : "YAFFS2"
linux-3.4.2移植到FL2440上(二)--修改MTD分区
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。