Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:

Add Support for qla2200/qla2300

by Riccardo Capecchi (Contributing Writer)

After an upgrade from RH9 I spent today making our "shining new" server with Fedora Core 1 to talk with his disk through a QLA2200 adapter.

Fedora standard Kernel doesn't include support for any qlogic card, so you have to rebuild your kernel to add support for these adapters.
This is what I have done:

1) Fedora Kernel is built with gcc 3.2, but the standard now is 3.3, so you have to download and install package gcc32-3.2.3-6 (this is the update version while I'm writing, you can download it here, or you can use apt or yum)

2) Download and install last kernel source, I installed kernel-source-2.4.22-1.2149.nptl

3) Cd to /usr/src/linux-2.4/drivers/addon/ and edit the file, you'll see 2 lines commented:

#dep_tristate '   Experimental QLogic 2100/2200 support' CONFIG_FC_QLA2200 $CONFIG_PCI m
#dep_tristate '   Experimental QLogic 2300 support' CONFIG_FC_QLA2300 $CONFIG_PCI m
uncomment one or both (check your hardware) to something like this
dep_tristate '   Experimental QLogic 2100/2200 support' CONFIG_FC_QLA2200 $CONFIG_PCI m
dep_tristate '   Experimental QLogic 2300 support' CONFIG_FC_QLA2300 $CONFIG_PCI m

4) In the same directory edit the file Makefile and change this line:

mod-subdirs     := cipe aep bcm
mod-subdirs     := cipe aep bcm qla2200
Then add one or both of these lines:
subdir-$(CONFIG_FC_QLA2200) += qla2200
subdir-$(CONFIG_FC_QLA2300) += qla2200
I put these just after

5) Cd to /usr/src/linux-2.4 and copy from the configs directory the config for your hardware:

$ cd /usr/src/linux-2.4
$ cp configs/kernel-2.4.22-i686-smp.config .config

6) In the same directory (/usr/src/linux-2.4) run:

$ make menuconfig
Check under "Additional device driver support" to have your qlaxxxx set to M, after this save and exit.

7) Compile as usual the kernel:

$ make dep
$ make clean
$ make bzImage
$ make modules
$ make modules_install

8) Check in the dir /lib/modules/yourkernelcustom/kernel/drivers/addon to have qla2200 dir, and the object inside that dir:

$ ls  /lib/modules/2.4.22-1.2149.nptlcustom/kernel/drivers/addon/
aep  bcm  cipe  qla2200

$ ls  /lib/modules/2.4.22-1.2149.nptlcustom/kernel/drivers/addon/qla2200
qla2200.o  qla2300.o
If you miss the dir or the modules check point 3 and 4 again.

9) If you are here we have almost ended :). Change dir to /boot and run:

$ cd /boot
$ mkinitrd initrd-custom-2.4.22-1.2149.nptlsmp.img 2.4.22-1.2149.nptlcustom
This creates under /boot the file initrd-custom-2.4.22-1.2149.nptlsmp.img

10) cp your bzImage and under /boot

$ cp /usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-custom-2.4.22-1.2149.nptlsmp
$ cp /usr/src/linux-2.4/ /boot/

11) cd /boot and update the link to

$ cd /boot
$ ln -sf

12) Add an entry into your grub for the new kernel, edit the file /boot/grub/grub.conf and add something like this:

title Fedora Core (2.4.22-1.2149.nptlsmp) custom
       root (hd0,0)
       kernel /vmlinuz-custom-2.4.22-1.2149.nptlsmp ro root=/dev/YOURROOTPARTITION
       initrd /initrd-custom-2.4.22-1.2149.nptlsmp.img

13) Reboot and good luck :)