Hey everyone, Johnson's a VIRGIN!
OK, to build a kernel and drivers you need
the source for the kernel and the compiler
to build it (kgcc).
I've been doing the "custom" install of
RedHat 7.0, this allows me to select such
things as code developement and kernel
hacking. I'm not certain what all packages
get installed when selecting these options,
but I do know that the following are vital:
There are probably other packages need as
well. I haven't "hand configured" kernel
building, just used the intallation option.
Any way, the source will be installed in
/usr/src/2.2.16-22. There is also a sybolic
link to this directory at /usr/src/linux. All
of your kernel building will be done in this
Once you are in /usr/src/linux, type:
This will bring up a window showing you all
of the various options for building the
kernel and drivers. The processor in the
I-opener is typically a 586 level processor,
so set that option. In the USB section, you
probably want to build the pegasus driver, so
select the 'm' option for pegasus to build a
module for it.
A word about modules. Linux can be built with
drivers installed into the kernel or the drivers can be built as modules which can be
selectively added to the kernel. The current
USB setup under RedHat 7.0 is run as modules.
Anyway, after you've done the configuration
and saved it, you need to type:
This step provides information on the setup
to all the various sections of the kernel
source tree. It makes certain that all of
the pieces are compiled in the same way, etc.
Now, you are set to compile something! For
the modules, type:
This will build all of the drivers, including
the pegasus module for USB, etc. It will take
a very long time on an I-opener since the
entire machine is rather slow.
If you want to make a new kernel, then type:
This will create a new kernel image down in
If all you want is to add some USB support,
then I would recommend against a new kernel.
The installation of a new kernel involves
put new load maps into /boot and installing
all of the modules for the new kernel in
/lib/modules. Your new kernel will most
likely come out as 2.2.16-23, so you will
need maps and modules for 2.2.16-23, but the
regular 2.2.16-22 kernel is fine as it stands.
OK, let's say you just want to make a nice
pegasus.o module and nothing more. After the
"make modules" command, you would have the
pegasus.o file in /usr/src/linux/drivers/usb.
Copy pegasus.o to /lib/modules/2.2.16-22/usb.
Then, cd to /lib/modules/2.2.16-22 and notice
there is a file "modules.dep". You will need
to edit this file and add an entry for the
new pegasus.o file. The entry looks like:
One line, a space or tab after the ':'.
Doing this allows the module utilites like
modprobe, etc. to know that pegasus.o needs
to have usbcore.o loaded in order to work.
The last thing is to make certain that the
pegasus driver is associatied with your
ethernet device. Add the following to the file /etc/modules.conf:
alias eth0 pegasus
The X windows network setup tool will only
allow you to select a network driver from
the /usr/modules/2.2.16-22/driver/net area.
The addition for pegasus in /etc/modules.conf
gets around this problem.
Anyway, by doing all of this, I was able to
add a line to the pegasus.c file so it would
recognize my D-Link DSB650 adaptor. A lot of
work for just one line, but it allows me to
network my I-opener and write long notes like
This is not as "step-by-step" as I would like
it, but I'll probably add more in time.
Hope this is helpful....
sod ( "The lunatics are on the grass..." )