天嵌 ARM开发社区

 找回密码
 注册
查看: 1599|回复: 4

hello_world模块加载问题,求助好心人!

[复制链接]
zhoujiaxg 发表于 2010-8-22 01:32:53 | 显示全部楼层 |阅读模式
本帖最后由 zhoujiaxg 于 2010-8-22 01:57 编辑

板子上的linux系统我自己重新装了一次
烧写步骤
第一:在nor下面启动,选择1,烧写uboot
第二:在nand模式下启动,按空格键进入烧写模式,选择3,烧写zImage,zImage_2.6.30.4_W35_256MB_20091030.bin
选择b,烧写logo,最后选择6,烧写文件系统,就是那个root_qtopia_2.2.0_2.6.30.4_256MB_20091216.bin文件,烧写完后,选择8可以进入linux系统。

然后我就通过虚拟机将linux2.6.30.4源码里的EmbedSky_hello.ko文件复制到U盘里面,然后插在开发板的HOST上,从/mnt/udisk/里面将ko文件拷贝到/lib/目录下。使用mount EmbedSky_hello.ko
console出现如下信息
sd 2:0:0:0: [sdc] 3993600 512-byte hardware sectors: (2.04 GB/1.90 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
sd 2:0:0:0: [sdc] Attached SCSI removable disk

[root@EmbedSky /lib]# cp /mnt/udisk/EmbedSky_hello.ko .
[root@EmbedSky /lib]# mount EmbedSky_hello.ko
mount: can't find EmbedSky_hello.ko in /etc/fstab
请问驱动.ko文件到底应该放在哪里,我这是什么问题啊?
 楼主| zhoujiaxg 发表于 2010-8-22 01:55:01 | 显示全部楼层
补充:刚才我试过了,用rz命令从串口下载方式将驱动文件拷到/lib/下可以挂载成功
但是通过U盘 从/mnt/udisk目录cp过来的就挂载不上,会出现如上问题

求真相:Q
justahu 发表于 2010-8-31 16:49:40 | 显示全部楼层
先把.ko文件拷到文件系统下 编译生成文件系统.bin 烧写文件系统到开发板 在把.ko放到开发板的lib/目录下
教程上是这么说的
wuchguang 发表于 2010-8-31 18:01:04 | 显示全部楼层
你把U盘上的EmbedSky_hello.ko拷到开发板上(可以放在任何目录上),再用insmod (绝对路径)/EmbedSky_hello.ko   mount是挂载设备,如U盘等
 楼主| zhoujiaxg 发表于 2010-9-1 01:10:29 | 显示全部楼层
谢谢楼上两位,TQ论坛人气太低啦。。。一周才得到答复,早已经自己弄明白了。不过还是感谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-19 16:00 , Processed in 1.020547 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表