Ai
3 Star 1 Fork 1

Gitee 极速下载/linuxconsole

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/flosse/linuxconsole
克隆/下载
quick.html 13.19 KB
一键复制 编辑 原始数据 按行查看 历史
James Simmons 提交于 2007-04-08 21:01 +08:00 . cleanup our tree
<!DOCTYPE "-//IETF//DTD HTML 3.2//EN" PUBLIC>
<html>
<head>
<meta name="description" content="Linux Console Project">
<meta name="keywords" content="console terminal TTY serial joystick gamepad keyboard mouse wheel force feedback touchpad tablet input device linux driver gnu">
<title>Linux Input Drivers</title>
<LINK REV=MADE HREF="mailto:jsimmons@transvirtual.com">
</head>
<body text="#000000" bgcolor="#ffffff">
<table border=0 cellspacing=0 cellpadding=0 width="100%" bgcolor="#FFFFFF">
<tr><td><img SRC="input/l1i.png" border=0 width=32 height=64 alt=""><br></td><td width="100%" background="input/m1i.png">
<img src="input/title.png" border=0 alt="Linux Input Drivers" width=512 height=64><br></td><td>
<img SRC="input/r1i.png" border=0 width=32 height=64 alt=""><br></td></tr>
<tr><td><img src="input/l2i.png" border=0 width=32 height=16 alt=""><br></td><td></td><td>
<img SRC="input/r2i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td background="input/l3i.png"><img src="input/l3i.png" border=0 width=32 height=16 alt=""><br></td><td>
<div align=center><strong>
<a href="input/input.html">InputMain</a> -
<a href="index.html">LinuxConsole</a><br>
</strong></div></td><td background="input/r3i.png"><img src="input/r3i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td><img src="input/l4i.png" border=0 width=32 height=16 alt=""><br></td><td>
</td><td><img SRC="input/r4i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td><img src="input/l6i.png" border=0 width=32 height=16 alt=""><br></td><td background="input/m2i.png">
<img src="input/m2i.png" border=0 width=32 height=16 alt=""><br></td><td>
<img src="input/r6i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td><img src="input/l2i.png" border=0 width=32 height=16 alt=""><br></td><td>
</td><td><img SRC="input/r2i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td background="input/l3i.png"><img src="input/l3i.png" border=0 width=32 height=16 alt=""><br></td><td>
<!----------------------------------------------------------------------------------------------------------->
<h2>Quick Start</h2>
This section describes how to download, compile and use the Input Drivers.
Change to your source directory, fasten your seatbelts, and here we go:
<p>
<code>
cd /usr/src<br>
</code>
<p>
<h2><a name="download">Download</a></h2>
<p>
You can get the development tree and necessary utilities via
<a href="http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/ruby/?cvsroot=linuxconsole">CVS</a>.
To access the CVS you can use the following commands (use an empty password):
<p>
<code>
cvs -d :pserver:anonymous@cvs1.sourceforge.net:/cvsroot/linuxconsole login<br>
cvs -z3 -d :pserver:anonymous@cvs1.sourceforge.net:/cvsroot/linuxconsole checkout ruby<br>
</code>
<p>
Once you have downloaded the CVS, you can always update it to the most recent version using
the following command:
<p>
<code>
cvs -z3 update ruby<br>
</code>
<p>
<h2>Patching</h2>
<p>
To compile and use the files you download, you first have to get a 2.5
kernel to use the drivers with. You can get it from
<code><a href="ftp://ftp.kernel.org/pub/linux/kernel/v2.4/">ftp.kernel.org</a></code>.
<p>
<code>
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.5/linux-2.5.27.tar.bz2<br>
tar xjvf linux-2.5.27.tar.bz2<br>
</code>
<p>
When you've got the kernel unpacked, you have to copy the ruby files over
it, and clean files not used anymore:
<p>
<code>
cd ruby/linux<br>
cp -avP * ../../linux-2.5.27/<br>
cd ../../linux-2.5.27<br>
sh ../ruby/utils/remove-obsolete-files<br>
</code>
<p>
<h2>Configuration</h2>
<p>
Then you configure the kernel:
<p>
<code>
make menuconfig<br>
</code>
<p>
You will see because the subsystems that compose the different types of
TTYs can exist independently that even the main menu has changed. You will
noticed in the top level menu we now have:
<p>
<code>
Parallel port support ---&gt;<br>
Serial drivers ---&gt;<br>
Block devices ---&gt;<br>
</code>
<p>
and we have:
<p>
<code>
USB support ---&gt;<br>
Input device support ---&gt;<br>
Character devices ---&gt;<br>
Graphics support ---&gt;<br>
</code>
<p>
This order is important since the devices in the next menu depend on the
devices before them.
Also we have renamed the Console driver menu to:
<p>
<code>
Video ---&gt;<br>
</code>
<p>
The Serial Driver menu selects the new experimental serial drivers based on
Russel King's code from the ARM tree. We have taken this code to make it less
and less TTY dependent. This menu comes before the input and char menus since
alot of things are effected by this. If you select the new serial drivers you
can't select the old drivers. This prevents clashes. If you decided to try out
the new serial drivers you will see:
<p>
<code>
&nbsp;&nbsp; Serial port support<br>
</code>
<p>
If you enable it for the ix86 platform you will see:
<p>
<i>In 2.5.27, these options are still under "Character Devices"</i><p>
<code>
&nbsp;&nbsp; Serial port support<br>
&nbsp;&nbsp; 8250/16550 and compatible serial support (EXPERIMENTAL) (NEW)<br>
</code>
<p>
Now if you enable 8250/16550 support you will see support for a serial console
on the 8250/16550. You will also see support for extended options for more
advance 16550 types devices. Enabling extended options you will end up seeing:
<p>
<code>
&nbsp;&nbsp; Serial port support<br>
&nbsp;&nbsp; 8250/16550 and compatible serial support (EXPERIMENTAL) (NEW)<br>
&nbsp;&nbsp; Console on 8250/16550 and compatible serial port (EXPERIMENTAL)<br>
&nbsp;&nbsp; Extended 8250/16550 serial driver options<br>
&nbsp;&nbsp; Support more than 4 serial ports<br>
&nbsp;&nbsp; Support for sharing serial interrupt<br>
&nbsp;&nbsp; Autodetect IRQ on standard ports (unsafe)<br>
&nbsp;&nbsp; Support special multiport boards<br>
&nbsp;&nbsp; Support Bell Technologies HUB6 card<br>
</code>
<p>
Now you have finished the serial configuration if you decided to give it a
try we go on to configuring your Input Drivers. This part is a little tricky.
You have to select quite a bunch of options to have your system operate
correctly. For a most usual setup with a PS/2 mouse and a AT keyboard you
need to select:
<p>
<code>
Input device support ---&gt;<br>
&nbsp;&nbsp;Input core support<br>
&nbsp;&nbsp;Keyboard Interface<br>
&nbsp;&nbsp;Mouse interface<br>
&nbsp;&nbsp;Event interface<br>
&nbsp;&nbsp;Serial i/o support ---&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;i8042 PC Keyboard controller<br>
&nbsp;&nbsp;Keyboards ---&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;AT keyboard support<br>
&nbsp;&nbsp;Mice ---&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;PS/2 mouse<br>
</code>
<p>
The reason for this is because the i8042 chipset that controls PS/2 devices
is used on many platforms. A result of this is often the way to program the
chip varies. So the input api was designed to be modular for this. This
allows us to use the same PS/2 keybaord driver on different platforms. It
is the underlying driver for the chipset that could vary. For example I can
use the same PS/2 keyboard for my intel box as well as for the iPAQ I have.
I have a special adapter that allows me to plug in my PS/2 keyboard into an
iPAQ.
<p>
For a setup with an USB mouse and keyboard you'd use:
<p>
<code>
USB support ---&gt;<br>
&nbsp;&nbsp;Support for USB<br>
&nbsp;&nbsp;USB device filesystem<br>
&nbsp;&nbsp;OHCI support<br>
&nbsp;&nbsp;UHCI (most Intel and VIA) support<br>
Input device support ---&gt;<br>
&nbsp;&nbsp;USB Human Interface Device (full HID) support<br>
&nbsp;&nbsp;&nbsp;&nbsp;HID input layer support<br>
</code>
<p>
The USB selection above will be in the USB menu.
<p>
Please note the Event
interface can be used with any type of input device.
This is how we can access keyboards with a tty as well as talk to touchscreens,
joysticks, mice, and other various devices in a standard way. The mouse
interface is for backwards compatibility. Please use the Event interface for
userland apps.
For serial mice you need:
<p>
<code>
Input device support ---&gt;<br>
&nbsp;&nbsp;Mouse interface<br>
&nbsp;&nbsp;Event interface<br>
&nbsp;&nbsp;Serial i/o support<br>
&nbsp;&nbsp;&nbsp;&nbsp;Serial port input line discipline<br>
&nbsp;&nbsp;Mice<br>
&nbsp;&nbsp;&nbsp;&nbsp;Serial mouse<br>
</code>
<p>
And in your init scripts a call to the inputattach utility (can be found in
the utils subdir in the ruby tree). See the help for this utility about what
the command line will be for your mouse - there are quite a couple different
types of them. Over time the inputattach utility has grow to be used with a
varity of different types of serial devices besides mice. We hope with the
serial layer being written that in the future you will not need this.
<p>
<code>
&nbsp;&nbsp;inputattach -t mman /dev/ttyS0 &amp;<br>
</code>
<p>
To get an analog joystick working, you add:
<p>
<code>
Input device support ---&gt<br>
&nbsp;&nbsp;Joystick interface<br>
&nbsp;&nbsp;Gameport support<br>
&nbsp;&nbsp;&nbsp;&nbsp;Classic ISA and PnP gameport support<br>
</code>
<p>
For other joystick types and gameport types you can select other joystick
and gameport drivers if you have them. The same for mice, keyboards and
other drivers.
Please note the Event interface can be used with any type of input device.
This is how we can access keyboards with a tty as well as talk to touchscreens,
joysticks, mice, and other various devices in a standard way. The mouse
interface is for backwards compatibility. Please use the Event interface for
userland apps.
<p>
Now that you have all your input devices configured now to the graphics
devices and the VT layer. Remember you don't need the Console system to
access your keyboard, but you do need Input support for the VT Console
system. The same is also true for the framebuffer drivers. Go from the
top menu into:
<p>
<code>
Character devices ---&gt<br>
</code>
<p>
Now you will see something like:
<p>
<code>
&nbsp;&nbsp;Virtual terminal<br>
&nbsp;&nbsp;&nbsp;&nbsp;Support for console on virtual terminal<br>
</code>
<p>
You need to enable these if you want standard VT support. Now for say
a embedded device which lacks a keyboard you don't need to select this.
You can just use the input layer to access your device instead and the
framebuffer to access the display if it has one.
If you don't see:
<p>
<code>
&nbsp;&nbsp;Standard/generic (8250/16550 and compatible UARTs) serial support<br>
</code>
<p>
This just means you will use the new serial drivers instead. Select the other
devices you need in the character menu and then we can go onto the Video menu.
When you enter the Graphics support menu you will see either:
<p>
<code>
&nbsp;Support for frame buffer devices (EXPERIMENTAL)<br>
&nbsp;Frame-buffer support ---&gt<br>
</code>
<p>
You would see the above if you didn't select VT support. This would be
what you would want for a embedded device lacking a keyboard. Or if we
selected VT support we see:
<p>
<code>
&nbsp;Support for frame buffer devices (EXPERIMENTAL)<br>
&nbsp;Frame-buffer support ---&gt<br>
&nbsp;--- Console drivers<br>
&nbsp;VGA text console<br>
&nbsp;Video mode selection support<br>
&nbsp;MDA text console (EXPERIMENTAL)<br>
&nbsp;NVIDIA hardware text console<br>
&nbsp;Support for frame buffer console<br>
&nbsp;&nbsp;&nbsp;Select compiled-in fonts<br>
</code>
<p>
Even with VT support we still can select framebuffer support without
framebuffer console support.
When you're done with configuring the kernel, you compile and install it
(make sure your /etc/lilo.conf has an entry for this new kernel):
<p>
<code>
make dep modules modules_install bzImage<br>
cp arch/i386/boot/bzImage /boot/vmlinuz<br>
lilo<br>
</code>
<p>
If you're not using devfs, you also need to change a few nodes in
/dev to keep a working system after you boot with the new kernel:
<p>
<code>
cd /dev<br>
mkdir old<br>
mv mouse js? old<br>
mkdir input<br>
cd input<br>
mknod js0 c 13 0<br>
mknod js1 c 13 1<br>
mknod js2 c 13 2<br>
mknod js3 c 13 3<br>
mknod mouse0 c 13 32<br>
mknod mouse1 c 13 33<br>
mknod mouse2 c 13 34<br>
mknod mouse3 c 13 35<br>
mknod mice c 13 63<br>
mknod event0 c 13 64<br>
mknod event1 c 13 65<br>
mknod event2 c 13 66<br>
mknod event3 c 13 67<br>
cd ..<br>
ln -s input/js0 js0<br>
ln -s input/js1 js1<br>
ln -s input/mice mouse<br>
</code>
<p>
After this, reboot, load any modules you didn't compile straight into the
kernel, and everything should work. If it doesn't, well, something went
wrong.
<p>
<!----------------------------------------------------------------------------------------------------------->
<address>
<p>Send any questions, comments, bug reports to:
<a href="mailto:vojtech@suse.cz">Vojtech Pavlik &lt;vojtech@suse.cz&gt;</a></p>
</address>
<div align=center>
<a href="http://www.suse.cz/"><img src="input/sponsor.png" alt="Sponsored by SuSE" border=0 width=298 height=61></a>
</div>
</td><td background="input/r3i.png"><img src="input/r3i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td><img src="input/l5i.png" border=0 width=32 height=16 alt=""><br></td><td>
</td><td><img src="input/r5i.png" border=0 width=32 height=16 alt=""><br></td></tr>
<tr><td><img src="input/l7i.png" border=0 width=32 height=16 alt=""><br></td><td background="input/m2i.png">
<img src="input/m2i.png" border=0 width=32 height=16 alt=""><br>
</td><td><img src="input/r7i.png" border=0 width=32 height=16 alt=""><br></td></tr>
</table>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/linuxconsole.git
git@gitee.com:mirrors/linuxconsole.git
mirrors
linuxconsole
linuxconsole
master

搜索帮助