set gatewapip 192.168.1.1
tftp下载zImage
set bootcmd 'tftp 0x30008000 zImage;bootm 0x30008000'
nfs方式挂载rootfs
setenv bootargs root=/dev/nfs nfsroot=192.168.1.141:/root/porting_x210/rootfs/rootfs ip=192.168.1.10:192.168.1.141:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC2,115200
将自己编译好的驱动.ko文件放入nfs共享目录下去
[root@aston210 ]# mkdir driver_test
cd /root/winshare/driver/5.2.1
make cp
ls /root/porting_x210/rootfs/rootfs/driver_test
开发板启动后使用insmod、rmmod、lsmod等去进行模块实验
cd driver_test
modinfo module_test.ko
modinfo: can't open '/lib/modules/2.6.35.7/modules.dep': No such file or directory
lsmod
Module Size Used by Not tainted
insmod module_test.ko
[ 532.837882] chrdev_init
lsmod
Module Size Used by Not tainted
module_test 548 0
rmmod module_test.ko
[ 621.598832] chrdev_exit
dmesg
cat /proc/sys/kernel/printk
7 4 1 7