1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Linux OV511/OV518 Driver: Installing the Kernel</title>
2  
3      
4  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head>
5
6<body>
7 
8<p><big><font color="#990000">NOTE: </font><font color="#990000">You
9only need to do these steps if your kernel doesn't have USB support!
10This information is only valid for the official 2.2 and 2.4 kernels
11from kernel.org. This information is NOT valid for 2.5/2.6 kernels.</font></big><br>
12 </p>
13 
14<p><b><font size="+1"><br>
15 Installing the kernel Source:</font></b><br>
16 <i>NOTE: If you need help with any of these steps, refer to the Linux  
17 Kernel  HOWTO at <a href="http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO.html">
18          http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO.html</a> 
19    . If you don't know how to use the command line, refer to section 10
20 of   <a href="http://www.redhat.com/support/manuals/RHL-7.1-Manual/getting-started-guide/">
21          http://www.redhat.com/support/manuals/RHL-7.1-Manual/getting-started-guide/</a></i></p>
22  If you don't have kernel source installed on your   system: 
23<ol>
24   <li> Use the links on the download page to get   the 2.2 or 2.4
25kernel that is compatible with your system.</li>
26   <li> Follow the steps at <a href="http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO-4.html">
27          http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO-4.html</a>
28      to unpack your kernel. Stop when you get to the section on kernel configuration.</li>
29   <li> Unless you know what configuration options   to choose, I recommend 
30  you do the following:</li>
31   
32  <ol>
33     <li> Get a kernel from your distributor   (RedHat, SuSe, etc...) and 
34install it (make sure to move the kernel source   you unpacked in the previous 
35step to a safe location so it doesn't get overwritten.   It doesn't matter 
36if it is older than the kernel you are installing, as long  as both are 2.2 
37 or both are 2.4)</li>
38     <li> These kernels usually come with  some  default configurations.
39RedHat   puts them in the <tt>/usr/src/linux/configs/</tt>      directory.
40Copy the one   that is most appropriate for your system to          <tt>
41 /usr/src/&lt;name of new  kernel&gt;/.config</tt>  (notice the '.' -- that
42 means that it is a "hidden"  file).</li>
43     <li> Get rid of the kernel source from your  distributor  and rename 
44your new   kernel back to <tt>/usr/src/linux</tt>   .</li>
45     <li> Some distributions have the kernel   header files in /usr/include 
46  set up wrong. Make sure that <tt>/usr/include/linux</tt>      is a symbolic 
47link   pointing to <tt>/usr/src/linux/include/linux</tt>    and         <tt>
48 /usr/include/linux</tt>     is a symbolic link pointing  to         <tt>
49 /usr/src/linux/include/asm</tt>. If  these are directories  instead of symbolic 
50links, delete them and use the "<tt> ln -s</tt>" command  to create the symbolic 
51links. For example, "<tt>  ln -s /usr/src/linux/include/linux   /usr/include/linux</tt>
52  ".</li>
53     <li> cd to <tt>/usr/src/linux</tt>,  and  run "<tt>make oldconfig</tt>
54     " . This will update the config file  to match  your current kernel
55version,   prompting you for new options.</li>
56   
57  </ol>
58 
59</ol>
60 
61<p><br>
62 <b><font size="+1">Configuring and building the kernel:</font></b><br>
63 <i>NOTE: For more information on the following steps, read the <u>  Linux-USB 
64    Guide</u>, at <a href="http://www.linux-usb.org/USB-guide/book1.html">
65     http://www.linux-usb.org/USB-guide/book1.html</a></i></p>
66 
67<ol>
68   <li> From <tt>/usr/src/linux</tt>, run either "<tt>make   menuconfig</tt>
69     " for a text-mode configuration program, or "<tt>make  xconfig</tt>
70" for  a graphical configuration program.</li>
71   <li> Enable Video4Linux support. In 2.2 kernels, it  is  "<b>Character 
72Devices-&gt;Video   For Linux-&gt;Video For Linux</b>",  and  in 2.4/2.5 kernels
73it is "<b>Multimedia   Devices-&gt;Video For Linux</b>  ". You  can set this
74to "M" (module) or "Y"   (built into kernel).</li>
75   <li> If you have a 2.4/2.5 kernel, enable "<b>Multimedia  Devices-&gt;Video 
76 For Linux-&gt;Video For Linux-&gt;V4L information in proc  filesystem</b>
77 "</li>
78   <li> USB Configuration:</li>
79   
80  <ol>
81     <li> Enter the "<b>USB support</b>" menu and  enable  "<b>Support For 
82USB</b>    " (Y or M)</li>
83     <li> Enable "<b>Preliminary USB device filesystem</b>"</li>
84     <li><u>DISABLE</u> "<b>Enforce USB bandwidth   allocation</b>".
85NOTE: This option will be disabled by default and will not be visible
86if you have CONFIG_EXPERIMENTAL disabled (it's the very first option in
87the kernel configuration).</li>
88     <li> Enable a USB controller driver (UHCI, UHCI   Alternate, or OHCI). 
89"<tt>  lspci -vv</tt>" should tell you whether you have  UHCI or OHCI (hint: 
90Intel controllers are UHCI). Either UHCI driver should  work, but I recommend 
91that you use UHCI instead of UHCI Alternate. If you  don't know which to choose,
92  set all three to "M".</li>
93     <li> Set "<b>USB OV511 Camera support</b>" to  "M".</li>
94   
95  </ol>
96   <li> Rebuild the kernel (this will be slightly different   for non-Intel 
97systems):</li>
98   
99  <ol>
100     <li><tt>make dep</tt></li>
101     <li><tt>make clean</tt></li>
102     <li><tt>make bzImage</tt></li>
103     <li><tt>make modules</tt></li>
104     <li><tt>make modules_install</tt></li>
105   
106  </ol>
107   <li> Copy <tt>arch/i386/boot/bzImage</tt> to your /boot   directory. Give 
108  it a unique name like "<tt>vmlinux-2.4.4-usb</tt>", and   be sure you don't 
109  overwrite your existing kernel!!</li>
110   <li>If you boot from anything other than IDE, you will probably have 
111to  create a new initial ramdisk (initrd) image:</li>
112 
113</ol>
114 
115<blockquote>   
116  <blockquote><tt>mkinitrd /boot/initrd-2.4.4.img 2.4.4</tt><br>
117     </blockquote>
118     </blockquote>
119     
120    <ol start="8">
121       <li>Set up your bootloader:<br>
122       </li>
123     
124    </ol>
125     
126    <blockquote><b>If you use LILO as your bootloader:</b></blockquote>
127       
128      <blockquote>         
129        <blockquote>Edit your <tt>/etc/lilo.conf</tt> file. This contains
130   sections that   start with an "image = " line. Do not change them unless
131  you know what you   are doing. Instead, copy one of those sections to the
132  bottom of the file,   and change the filename in the "image" line to that
133  of your kernel file.  Change the "label" line to whatever you want (e.g.
134 "linux-2.4-usb"). This  is the name that you will type at the LILO prompt
135 to boot your kernel. The  "root" line tells where your root filesystem is
136 stored. Make sure it is the  same as with your other kernels. Here is an
137example from my <tt>/etc/lilo.conf</tt>      :</blockquote>
138           </blockquote>
139           
140          <ol>
141             
142            <ol>
143               
144              <ol>
145                 
146                <pre>image=/boot/vmlinuz-2.4</pre>
147               
148              </ol>
149               
150              <ol>
151                 
152                <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label=linux-2.4</pre>
153               
154              </ol>
155               
156              <ol>
157                 
158                <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; read-only</pre>
159               
160              </ol>
161               
162              <ol>
163                 
164                <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root=/dev/sda5</pre>
165               
166              </ol>
167             
168            </ol>
169           
170          </ol>
171           
172          <blockquote>             
173            <blockquote> Save the file, and run the "lilo" command. You can
174   safely ignore most   warnings.<br>
175               </blockquote>
176               <b>If you use GRUB as your bootloader</b> (this is the RedHat 
177  7.2 default):<br>
178               
179              <blockquote>Edit /etc/grub.conf, and copy your current boot 
180  selection (the section beginning with "title" and all of the indented lines 
181  afterward). Edit the new selection so that the "kernel" and "initrd" (if 
182 necessary) lines refer to your new kernel files. You do not need to run
183any commands afterward.<br>
184                 </blockquote>
185                 </blockquote>
186                 
187                <ol start="9">
188                   <li>Add the following line to your <tt>/etc/fstab</tt>
189    file: &nbsp;<tt>    none /proc/bus/usb usbdevfs defaults 0 0&nbsp;</tt>
190   &nbsp;</li>
191                   <li>Reboot with the new kernel. If it works, you can 
192set  it to be the default in lilo.conf (don't forget to run lilo again afterward!),
193or in grub.conf.</li>
194                 
195                </ol>
196                 
197                </body></html>