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

📄 howto_build_usb_drivers.html

📁 S1D13XXX LINUX 驱动 S1D13XX是彩色液晶屏驱动芯片
💻 HTML
字号:
<!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="GENERATOR" content="Mozilla/4.6 [en] (WinNT; I) [Netscape]">
   <meta name="Author" content="Juro Bystricky">
   <meta name="KeyWords" content="USB client, linux, device driver, s1d13a03, s1d13a04, s1d13a05">
   <title>EPSON USB Client Driver</title>
</head>
<body>
&nbsp;<div align="center">
	<table border="0" width="600" id="table1">
		<tr>
			<td>
<img SRC="images\nc.jpg" height=153 width=131></td>
			<td>
			<p align="center"><b><font size="6" color="#3333FF">Building the<br>
			</b><font face="Arial Black">EPSON</font><b><br>
			USB Client Driver</b></font></td>
			<td><img SRC="images\nc.jpg" height=153 width=131></td>
		</tr>
	</table>
	<table border="0" width="500" id="table2">
		<tr>
			<td>
<p align="justify">Several EPSON LCD Controllers/Companion Chips contain a USB client core.
The chips are typically used in PDAs where the USB connection can be used
to connect to a PC and thus allow the PDA to share files
with the PC or share internet connection.<br>
&nbsp;<p align="justify">The driver in this package allows an Ethernet over USB cable
link between two Linux machines connected by a standard USB cable. Compiling and installing the 
			drivers permits the EPSON LCD/USB
chips to setup an Ethernet over USB link between a client computer (containing
the EPSON chip) and a host computer using a standard USB cable.
<p>The drivers themselves can be found in the following files:
<br>
&nbsp;<div align="center">
				<table border="0" width="500" id="table3">
					<tr>
						<td><b>epson2888usb.c</b></td>
						<td width="400" align="justify">Low level USB driver code.<br>
						This driver is completely unaware of Ethernet.</td>
					</tr>
					<tr>
						<td><b>epson2888usb.h</b></td>
						<td width="400" align="justify">ublic interface to low level USB driver module</td>
					</tr>
					<tr>
						<td><b>epson2888usb-eth.c</b></td>
						<td width="400" align="justify">Ethernet/over/USB code.<br>
						This driver is completely unaware of USB.</td>
					</tr>
					<tr>
						<td><b>usbnet.c&nbsp;</b></td>
						<td width="400" align="justify">The only file that goes 
						on the Host machine. (see below)</td>
					</tr>
				</table>
			</div>
			<p><b><font size=+1 color="#3333FF">Compilation Instructions</font></b><p align="justify">In the following we assume your Linux kernel sources are in <b>/usr/src/linux</b>.
We also assume you are familiar with the Linux kernel build process. In
the detailed instructions below we use the patch file <b>epson2888usb-2.4.19.diff.gz</b>.
<p><b><font size=+1>Host computer</font></b><font size="4"> </font>
<p align="justify">The goal is to build the module usbnet.o. When running <b>menuconfig</b>, we
must make sure that USB is enabled, networking is enabled, loadable module
support is enabled. These options are normally enabled by default.
			<ol>
				<li>If your kernel is linux-2.4.20 or later,&nbsp; skip to step 2, otherwise,
you must apply the patch file. Copy the file <b>epson2888usb-2.4.19.diff.gz</b>
in the directory <b>/usr/src/linux</b> and issue the commands:<b><br>
				<br>
&nbsp;&nbsp;&nbsp; cd /usr/src/linux</b> <b><br>
&nbsp;&nbsp;&nbsp; gzip -cd epson2888usb-2.4.19.diff.gz | patch
-Np1<br>
&nbsp;</b></li>
				<li>Run<b><br>
&nbsp;&nbsp;&nbsp; make menuconfig<br>
				<br>
				</b>select<br>
				<b>&nbsp;&nbsp;&nbsp; Code maturity level options ---></b> <br>
				<b>&nbsp;&nbsp;&nbsp; [*] Prompt for development and/or incomplete
code/drivers<br>
				<br>
&nbsp;&nbsp;&nbsp; USB Support ---><br>
&nbsp;&nbsp;&nbsp;&nbsp; &lt;*> Support for USB<br>
&nbsp;&nbsp;&nbsp;&nbsp; ---USB Host controller drivers<br>
&nbsp;&nbsp;&nbsp;&nbsp; &lt;*> UHCI </b><i>(or whatever other controller
you have installed)</i><b><br>
&nbsp;&nbsp;&nbsp; USB Network adaptors</b> <b><br>
&nbsp;&nbsp;&nbsp;&nbsp; &lt;M> USB-to-USB networking cable device
support (EXPERIMENTAL)</b> <br>
&nbsp;</li>
				<li>Run <b>make dep<br>
&nbsp;</b></li>
				<li>Run <b>make modules</b> <br>
