微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > real6410移植记录一

real6410移植记录一

时间:11-10 来源:互联网 点击:

had problems with

+ incorrect ECC generation, and if using these, the default of

+ software ECC is preferable.

修改文件drivers/mtd/nand/Makefile

obj-$(CONFIG_MTD_NAND_S3C2410) += s3c2410.o

+obj-$(CONFIG_MTD_NAND_S3C) += s3c_nand.o

需要选择如下驱动配置:

Device Drivers --->

<*> Memory Technology Device (MTD) support --->

<*> NAND Device Support --->

<> NAND Flash support for Samsung S3C SoCs //不选

<*> NAND Flash support for S3C SoC

[*] S3C NAND Hardware ECC

[ ] S3C NAND driver debug

编译内核,出现如下错误:

drivers/built-in.o: In function `s3c_nand_probe:

/home/weimen/Work/realarm/lsp/kernel/real6410_linux-2.6.37/drivers/mtd/nand/s3c_nand.c:1192: undefined reference to `add_mtd_partitions

修改内核配置,make menuconfig,添加分区支持配置。

Device Drivers --->

<*> Memory Technology Device (MTD) support --->

[*] MTD partitioning support

系统启动,出现如下信息时,说明nand driver移植正常。

S3C NAND Driver, (c) 2008 Samsung Electronics

S3C NAND Driver is using hardware ECC.

NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung )

Creating 4 MTD partitions on "NAND 1GiB 3,3V 8-bit":

0x000000000000-0x000000040000 : "uboot"

0x000000040000-0x000000400000 : "Kernel"

0x000000400000-0x000000800000 : "cramfs"

0x000000800000-0x000040000000 : "ubifs"

根文件系统启动到最后,出现如下错误。

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)

Please append a correct "root=" boot option; here are the available partitions:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

[] (unwind_backtrace+0x0/0xec) from [] (panic+0x54/0x174)

[] (panic+0x54/0x174) from [] (mount_block_root+0x1d0/0x210)

[] (mount_block_root+0x1d0/0x210) from [] (mount_root+0xa0/0xc0)

[] (mount_root+0xa0/0xc0) from [] (prepare_namespace+0x164/0x1bc)

[] (prepare_namespace+0x164/0x1bc) from [] (kernel_init+0x10c/0x14c)

[] (kernel_init+0x10c/0x14c) from [] (kernel_thread_exit+0x0/0x8)

上面的问题在于没有配置好mtd的驱动,对驱动进行如下配置,下面分别表示可以将MTD设备当作字符设备和块设备进行操作。选择之后通过NFS挂载,在/dev/目录下出现mtdblock1、mtdblock2、mtdblock3、mtdblock4设备节点。

<*> Memory Technology Device (MTD) support --->

<*> Direct char device access to MTD devices

<*> Caching block device access to MTD devices

上面的配置完成后,出现如下错误:

end_request: I/O error, dev mtdblock2, sector 0

Buffer I/O error on device mtdblock2, logical block 0

s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004100, 3=80808080

end_request: I/O error, dev mtdblock2, sector 0

Buffer I/O error on device mtdblock2, logical block 0

end_request: I/O error, dev mtdblock2, sector 8

Buffer I/O error on device mtdblock2, logical block 1

mmc0: mmc_rescan: trying to init card at 200000 Hz

end_request: I/O error, dev mtdblock2, sector 8

Buffer I/O error on device mtdblock2, logical block 1

end_request: I/O error, dev mtdblock2, sector 24

Buffer I/O error on device mtdblock2, logical block 3

s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004100, 3=80808080

end_request: I/O error, dev mtdblock2, sector 24

Buffer I/O error on device mtdblock2, logical block 3

List of all partitions:

1f00 256 mtdblock0 (driver?)

1f01 3840 mtdblock1 (driver?)

1f02 4096 mtdblock2 (driver?)

1f03 1040384 mtdblock3 (driver?)

No filesystem could mount root, tried: cramfs

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

[] (unwind_backtrace+0x0/0xec) from [] (panic+0x54/0x174)

[] (panic+0x54/0x174) from [] (mount_block_root+0x1d0/0x210)

[] (mount_block_root+0x1d0/0x210) from [] (mount_root+0xa0/0xc0)

[] (mount_root+0xa0/0xc0) from [] (prepare_namespace+0x164/0x1bc)

[] (prepare_namespace+0x164/0x1bc) from [] (kernel_init+0x10c/0x14c)

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top