drivers/mtd/nand/s3c2410.c: In function `s3c2410_nand_init_chip':
drivers/mtd/nand/s3c2410.c:544: error: stray '\194' in program
drivers/mtd/nand/s3c2410.c:544: error: stray '\173' in program
drivers/mtd/nand/s3c2410.c:544: error: `eccmode' undeclared (first use in this function)
drivers/mtd/nand/s3c2410.c:544: error: (Each undeclared identifier is reported only once
drivers/mtd/nand/s3c2410.c:544: error: for each function it appears in.)
make[3]: *** [drivers/mtd/nand/s3c2410.o] 错误 1
make[2]: *** [drivers/mtd/nand] 错误 2
make[1]: *** [drivers/mtd] 错误 2
make: *** [drivers] 错误 2
原因是我在进行这一步:
1.3.3 禁止 Flash ECC 校验
我们的内核都是通过 UBOOT 写到 Nand Flash 的, UBOOT 通过的软件 ECC 算法产生 ECC 校验码, 这与内核
校验的 ECC 码不一样, 内核中的 ECC 码是由 S3C2410 中 Nand Flash 控制器产生的. 所以, 我们在这里选择禁止
内核 ECC 校验.
修改 drivers/mtd/nand/s3c2410.c 文件:
[arm@localhost linux2.6.14]$ vi drivers/mtd/nand/s3c2410.c
找到 s3c2410_nand_init_chip()函数,在该函数体最后加上一条语句:
chip>eccmode = NAND_ECC_NONE;
保存,退出。
OK.我们的关于 flash 分区的设置全部完工.
的时候
复制chip>eccmode = NAND_ECC_NONE;
少了-这个符号
修改完后又遇到这个错误
drivers/mtd/nand/s3c2410.c: In function `s3c2410_nand_init_chip':
drivers/mtd/nand/s3c2410.c:544: error: stray '\194' in program
drivers/mtd/nand/s3c2410.c:544: error: stray '\173' in program
drivers/mtd/nand/s3c2410.c:544: error: structure has no member named `eccmode'
make[3]: *** [drivers/mtd/nand/s3c2410.o] 错误 1
make[2]: *** [drivers/mtd/nand] 错误 2
make[1]: *** [drivers/mtd] 错误 2
make: *** [drivers] 错误 2
我把那行命令手动敲进去后再运行make zImage
得到下述错误
drivers/mtd/nand/s3c2410.c: In function `s3c2410_nand_init_chip':
drivers/mtd/nand/s3c2410.c:544: error: structure has no member named `eccmode'
make[3]: *** [drivers/mtd/nand/s3c2410.o] 错误 1
make[2]: *** [drivers/mtd/nand] 错误 2
make[1]: *** [drivers/mtd] 错误 2
make: *** [drivers] 错误 2
查阅了我博文里面的一篇文章《》
按照下述方法操作,成功:
首先gedit s3c2410.c
然后ctrl+f查找 NAND EEC SOFT
找到后将SOFT改为NONE
成功
case TYPE_S3C2412:
case TYPE_S3C2440:
chip->ecc.hwctl = s3c2440_nand_enable_hwecc;
chip->ecc.calculate = s3c2440_nand_calculate_ecc;
break;
}
} else {
chip->ecc.mode = NAND_ECC_NONE;
}
}
阅读(773) | 评论(0) | 转发(0) |