RTC向内核注册,导致从nand flash启动失败

原點 2014-10-24 10:44:26
1.内核当中linux-2.6.22.6\arch\arm\plat-s3c24xx\devs.c

struct platform_device s3c_device_rtc = {
.name = "s3c2410-rtc",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_rtc_resource),
.resource = s3c_rtc_resource,
};
该设备文件由于没有向内核注册,导致最终RTC无法使用。

2.于是我在linux-2.6.22.6\arch\arm\plat-s3c24xx\common-smdk.c

向内核注册
/* devices we initialise */

static struct platform_device __initdata *smdk_devs[] = {
&s3c_device_nand,
&smdk_led4,
&smdk_led5,
&smdk_led6,
&smdk_led7,
&s3c_device_rtc,//这里是我加入的

}

platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

但会出现一个问题就是如果是使用Nand Flash上的跟文件系统会
出现下面的问题导致启动失败:
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 1
s3c2410-rtc s3c2410-rtc: setting the system clock to 2014-10-24 21:16:39 (1414185399)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cct "root=" boot option; here are the available partitions:
1f00 2048 mtdblock0 (driver?)
1f01 8192 mtdblock1 (driver?)
1f02 251904 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

但如果是直接使用NFS启动则不会出现该问题。问题出在哪里?
难道向内核注册s3c_device_rtc会影响内核的nand flash驱动吗?
...全文
512 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
falloutmx 2014-10-25
  • 打赏
  • 举报
回复
直接使用NAND上的文件系统?我怎么看你的错误里还是用的NFS?
引用
Root-NFS: No NFS server available, giving up. VFS: Unable to mount root fs via NFS, trying floppy.
看看uboot里的启动参数吧

21,600

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