&nbsp;</li>
				<li>Run <b>make modules_install</b> </li>
				</ol>
<p>&nbsp;<p><b><font size=+1>Client computer</font></b>
<p align="justify">The goal is to compile the file epson2888usb.c into a loadable module
epson2888usb.o and the file epson2888usb-eth.c into a loadable module epson2888usb-eth.o.<p align="justify">Follow these steps:
				<ol>
					<li>First, you must apply the patch file. Copy the file <b>epson2888usb-2.4.19.diff.gz</b>
in the directory <b>/usr/src/linux</b> and issue the commands:<b><br>
					<br>
&nbsp;&nbsp;&nbsp; cd /usr/src/linux</b> <b><br>
&nbsp;&nbsp;&nbsp; gzip -cd epson2888usb-2.4.19.diff.gz | patch
-Np1<br>
&nbsp;</b></li>
					<li>In the directory /usr/src/linux run the command<br>
					<br>
					<b>&nbsp;&nbsp;&nbsp; make menuconfig<br>
					<br>
					</b>Select<b><br>
					<br>
&nbsp;&nbsp;&nbsp; USB support ---></b> <b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EPSON USB Client
drivers ---></b> <b><br>
&nbsp;&nbsp;&nbsp; &lt;M> EPSON2888 USB function support</b> <b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*]&nbsp;&nbsp;&nbsp;
Support for EPSON S1D13A0X</b> <b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*]&nbsp;&nbsp;&nbsp;
Support for PCI B00C series evaluation board</b> <b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [*]&nbsp;&nbsp;&nbsp;
Enable debug messages</b> <b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;M>&nbsp;&nbsp;&nbsp;
Support for EPSON USB network link function<br>
					</b>&nbsp;<br>
					<b>NOTE:</b> you don't have to enable the &lt;> Support for USB&nbsp; in the
main USB configuration menu at all. Debug messages can be normally&nbsp;
retrieved from the file /var/log/messages. They can be quite useful in
the&nbsp; initial stages of development.<br>
&nbsp;</li>
					<li>Run <b>make dep</b> <br>
&nbsp;</li>
					<li>Run <b>make modules</b> <br>
&nbsp;</li>
					<li>Run <b>make modules_install</b> </li>
					</ol>
<p>&nbsp;<p><b><font size=+1 color="#3333FF">Testing the Connection</font></b>
<p>For testing purposes, we will assign the IP address 1.1.1.1 to the client, 1.1.1.2
to the host.<ol>
						<li>Connect the host and the client computers with a USB cable.<br>
&nbsp;</li>
						<li>On client run the following commands:<b><br>
						<br>
&nbsp;&nbsp;&nbsp; modprobe epson2888usb-eth</b> <b><br>
&nbsp;&nbsp;&nbsp; ifconfig usbf 1.1.1.1 netmask 255.255.255.0
up<br>
&nbsp;&nbsp;&nbsp; route add default gw 1.1.1.2<br>
&nbsp;</b></li>
						<li>On host run the following commands:<b><br>
						<br>
&nbsp;&nbsp;&nbsp; insmod usbnet</b> <b><br>
&nbsp;&nbsp;&nbsp; ifconfig usb0 1.1.1.2 netmask 255.255.255.0</b> <br>
						<br>
						If you want to share the host network connection, also issue the following&nbsp;
commands:<b><br>
						<br>
&nbsp;&nbsp;&nbsp; echo 1 > /proc/sys/net/ipv4/ip_forward<br>
&nbsp;&nbsp;&nbsp; iptables -t nat -I POSTROUTING -j
MASQUERADE -s 1.1.1.1/32<br>
&nbsp;&nbsp;&nbsp; iptables -I FORWARD -s 1.1.1.1/32
-j ACCEPT<br>
&nbsp;&nbsp;&nbsp; iptables -I FORWARD -d 1.1.1.1/32
-j ACCEPT</b> <br>
						<br>
						At this point, providing the above commands were successful, the connection
should be up and running.<br>
&nbsp;</li>
						<li>On the client run the command:<br>
						<br>
						<b>&nbsp;&nbsp;&nbsp; ping&nbsp; 1.1.1.2&nbsp; -c 10<br>
						<br>
						</b>If you successfully ping the host, you can test network sharing
by&nbsp; running Netscape on the client (providing the host has internet
connection). You can also share the host drives by executing the command:<br>
						<br>
						<b>&nbsp;&nbsp;&nbsp; mount -t nfs 1.1.1.1:/ /mnt/host<br>
						<br>
						</b>The mount command assumes you have NFS file support, you have a directory&nbsp;
