linux2.6驱动编译-常见问题

来源:互联网 发布:软件外包 源代码 编辑:程序博客网 时间:2024/05/06 02:07

在这次驱动学习过程中出现了如下问题:

1).建立了nfs挂载文件夹后,发现一从虚拟机下载资源,就会卡住。并提示 "nfs: server 200.200.200.153 not responding, still trying“。

        可能是由于UDP服务在传输较大文件时不稳定造成,可以改用TCP服务

        ifconfig eth0 200.200.200.149 up;

        nfs -o nolock 200.200.200.153:/nfs_driver /mnt/nfs/;

        mount -t nfs -o intr,nolock,rsize=1024,wsize=1024   200.200.200.153:/nfs_driver /mnt;

        (或 mount -t nfs -o tcp,nolock,   200.200.200.153:/nfs_driver /mnt;)

        (是按照这位大神的资料解决的:http://hi.baidu.com/adrain001/item/5c28a0531e014a908d12edaf)

2).运行了"insmod led.ko"后,出现下面错误"version magic '2.6.30.4 mod_unload modversions ARMv4 ' should be '2.6.30.4-EmbedSky mod_unload ARMv4 ' "

        这是由于作为驱动编译背景的内核与插入模块的内核版本不同造成。可以试试下面

        make menuconfig

        在General setup->Local version,加入"-EmbedSky"

3).程序下载

        网口--采用挂载nfs网络共享文件夹的方式,也可以tftp等。 

        串口--采用rz(另一种串口下载方式)下载。

4).使用4.3.3的交叉编译工具编译内核时提示错误" kernel/.bounds.s.d: No such file or directory"

         是由于交叉编译工具链被损坏造成。

5).下载了一个交叉编译工具链,设置好环境变量后,在编译测试程序时"arm-none-linux-gnueabi-c++: error trying to exec 'cc1plus': execvp: No such file or directory"

          所以有可能是该工具链的工作内核和当前内核不匹配造成,但最大的可能是工具链被损坏(比如下一条)。

6).尽量不要在window下解压压缩包,再复制到linux中去。因为linux的文件类型比windows多(比如链接文件),这样可能导致压缩包的部分文件内容丢失。

 (由于初学,非常欢迎大神纠错)

0 0