📄 enabling_nfs.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head> <title></title> <link rel="stylesheet" media="screen" type="text/css" href="./style.css" /> <link rel="stylesheet" media="screen" type="text/css" href="./design.css" /> <link rel="stylesheet" media="print" type="text/css" href="./print.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="clear"><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#enabling_nfs" class="toc">Enabling NFS</a></span></div><ul class="toc"><li class="level3"><div class="li"><span class="li"><a href="#what_is_nfs" class="toc">What is NFS?</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#enabling_nfs_mount" class="toc">Enabling NFS Mount</a></span></div></li></ul></li></ul></li></ul></div></div><h2><a name="enabling_nfs" id="enabling_nfs">Enabling NFS</a></h2><div class="level2"></div><!-- SECTION [1-26] --><h3><a name="what_is_nfs" id="what_is_nfs">What is NFS?</a></h3><div class="level3"><p> NFS stands for Network File System. It allows the user to access directories and/or files on a remote machine while appearing to be local files or directories. For more specific information on NFS you may want to look at the NFS <a href="http://nfs.sourceforge.net" class="urlextern" title="http://nfs.sourceforge.net" rel="nofollow">website</a> on SourceForge. If you do not have a Linux or Unix machine available for NFS mounting, you can do it on your Windows machine, by looking at Microsoft’s <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=896c9688-601b-44f1-81a4-02878ff11778&DisplayLang=en" class="urlextern" title="http://www.microsoft.com/downloads/details.aspx?FamilyID=896c9688-601b-44f1-81a4-02878ff11778&DisplayLang=en" rel="nofollow">web site</a>, and searching for “Services for UNIX” or sfu.</p></div><h4><a name="setting_up_a_nfs_server" id="setting_up_a_nfs_server">Setting up a NFS Server</a></h4><div class="level4"><p> Setting up a server is outside the scope of this document, as it is very specific to the distribution. If you are having problems setting up a server, or getting errors that look like:</p><pre class="code">*RPC:unable to receive,errno=no route to host*nfsmount failed: Bad file descriptor*Mounting 192.168.0.5:/home/share on /mnt failed: Invalid argument</pre><p> it is because the host or nfs server is not set up properly. to solve these types of issues, check out:</p><ul><li class="level1"><div class="li"> How to <a href="setting_up_the_network.html" class="wikilink1" title="setting_up_the_network.html">set up the network</a></div></li><li class="level1"><div class="li"> <a href="http://www.linux.com/howtos/NFS-HOWTO/server.shtml" class="urlextern" title="http://www.linux.com/howtos/NFS-HOWTO/server.shtml" rel="nofollow">NFS-HOWTO</a> or <a href="http://www.tldp.org/HOWTO/NFS-HOWTO/server.html" class="urlextern" title="http://www.tldp.org/HOWTO/NFS-HOWTO/server.html" rel="nofollow">NFS-HOWTO</a> or <a href="http://nfs.sourceforge.net/nfs-howto/" class="urlextern" title="http://nfs.sourceforge.net/nfs-howto/" rel="nofollow">NFS-HOWTO</a></div></li></ul></div><!-- SECTION [27-1371] --><h3><a name="enabling_nfs_mount" id="enabling_nfs_mount">Enabling NFS Mount</a></h3><div class="level3"><p> It is very easy to get NFS up and running on your target board. This next section will list instructions that should help you enable NFS mount properly.</p></div><h4><a name="step-by-step_instructions" id="step-by-step_instructions">Step-by-Step Instructions</a></h4><div class="level4"><ul><li class="level1"><div class="li"> First you want to make sure that you have the latest sources from <acronym title="Concurrent Versions System">CVS</acronym> for the toolchain and the kernel. If you are uncertain on how to acquire the sources then please refer to the <a href="version_control_systems.html#cvs_quickstart" class="wikilink1" title="version_control_systems.html">CVS Quickstart</a>.</div></li><li class="level1"><div class="li"> Next you must build and install the toolchain. If you are uncertain on how to do this please see <a href="toolchain_build_script.html" class="wikilink1" title="toolchain_build_script.html">Toolchain Build Script</a>.</div></li><li class="level1"><div class="li"> After the toolchain installation is completed modify your <strong>PATH</strong> to point to the toolchain. If you are unsure on how to set your PATH please see <a href="installing_the_blackfin_tool_chain.html#setting_the_path_environment_variable" class="wikilink1" title="installing_the_blackfin_tool_chain.html">Setting the PATH Environment</a>.</div></li><li class="level1"><div class="li"> <em>cd</em> into the freshly downloaded kernel directory, <strong>uClinux-dist</strong>. <pre class="code">cd where/you/put/uClinux-dist</pre></div></li><li class="level1"><div class="li"> Now enter the command:<pre class="code">make menuconfig</pre></div></li><li class="level1"><div class="li"> In the make menuconfig menu select the <strong>Kernel/Library/Defaults Selection</strong></div></li><li class="level1"><div class="li"> In here check off the boxes:<pre class="code">(x) Customize Kernel Settings(x) Customize Vendor/User Settings</pre></div></li><li class="level1"><div class="li"> Then select <strong>Exit and Save</strong></div></li></ul><p> </p><ul><li class="level1"><div class="li"> Now you should be in the <strong>Custom Kernel Settings</strong> menu. Here select <strong>File Systems</strong>.</div></li><li class="level1"><div class="li"> Under <strong>File Systems</strong> select <strong>Network File Systems</strong> and the following two parameters should be preset if they are not please select them: <pre class="code">(x) NFS file system support(x) Provide NFSv3 client Support</pre></div></li><li class="level1"><div class="li"> Then select <strong>Save and Exit</strong>. Next you will be brought to the <strong>Customize Vendor/User Settings</strong> menu. Here select <strong>BusyBox</strong>.</div></li><li class="level1"><div class="li"> Under the <strong>BusyBox</strong> menu the following parameter should be selected if it is not please select it: <pre class="code">(x) BusyBox </pre></div></li><li class="level1"><div class="li"> Then go back to the previous menu and select <strong>Network Applications</strong>. Under this menu select the following program to be compiled: <pre class="code">(x) portmap</pre></div></li><li class="level1"><div class="li"> Then <strong>Save and Exit</strong>.</div></li><li class="level1"><div class="li"> Now <code>cd</code> into the <code>user/busybox/</code> directory.<pre class="code">cd user/busybox</pre></div></li><li class="level1"><div class="li"> Issue a make menuconfig<pre class="code">make menuconfig</pre></div></li><li class="level1"><div class="li"> In the config menu select <strong>Linux System Utilities</strong> and then turn on: <pre class="code">(x) Support mounting NFS file systems</pre></div></li><li class="level1"><div class="li"> Then <code>Save and Exit</code>.</div></li><li class="level1"><div class="li"> Next <code>cd</code> into the <strong>uClibc</strong> directory. <pre class="code">cd ../../uClibc</pre></div></li><li class="level1"><div class="li"> Issue a make menuconfig <pre class="code">make menuconfig</pre></div></li><li class="level1"><div class="li"> In the config menu select <strong>Networking Support</strong> and then turn on: <pre class="code">(x) Remote Procedure call (RPC) support.</pre></div></li><li class="level1"><div class="li"> select <strong>Save and Exit</strong></div></li><li class="level1"><div class="li"> <em>cd</em> back into the <strong>uClinux-dist</strong> directory. <pre class="code">cd ..</pre></div></li><li class="level1"><div class="li"> Issue a make.<pre class="code">make</pre></div></li><li class="level1"><div class="li"> Copy the kernel into the <strong>tftpboot</strong> directory. (For more information on setting up a tftp server please see <a href="setting_up_a_tftp_server.html" class="wikilink1" title="setting_up_a_tftp_server.html">Setting up a TFTP Server</a>.) <pre class="code">cp ./images/linux /tftpboot/linux</pre></div></li><li class="level1"><div class="li"> tftp and boot-elf the file over using U-Boot. (For more information on using U-Boot please see <a href="das_u-boot_on_blackfin.html" class="wikilink1" title="das_u-boot_on_blackfin.html">Das U-Boot on Blackfin</a>.) <pre class="code">tftp 0x1000000 linuxbootelf</pre></div></li><li class="level1"><div class="li"> Once the kernel has booted make sure that the Ethernet is running by checking to see if you have an IP address. <pre class="code">ifconfig</pre></div></li><li class="level1"><div class="li"> If you do not have a valid IP address then issue the command: <pre class="code">dhcpcd &ifconfig</pre><p> The ifconfig will verify that you have a valid IP address.</p></div></li><li class="level1"><div class="li"> Then start the portmap application:<pre class="code">portmap &</pre></div></li><li class="level1"><div class="li"> Mount the NFS directory using this command: <pre class="code">mount -o rsize=1024,wsize=1024 鈥搕 nfs 192.168.0.1:/share/bfin/ /mnt </pre><p> (Where <code>/share/bfin</code> is the nfs folder on the remote machine and <code>/mnt</code> is the local directory where you will be accessing this folder.)</p></div></li></ul><p> “”“” </p></div><!-- SECTION [1372-] --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -