How to get QLA2xxx working with kernel >=2.6.18 on Gentoo/SPARC

Raúl Porcel  Author
Joshua Saddler  Editor

Updated May 23, 2008

1.  Overview

Booting Linux from a harddrive connected to a QLA2xxx fibre channel adapter (as used in the Sun Blade 1000 and 2000) has become a bit complicated since the firmware has been removed from the kernel (version 2.6.18, commit 441d1072040823feb4950a21094860bfddd310c0).

To make it work with a recent kernel, such as 2.6.24, you need an initramfs that loads the firmware for this driver before the root filesystem is mounted.

2.  Requirements

To create the initramfs, you'll need the following packages:

Important: You need to symlink the kernel sources directory you want to compile to /usr/src/linux.

3.  Configure the kernel

Once you have those packages emerged, you'll need to run the following command:

Code Listing 3.1: Running genkernel

# genkernel --menuconfig --firmware-files=/lib/firmware/ql2200_fw.bin all

After that, you'll need to configure your kernel, and you need the following options:

Code Listing 3.2: Configuration options

General Setup --->
 [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Device Drivers  --->
 SCSI device support  --->
  SCSI low-level drivers  --->
   <M> QLogic QLA2XXX Fibre Channel Support

Which translated to the .config file they would be:

Code Listing 3.3: .config options

CONFIG_BLK_DEV_INITRD=y
CONFIG_SCSI_QLA_FC=m

4.  Installing the kernel and configuring SILO

Once you've configured the kernel, genkernel should start compiling the kernel and building the initramfs. After it finished, it automatically installs to /boot, so now you only need to configure your SILO.

To do so, you only need to edit your silo.conf, which its normally in /etc/silo.conf. Just open it with your favorite editor, and adjust it to suit your needs.

Code Listing 4.1: Sample silo.conf

partition = 1
default = gentoo
timeout = 0

image = /boot/kernel-genkernel-sparc64-2.6.24-gentoo-r4
        label = gentoo
        initrd = /boot/initramfs-genkernel-sparc64-2.6.24-gentoo-r4
        append = "rdinit=/linuxrc real_root=/dev/sda4"