/mnt/host and the host is running an NFS Server.&nbsp; (for a very good
description see <a href="http://nfs.sourceforge.net/nfs-howto">http://nfs.sourceforge.net/nfs-howto</a>)
						<br>&nbsp;
</li>
						</ol>
<p><b><font size=+1 color="#3333FF">Hardware Configuration</font></b>
						<p>The driver were tested using the following hardware configurations:<blockquote>
							<p>Host computer (running usbnet): <br>Pentium II @ 350MHz, ASUS MB P28
							<br>Linux 2.4.19<p>Client computer (running epson2888usb, 
							epson2888usb-eth): <br>Pentium II @ 350MHz, ASUS MB P28
							<br>Linux 2.4.19
						</blockquote>
<p>This driver has been tested with three different controllers:
						<p>&nbsp;<div align="center">
							<table border="1" width="500" id="table4" style="border-collapse: collapse">
								<tr>
									<td>&nbsp;</td>
									<td align="center"><b>S1D13A03</b></td>
									<td align="center" width="153"><b>S1D13A04</b></td>
									<td width="215" align="center"><b>S1D13A05</b></td>
								</tr>
								<tr>
									<td><b>Board </b></td>
									<td align="center">S5U13A03/4/5B00C<br>
									Rev 1.0 </td>
									<td width="153" align="center">
									S5U13A03/4/5B00C<br>
									Rev 1.0 </td>
									<td width="215" align="center">S5U13A05B00C<br>
									Rev 1.0</td>
								</tr>
								<tr>
									<td><b>Switches</b></td>
									<td>&nbsp;</td>
									<td width="153">&nbsp;</td>
									<td width="215">&nbsp;</td>
								</tr>
								<tr>
									<td align="center">1</td>
									<td align="center">Closed</td>
									<td width="153" align="center">Closed</td>
									<td align="center">Closed</td>
								</tr>
								<tr>
									<td align="center">2</td>
									<td align="center">Closed</td>
									<td width="153" align="center">Closed</td>
									<td align="center">Closed</td>
								</tr>
								<tr>
									<td align="center">3</td>
									<td align="center">Open</td>
									<td width="153" align="center">Open</td>
									<td align="center">Open</td>
								</tr>
								<tr>
									<td align="center">4</td>
									<td align="center">Open</td>
									<td width="153" align="center">Open</td>
									<td align="center">Closed</td>
								</tr>
								<tr>
									<td align="center">5</td>
									<td align="center">Open</td>
									<td width="153" align="center">Open</td>
									<td align="center">Open</td>
								</tr>
								<tr>
									<td align="center">6</td>
									<td align="center">Open</td>
									<td width="153" align="center">Open</td>
									<td align="center">Open</td>
								</tr>
								<tr>
									<td align="center">7</td>
									<td align="center">Open</td>
									<td width="153" align="center">Open</td>
									<td align="center">Open</td>
								</tr>
								<tr>
									<td align="center">8</td>
									<td align="center">Open</td>
									<td width="153" align="center">Open</td>
									<td align="center">Open</td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td width="153">&nbsp;</td>
									<td width="215">&nbsp;</td>
								</tr>
								<tr>
									<td><b>Jumpers</b></td>
									<td>&nbsp;</td>
									<td width="153">&nbsp;</td>
									<td width="215">&nbsp;</td>
								</tr>
								<tr>
									<td align="center">JP1</td>
									<td align="center">2-3</td>
									<td width="153" align="center">2-3</td>
									<td align="center">2-3</td>
								</tr>
								<tr>
									<td align="center">JP2</td>
									<td align="center">2-3</td>
									<td width="153" align="center">2-3</td>
									<td align="center">2-3</td>
								</tr>
								<tr>
									<td align="center">JP3</td>
									<td align="center">2-3</td>
									<td width="153" align="center">2-3</td>
									<td align="center">1-2</td>
								</tr>
								<tr>
									<td align="center">JP4</td>
									<td align="center">1-2</td>
									<td width="153" align="center">1-2</td>
									<td align="center">1-2 (IN)</td>
								</tr>
								<tr>
									<td align="center">JP5</td>
									<td align="center">&nbsp;</td>
									<td width="153" align="center">&nbsp;</td>
									<td width="215" align="center">OUT</td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td width="153">&nbsp;</td>
									<td width="215">&nbsp;</td>
								</tr>
								<tr>
									<td align="center">U6</td>
									<td align="center">empty</td>
									<td width="153" align="center">empty</td>
									<td align="center">40 MHz</td>
								</tr>
								<tr>
									<td align="center">U7</td>
									<td align="center">40 MHz</td>
									<td width="153" align="center">40 MHz</td>
									<td align="center">empty</td>
								</tr>
								<tr>
									<td>
									<p align="center">U18</td>
									<td align="center">BEM 5.0</td>
									<td width="153" align="center">BEM 5.0</td>
									<td align="center">BEM 5.0</td>
								</tr>
							</table>
						</div>
						</td>
						</tr>
					</table>
					</div>
					<p>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
</body>
</html>

⌨️ 快捷键说明

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