📄 terminal_programs.html
字号:
<pre class="code"># on the development system ls -l romfs/bin/telnetd-rwxr--r-- 1 root root 37856 Sep 12 15:13 romfs/bin/telnetd</pre><p>This means that the file should be in the target image too. </p><pre class="code"># on the target systemroot:~> ls -l /bin/telnetd-rwxr--r-- 1 0 0 37856 /bin/telnetd</pre><p> Then check that the <strong>telnet daemon</strong> is enabled on the target in the <a href="what_is_inetd.html" class="wikilink1" title="what_is_inetd.html">**inetd** </a> config file.</p><pre class="code"># On the targetroot:~> cat /etc/inetd.confftp stream tcp nowait root /bin/ftpd -ltelnet stream tcp nowait root /bin/telnetd</pre><p> If all this works then you should be able to start a <strong>telnet</strong> session on the target as shown above.</p></div><!-- SECTION [5861-7660] --><h3><a name="remote_shell_and_remote_file_copy" id="remote_shell_and_remote_file_copy">Remote Shell and Remote File Copy</a></h3><div class="level3"><p> You can connect to the target system with <strong>rsh</strong>. rsh allows you to execute a single command on the target from a remote machine. The output generated from the command issued is only visible on the remote machine that it was issued from. </p></div><h4><a name="compiling_rsh_and_rcp" id="compiling_rsh_and_rcp">Compiling rsh and rcp</a></h4><div class="level4"><p>rsh must first be built into your kernel. To do this follow these steps:</p><p>In the uClinux-dist/ directory issue the following commands: </p><pre class="code"># on the development systemmake cleanmake menuconfig</pre><p> Next a dialog box will appear. Here choose the box that says: </p><pre class="code">Kernel/Library/Defaults Selection</pre><p> The next dialog box will appear. Here select: </p><pre class="code">[*] Customize Vendor/User SettingsExitExitDo you wish to save your new kernel configuration?Yes</pre><p> A new menu will appear. In this menu select: </p><pre class="code">Blackfin app prorams ---></pre><p> In the next dialog box select: </p><pre class="code">--- Inetutils[*] rsh[*] rcp[*] rshd</pre><p> Then: </p><pre class="code">ExitExitDo you wish to save your new kernel configuration?Yes</pre><p>Now compile the kernel: </p><pre class="code"># on the development systemmake</pre><p>After you compile the kernel you can now load and run it (for more information on loading and running the kernel please see <a href="downloading_to_the_target.html" class="wikilink1" title="downloading_to_the_target.html">Downloading the Kernel to the Target</a>) and begin to use <strong>rsh</strong>.</p></div><h4><a name="using_rsh" id="using_rsh">Using rsh</a></h4><div class="level4"><p>After booting the kernel enter the following commands to <strong>start</strong> <strong>rshd</strong> and <strong>dhcpcd</strong>: </p><pre class="code"># on the targetWelcome to: ____ _ _ / __| ||_| _ _ _ _| | | | _ ____ _ _ \ \/ /| | | | | | || | _ \| | | | \ /| |_| | |__| || | | | | |_| | / \| ___\____|_||_|_| |_|\____|/_/\_\|_|For further information see:http://www.uclinux.org/http://blackfin.uclinux.org/BusyBox v1.00 (2005.09.16-12:31+0000) Built-in shell (msh)Enter 'help' for a list of built-in commands.root:~> dhcpcd&26root:~> eth0: link downeth0: link up, 100Mbps, half-duplex, lpa 0x40A1root:~> rshd &28root:~> </pre><p>Now issue an <strong>ifconfig</strong> to determine the IP address of the target.</p><pre class="code"># on the targetroot:~> ifconfigeth0 Link encap:Ethernet HWaddr 00:E0:22:FE:06:19 inet addr:10.64.204.163 Bcast:10.64.204.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 Interrupt:27 Base address:0x300 DMA chan:fflo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0root:~></pre><p>With the targets IP now known, we can access it using rsh on our <strong>host</strong> machine. To test this issue the following command from the host machine: </p><pre class="code"># on the development systemuser@linux:~> rsh -l root 10.64.204.163 ls</pre><p> This command will issue the ls command on the target board and the results will be printed to the console of the <strong>host system</strong>. </p><pre class="code"># on the development systemuser@linux:~> rsh -l root 10.64.204.163 lsbindevetchomeliblost+foundmntprocrootsbintmpusrvaruser@linux:~> </pre></div><h4><a name="using_rcp" id="using_rcp">Using rcp</a></h4><div class="level4"><p>You can also preform a remote file copy, <strong>rcp</strong>, from your host to your target when rshd is running. To do this issue the following command from the host computer:</p><pre class="code"># on the development systemuser@linux:~> rcp foo root@10.64.204.163:/</pre><p>Where <strong>foo</strong> is the <strong>file</strong> to be copied, <strong>10.64.204.163</strong> is the <strong>target’s IP</strong> address, and <strong>/</strong> is the <strong>directory</strong> where the file is to be copied to.</p></div><!-- SECTION [7661-11492] --><h2><a name="windows_clients" id="windows_clients">Windows Clients</a></h2><div class="level2"></div><!-- SECTION [11493-11519] --><h3><a name="hyperterminal" id="hyperterminal">HyperTerminal</a></h3><div class="level3"><p>This terminal program is available for most Windows platforms. It usually comes pre鈥慽nstalled and can be found under: <em>Start>Programs>Accessories>Communication>HyperTerminal</em>. When a HyperTerminal session is started the <strong>Connection Description</strong> window will appear (if the Connection Wizard dialog appears simply complete it with dummy values as we will not be using a dial-up modem):</p><p><a href="media/hyperterminal1.png" class="media" target="_blank" title="hyperterminal1.png"><img src="media/hyperterminal1.png" class="media" alt="" /></a></p><p><strong>Name: <type any appropriate name for the session></strong>.</p><p>Click <strong>OK</strong>.</p><p>The <strong>Connect To</strong> window should now appear:</p><p><a href="media/hyperterminal2.png" class="media" target="_blank" title="hyperterminal2.png"><img src="media/hyperterminal2.png" class="media" alt="" /></a></p><p><strong>Connect using: <choose the port the serial cable is connected to></strong></p><p>(usually COM1).</p><p>Click <strong>OK</strong>.</p><p>The <strong>COMX Properties</strong> window should now appear:</p><p><a href="media/hyperterminal3.png" class="media" target="_blank" title="hyperterminal3.png"><img src="media/hyperterminal3.png" class="media" alt="" /></a></p><p><strong>Bits per second: 57600</strong> <br/> <strong>Data bits: 8</strong> <br/> <strong>Parity: None</strong> <br/> <strong>Stop bits: 1</strong> <br/> <strong>Flow Control: None</strong> <br/></p><p>Click <strong>OK</strong>.</p><p> </p><p>The terminal session should now be connected. You should now be able to see output from U鈥態oot or uClinux when they are run. </p></div><!-- SECTION [11520-] --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -