⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basic_session.html

📁 9200的开发资料:包括uboot
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Authors" content="Olivier DEBICKI, Mohammed Amine SAYA">
   <meta name="GENERATOR" content="Mozilla/4.73 [en] (Windows NT 5.0; U) [Netscape]">
   <title>Basic Session on AT91RM9200DK</title>
</head>
<body bgcolor="white">

<center><h1>Basic Linux session on the AT91RM9200DK</h1></center>

<br>

<blockquote>
<blockquote>

<li><a href="#Download the kernel and the ramdisk">Download the kernel and the ramdisk</a></li>

<li><a href="#Log as root">Log as root</a></li>

<li><a href="#Configure the ethernet address for eth0">Configure the ethernet address for eth0</a></li>

<li><a href="#Test the httpd server">Test the httpd server</a></li>

<li><a href="#Configure NFS client">Configure NFS client</a></li>

<li><a href="#Ethernet Benchmarking with iperf">Ethernet Benchmarking with iperf</a></li>

<li><a href="#Serial data flash driver3.4.2">Serial data flash driver3.4.2</a></li>

<li><a href="#Nand Flash">Nand Flash</a></li>

<li><a href="#Disk-On-Key">How to use your Disk On Key</a></li>

<li><a href="#RTC">How to set the system clock</a></li>

</blockquote>
</blockquote>

<br>
<h2><a NAME="Download the kernel and the ramdisk"></a>Download the kernel and the ramdisk</h2>

To load Linux and its ramdisk using U-Boot on the AT91RM9200DK, please refer to 
the <a href="Loading_linux.html">Loading Linux on the AT91RM9200DK</a> documentation. 
<p>Once it's done, you should get the following prompt: 
<ul><b>AT91RM9200DK login:</b></ul>

<h2><a NAME="Log as root"></a>Log as root</h2>

Enter root as login. No password is required. The following prompt is
then available:
<blockquote><b>[root@AT91RM9200DK /root]$</b></blockquote>
Now you are logged as root. Many standart linux commands are available:
ls, cd, cp, mv, mount, df, ...

<h2><a NAME="Configure the ethernet address for eth0"></a>Configure the ethernet address for eth0</h2>

<blockquote>[root@AT91RM9200DK /root]$&nbsp;&nbsp;<i>ifconfig eth0 10.159.245.185</i></blockquote>
<p>Now the board should be seen through the network. A ping from another network 
  device should declare the AT91RM9200DK alive (you should type a ctrl-c to stop 
  the ping). <br>
  A foreign computer can enable a telnet or an ftp session on the board. This 
  operation can be done at start time. Please refer to the<a href="ramdisk.html"> 
  ramdisk documentation</a>. </p>
<p>&nbsp;</p>
<h2><a name="Ethernet Benchmarking with iperf"></a>Ethernet Benchmarking with 
  iperf</h2>
iperf is an Ethernet performance evaluation program that runs in two different 
modes; server or client. we can run either mode on the target device (which we 
want to evaluate). iperf can be found in /bin in your ramdisk. the following steps 
show how to set up the test : 
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Launch 
  iperf in server mode on the board <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [root@AT91RM9200DK/root] 
  iperf -s 
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Launch 
  iperf in client mode on another host. don't forget to add the server ip_address 
  as an argument. <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [root@AT91RM9200DK/root] 
  iperf -c&nbsp;&nbsp; 10.159.245.142 
<p>We can trade of the roles of the board and the host. the board could be a client 
  and host could become a server. <br>
  At the end of the transfer iperf dumbs three important parameters : The interval, 
  the payload transfered and the bandwidth. <br>
  <br>
  Note: You need to have also iperf program on your host. 
<h2><a NAME="Test the httpd server"></a>Test the httpd server</h2>

<p>If you want to run a HTTP server on the board you have to load the ramdisk 
  called: <b>ramdisk-http: <a href="../../../../Linux-arm9/ramdisk-http"><img src="../../../../Pictures/logo/Icon_Disk.gif" width="16" height="16" border="0"></a></b>.</p>
<p> After Linux boots make sure that you set the network with ifconfig (see <a href="#Configure the ethernet address for eth0">Configure 
  the ethernet address for eth0</a>) before you start browsing.<br> Launch a web browser 
  on a remote host and input this address: <i><a href="http://10.159.245.185:80">http://10.159.245.185</a></i> 
  where 10.159.245.185 is the IP address of your board. If everything is ok you 
  should see an Apache welcome page. To start or stop during current session you 
  can type the following commands as root. </p>
<dl> 
  <dd>// to stop HTTP server</dd>
  <dd>[root@AT91RM9200DK /root]$&nbsp;&nbsp;/etc/rc.d/init.d/httpd stop</dd>
  &nbsp; 
  <dd>// to start HTTP server</dd>
  <dd>[root@AT91RM9200DK /root]$&nbsp;&nbsp;/etc/rc.d/init.d/httpd start</dd>
  &nbsp; 
  <dd>// to restart HTTP server</dd>
  <dd>[root@AT91RM9200DK /root]$&nbsp;&nbsp;/etc/rc.d/init.d/httpd restart</dd>
  <dt>&nbsp;</dt>
  <dt>Note: Do not forget to disable your proxy if necessary.</dt>
</dl>


<h2><a NAME="Configure NFS client"></a>Configure NFS client</h2>

<p>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.<br>
  You need to rebuild the kernel and generate a new nfs dedicated uImage.<br>
  You need to mount the ramdisk , copy its contents under a dedicated directory 
  where you can access them using nfs.</p>
<p>On the distant linux box modify the /etc/exports file to enable directory access: 
</p>
<dl>
<dd>
<i># Sample of /etc/exports file:</i></dd>

<dd>
<i></i></dd>

<dd>
<i># /usr/local/at91rm9200dk directory: it can be accessed by everybody
with nobody's rights</i></dd>

<dd>
<i>/usr/local/at91rm9200dk (ro, all_squash)</i></dd>
</dl>
Start the following demons: portmap, rpc.mountd and rpc.nfsd on the distant
linux box.
<p>On the at91rm9200dk mount the distant file system:
<blockquote>[root@AT91RM9200DK /root]$<i>mkdir -p /mnt/linuxbox</i></blockquote>

<blockquote>[root@AT91RM9200DK /root]$<i>mount -t nfs 10.159.245.144:/usr/local/at91rm9200dk
/mnt/linuxbox</i></blockquote>

<h2>&nbsp; </h2>
<h2><a NAME="Serial data flash driver3.4.2"></a>Serial data flash driver3.4.2</h2>

<h3>Basic input/output operations</h3>

Those tests consist of programming the flash with a reference file, reading
it back and comparing.First you must prepare the reference file weighting
at least 8192*1056 bytes. A random pattern is recommended (You may create
a random pattern from /dev/random: dd if=/dev/random bs=1056 count=8192
of=random.pattern). Since this file is pretty big, it may be located on
a network file system. You must have the cmp program installed somewhere
where you can read the reference file and the file read from the flash.
The flash must be erased before each test.
<br>There are two modes in which the input/output operations may be carried
out : by using the char device interface or by using the block device interface.
<br>The following steps show how to conduct the input/output operations
in each mode :
<p>The char device interface mode :
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
Program the flash device with the reference file
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[root@AT91RM9200DK /root]&nbsp; dd&nbsp; of=/dev/mtd/0&nbsp; if=/mnt/ide/reference.file&nbsp;
bs=1056&nbsp; count=8192
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
Read it back
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[root@AT91RM9200DK /root]&nbsp; dd&nbsp; if=/dev/mtd/0&nbsp; of=/mnt/ide/readfromflash&nbsp;
bs=1056&nbsp; count=8192
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
Campare
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[user@DebugPC tftpboot]$ cmp readfromflash reference.file
<p>The block device interface mode :
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Program
the flash device with the reference file
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [root@AT91RM9200DK
/root]dd of=/dev/mtdblock/0 if=/mnt/ide/reference.file bs=1056 count=8192
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Read it back
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [root@AT91RM9200DK
/root]dd if=/dev/mtdblock/0 of=/mnt/ide/readfromflash bs=1056 count=8192
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Compare

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -