问题1:
NFS连接
开发板在上电后 在串口输入param set linux_cmd_line "console=ttySAC0 root=/dev/nfs nfsroot=192.168.1.2:/home/jiaxinxu/mini2440/root_nfs ip=192.168.1.70:192.168.1.2:192.168.1.2:255.255.255.0:sbc2440.arm9.net:eth0:off"
后 板子会启动并通过NFS加载文件系统:PC机上的/home/jiaxinxu/mini2440/root_nfs
但是上电后卡在 Looking up port RPC 100003/2 ON 192.168.1.2处
portmap: server 192.168.1.2 not responding, timed out Root-NFS: Unable to get mountd port number from server, using default
我的root_nfs文件夹在PC机上通过NFS mount到本机/mnt没有问题说明我的NFS设置是正确的
而且我在板子上电的时候在PC机上ping 板子192.168.1.70 是能ping通的
说明网络正常
后来我才联想到 有可能是防火墙没关 输入 service iptables stop 而且不光linux的防火墙需要关 最好把linux的也关掉
再上电
板子就正常加载root_nfs了
问题2
调试HELLO驱动时 编译完成后,通过NFS将hello.ko下载进开发板中,在串口中insmod hello.ko时,出现如下问题! insmod: kernel-module version mismatch hello.ko was compiled for kernel version while this kernel is version 2.6.13.
出现这个问题的原因是root_nfs中的busybox版本不支持2.6内核,解决办法是重新编译busybox并覆盖root_nfs中的busy_box
具体方法
进入busybox-1.2.0目录下
make clean
make menuconfig
弹出menu 进入linux module utilities->选择Support version 2.6.x Linux kernels
make
make install
然后会出现下列提示
/opt/FriendlyARM/QQ2440/root_busybox/bin/addgroup -> busybox /opt/FriendlyARM/QQ2440/root_busybox/bin/adduser -> busybox /opt/FriendlyARM/QQ2440/root_busybox/bin/ash -> busybox /opt/FriendlyARM/QQ2440/root_busybox/bin/bbconfig -> busybox 。。。。。。。。。。。。。。。
这是进行了指令的连接
下面进入 /opt/FriendlyARM/QQ2440/root_busybox/文件夹下 将用文件夹的的内容覆盖root_nfs文件夹下的内容
重启板子 insmod hello.ko成功 |