633 lines
12 KiB
HTML
633 lines
12 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Configuring the Kernel</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Handspring-Visor with Linux mini-HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Introduction"
|
|
HREF="introduction.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Synchronization Software"
|
|
HREF="syncsoftware.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Handspring-Visor with Linux mini-HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="introduction.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="syncsoftware.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="KERNEL"
|
|
></A
|
|
>3. Configuring the Kernel</H1
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="REQUIREMENTS"
|
|
></A
|
|
>3.1. Requirements</H2
|
|
><P
|
|
> Some obvious things are required, such as a computer,
|
|
USB ports, Handspring Visor (with USB cradle).
|
|
You should also know how to compile and install programs
|
|
and the kernel. If you do not, you have a few options:
|
|
learn, get your resident expert to help you, or get a distro
|
|
with everything prepared for you.
|
|
</P
|
|
><P
|
|
> If you don't have a USB controller for your computer, then
|
|
you need to either buy the serial cradle for the Visor
|
|
(but you wont need this document), or buy a USB-capable
|
|
device for your computer (ie. add-on card or a new
|
|
motherboard).
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="KERNELVERSION"
|
|
></A
|
|
>3.2. Kernel Version</H2
|
|
><P
|
|
> The linux kernel version v2.4 was the first to have USB support. You can get the latest v2.4 kernel from:
|
|
<A
|
|
HREF="ftp://ftp.kernel.org/pub/linux/kernel/v2.4/"
|
|
TARGET="_top"
|
|
>ftp://ftp.kernel.org/pub/linux/kernel/v2.4/</A
|
|
>.
|
|
</P
|
|
><P
|
|
> The USB code has been backported to the v2.2 kernel, starting
|
|
at version v2.2.18. If you must, you should probably be
|
|
able to follow the same instructions with the latest v2.2 kernel
|
|
</P
|
|
><P
|
|
> Now would be a good time to download the latest kernel, and
|
|
configure things to your desire. The following has the
|
|
instructions you need to configure USB.
|
|
</P
|
|
><P
|
|
> If you have already have compiled and installed the kernel,
|
|
you should not need to reboot! All we need to do is
|
|
to compile and install the appropriate modules, and we
|
|
will be all set.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="CONTROLLER"
|
|
></A
|
|
>3.3. USB Controller Type</H2
|
|
><P
|
|
> The first thing to do is o determine which type of USB
|
|
host controller you have. The USB host controller is the
|
|
hardware in your computer which handles USB input/output.
|
|
</P
|
|
><P
|
|
> Motherboards based on Intel chipsets, are
|
|
typically UHCI controllers. Most addon cards are OHCI
|
|
controllers. You can determine the type of USB hardware
|
|
available by using, as root, the following command:
|
|
</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>lspci -v</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
> If you see an entry like:
|
|
</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>USB Controller: ......
|
|
Flags: .....
|
|
I/O ports at ....</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> Then you have a UHCI based controller. If you see an entry like:
|
|
</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>USB Controller: .....
|
|
Flags: ....
|
|
Memory at .....</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> Then you have a OHCI based controller. You could
|
|
refer to <A
|
|
HREF="http://www.linux-usb.org"
|
|
TARGET="_top"
|
|
>http://www.linux-usb.org</A
|
|
>
|
|
for further details. The kernel documentation
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/usr/src/linux/Documentation/usb/usb.txt</TT
|
|
> may
|
|
also be helpful in determining which type of controller
|
|
you have.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="MAKEKERNEL"
|
|
></A
|
|
>3.4. Configure/Build Kernel</H2
|
|
><P
|
|
> Now we need to configure, and make your kernel. During
|
|
configuration, make sure you enable the following entries.
|
|
You may either compile them directly into your kernel,
|
|
or as modules. It is highly recommended that you compile
|
|
them as modules. If you compile them directly in, you will
|
|
need to reboot.
|
|
</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
> USB support (<EM
|
|
>CONFIG_USB</EM
|
|
>)
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> The preliminary USB Device Filesystem
|
|
(<EM
|
|
>CONFIG_USB_DEVICEFS</EM
|
|
>)
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> The appropriate controller - UHCI, or OHCI
|
|
(<EM
|
|
>CONFIG_USB_UHCI</EM
|
|
>, or
|
|
<EM
|
|
>CONFIG_USB_OHCI</EM
|
|
>)
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> USB Serial Converter support
|
|
(<EM
|
|
>CONFIG_USB_SERIAL</EM
|
|
>)
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> USB Handspring Visor Driver
|
|
(<EM
|
|
>CONFIG_USB_SERIAL_VISOR</EM
|
|
>)
|
|
(serial converter's sub-option)
|
|
</P
|
|
></LI
|
|
></UL
|
|
>
|
|
</P
|
|
><P
|
|
> There are two UHCI drivers. You do not want the "UHCI
|
|
Alternate (JE)" driver. This driver does not yet support
|
|
all the USB features which the Visor uses. Thus, you will be
|
|
unable to sync using this driver. If you are unable to
|
|
see the original driver, ensure that the UHCI-JE driver
|
|
is NOT selected, you should then see the option for both
|
|
drivers.
|
|
</P
|
|
><P
|
|
>
|
|
Here, you should decide if you would like to include
|
|
Hotplug support. With Hotplug support, you are able
|
|
to auto-magically sync your visor by only pressing the
|
|
Hotsync button. Please see the
|
|
<A
|
|
HREF="hotplug.html"
|
|
>hotplug section</A
|
|
>, and
|
|
especially the <A
|
|
HREF="hotplug.html#HPKERNEL"
|
|
>Hotplug Kernel
|
|
Config</A
|
|
>, before choosing this route.
|
|
</P
|
|
><P
|
|
> Compile and install as required. Don't forget to run
|
|
lilo. If you are installing a new kernel image, do not
|
|
reboot yet.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="USBDEVFS"
|
|
></A
|
|
>3.5. usbdevfs</H2
|
|
><P
|
|
> <EM
|
|
>usbdevfs</EM
|
|
> puts information about your
|
|
USB bus into the
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/proc</TT
|
|
>
|
|
directory tree. Its a good thing, and can be especially
|
|
useful for debugging. You can enable it by adding the
|
|
following line into your <TT
|
|
CLASS="FILENAME"
|
|
>/etc/fstab</TT
|
|
>.
|
|
</P
|
|
><P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>none /proc/bus/usb usbdevfs defaults 0 0</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> If you installed a new kernel image, you could reboot
|
|
from this point on. Remember, if you are just adding the
|
|
USB info as modules, you do not need to reboot.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="DEVENTRIES"
|
|
></A
|
|
>3.6. Making <TT
|
|
CLASS="FILENAME"
|
|
>/dev</TT
|
|
> Entries</H2
|
|
><P
|
|
> If your linux distro does not come with USB Visor support,
|
|
or if you are NOT using <EM
|
|
>devfs</EM
|
|
> (not
|
|
the same thing as <EM
|
|
>usbdevfs</EM
|
|
>), you will need
|
|
to make the USB tty devices.
|
|
</P
|
|
><P
|
|
> If you are using <EM
|
|
>devfs</EM
|
|
>, these devices are
|
|
automagically created under
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/dev/usb/tts/{0,1,...}</TT
|
|
>; so you can skip
|
|
ahead to <A
|
|
HREF="kernel.html#USINGMODULES"
|
|
>using the modules</A
|
|
>
|
|
</P
|
|
><P
|
|
> If you are not using <EM
|
|
>devfs</EM
|
|
>, you can create
|
|
the devices by executing these commands, as root:
|
|
</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> mknod /dev/ttyUSB0 c 188 0
|
|
mknod /dev/ttyUSB1 c 188 1
|
|
mknod /dev/ttyUSB2 c 188 2
|
|
mknod /dev/ttyUSB3 c 188 3
|
|
etc...
|
|
chmod 666 /dev/ttyUSB*
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> You are able to have up to 255
|
|
connections/ports/devices, but unless you have more than
|
|
one USB serial device, you'll probably only need the first few.
|
|
The chmod is to allow users to be able to access the Visor
|
|
device. It is the opinion of the author of this document
|
|
that this should be safe for a personal computer. Multiuser
|
|
computers may want to look into the security for this
|
|
(please let me know).
|
|
</P
|
|
><P
|
|
> When a Visor connects, there are two "ports" opened. (For
|
|
most people, this will be <TT
|
|
CLASS="FILENAME"
|
|
>/dev/ttyUSB0</TT
|
|
>,
|
|
and <TT
|
|
CLASS="FILENAME"
|
|
>/dev/ttyUSB1</TT
|
|
>). The first port
|
|
(zero), is a generic connection. The second
|
|
port is the hotsync port. This feature allows for future
|
|
developments; for example, to export a filesystem from the
|
|
Visor. A useful thing to do is to create a link to the
|
|
hotsync port so that synchronization software will use the
|
|
appropriate device be default. You can do this by:
|
|
</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> cd /dev
|
|
ln -s /dev/ttyUSB1 pilot
|
|
ln -s /dev/ttyUSB1 palm
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> The software package <SPAN
|
|
CLASS="APPLICATION"
|
|
>pilot-xfer</SPAN
|
|
>
|
|
uses <TT
|
|
CLASS="FILENAME"
|
|
>/dev/pilot</TT
|
|
> by default.
|
|
<SPAN
|
|
CLASS="APPLICATION"
|
|
>coldsync</SPAN
|
|
>
|
|
defaults to <TT
|
|
CLASS="FILENAME"
|
|
>/dev/palm</TT
|
|
>. Create devices
|
|
and links as appropriate. Just for fun, you might also want
|
|
to create a link from <TT
|
|
CLASS="FILENAME"
|
|
>/dev/visor</TT
|
|
> to
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/dev/ttyUSB1</TT
|
|
>, just, well, because
|
|
we have a visor, not a pilot (or Palm(tm)). The actual
|
|
device number may change, depending on how many (active?)
|
|
USB-serial devices you have on your system. A message
|
|
containing the device actually used is entered into syslog.
|
|
Eventually, the idea is to make an entry in the
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/proc</TT
|
|
> filesystem
|
|
which contains the needed information.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="USINGMODULES"
|
|
></A
|
|
>3.7. Using the Modules</H2
|
|
><P
|
|
> For people who compiled the USB code as modules, you
|
|
will also need to insert the modules into the running
|
|
kernel. When you want to use the visor, you will need to
|
|
runt the following commands as root:
|
|
</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> /sbin/modprobe usb-uhci
|
|
/sbin/modprobe usb-ohci
|
|
/sbin/modprobe visor
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> One important note is that the actually driver/device
|
|
connection for <TT
|
|
CLASS="FILENAME"
|
|
>/dev/ttyUSB*</TT
|
|
> are not
|
|
created in the kernel memory until the hotsync button is
|
|
pressed. Therefore, if you try to use any software before
|
|
pressing the hotsync button, it won't work.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="introduction.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="syncsoftware.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Introduction</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Synchronization Software</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |