📄 nfs说明.txt
字号:
如果使用NFS,内核需要重新配置。同时,server上的目录中也必须要有必要的文件和目录(NFS RAMDISK)。
Kernel configuration when using NFS ramdisk:
Below the details of the parameters when typing: make xconfig:
General setup:
-> Default kernel string : Erase its contents
Block Devices:
-> Network block device support : y
-> Ramdisk support: n
File System:
-> Quota support: n
-> Kernel automounter support: y
-> DOS FAT fs support: y
-> VFAT (Windows 95) fs support: y
-> Journalling flash file system v2 (JFFS2) support: 0
-> /proc file system support: y
-> /dev file system support (EXP): y
-> Automatically mount a boot: y
-> Second extended fs support: y
File System -> Network File systems:
-> NFS file system support : y
-> provide NFSv3 client support: y
-> root file system on NFS: y
-> NFS server support: n
redhat 9.0下面可以用redhat-config-nfs工具来配置。
Configure NFS client
This can be usefull to extend ramdisk capabilities and test new user applications. Applications can be cross-compiled on a distant linux box. The installation directory on the distant system can be seen by the AT91RM9200DK.
You need to rebuild the kernel and generate a new nfs dedicated uImage.
You need to mount the ramdisk , copy its contents under a dedicated directory where you can access them using nfs.
On the distant linux box modify the /etc/exports file to enable directory access:
# Sample of /etc/exports file:
# /usr/local/at91rm9200dk directory: it can be accessed by everybody with nobody's rights
/usr/local/at91rm9200dk (ro, all_squash)
Start the following demons: portmap, rpc.mountd and rpc.nfsd on the distant linux box.
On the at91rm9200dk mount the distant file system:
[root@AT91RM9200DK /root]$mkdir -p /mnt/linuxbox
[root@AT91RM9200DK /root]$mount -t nfs 10.159.245.144:/usr/local/at91rm9200dk /mnt/linuxbox
For NFS ramdisk
for a NFS mounting ramdisk you need to have a NFS server running from which the board's NFS client can fetch the ramdisk. First of all you have to make sure that there is a NFS server running on your PC (host) and second of all you have to edit a file called exports located in /etc and add the following entry :
/usr/home/amine/RD/rd root(rw,no_root_squash,insecure)
Then you need to enter the following command :
[ root@host ] exportfs -r
After all this you need to go back to your board and set some variables on U-Boot, it goes like this :
U-Boot > setenv bootargs root=/dev/nfs rw nfsroot=10.159.245.142:/usr/home/amine/RD/rd ip=10.159.245.180 console=ttyS4,115200 mem=32M
U-Boot > saveenv
U-Boot > tftp 21000000 AS/uImage
U-Boot > bootm 21000000
In case you want to launch it automaticaly you can set a "bootcmd" variable, it goes like this :
U-Boot > setenv bootcmd tftp 21000000 AS/uImage\; bootm 21000000
U-Boot > saveenv
U-Boot > run bootcmd
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -