C H A P T E R  6

Manually Installing the B100x and B200x Linux Kernel Drivers

This chapter provides information on how to rebuild and reinstall the Linux drivers for a B100x or B200x kernel upgrade. It includes the following sections:



Note - This chapter does not describe how to perform a kernel upgrade. For information on how to upgrade your kernel, refer to the documentation for the version of Linux you have installed.




6.1 Introduction

The Linux kernel provides the underlying services to the rest of a Linux distribution. If you replace the Linux kernel, you must reinstall the blade kernel drivers in the new kernel environment. Failure to reinstall the kernel drivers may result in loss of network connectivity and will result in the loss of other facilities such as network failover and BSC services.


6.2 Before Upgrading the Linux Kernel

Before you upgrade the Linux kernel you must copy the driver source files on to the blade. This is necessary in case the kernel upgrade results in the loss of network connectivity.

When selecting the drivers to be built in the new environment, the latest version of the drivers for the system you are upgrading should be used. Use the following table to determine the driver directory you require:

Installed OS

Driver Directory

Red Hat Enterprise Linux, Advanced Server 2.1

/src/as-2.1u3

Red Hat Enterprise Linux, version 3.0

/src/el-3.0u1

SuSE Linux Enterprise Server 8

/src/sles-8sp3


single-step bulletCopy the driver files from a server that has the Sun drivers installed:

mkdir /root/build
cd /root/build
scp server:/src/common/install/memdiag/memdiag-1.0/driver/highmem.c .
scp server:/src/common/install/bios/mtdbios.c .
scp server:/src/common/install/bsc/*.* .
scp server:/src/common/install/failover/failover.? .
scp server:/src/common/install/pwrbtn/pwrbtn.c .
scp server:/src/common/install/sunecc/sunecc.c .
scp server:<DriverDir>/install/suntg3/suntg3.? .
scp server:<DriverDir>/install/pci_ids.h .

where <DriverDir> is the required driver directory listed in the table above.


6.3 After Upgrading the Linux Kernel

1. Ensure that the system compiler is installed:

rpm -q -a | fgrep gcc

If gcc is not installed, it must be installed using the rpm -i command.

2. Ensure that the kernel sources are installed:

rpm -q -a | fgrep kernel-sources

If the kernel sources are not installed, they must be installed using the rpm -i command.

3. Remove any kernel build files that are not required:

cd /usr/src/linux-<kernel version>
find . -name .depend | xargs rm -f
find include/linux/modules ( -name \*.ver -o -name \*.stamp ) | xargs rm -f
rm -f include/linux/autoconf.h

where <kernel version> is the version of the kernel you have upgraded to.

4. Modify the kernel Makefile to match your kernel:

sed 's/custom/smp/' Makefile >Makefile.new && mv -f Makefile.new Makefile



Note - If you are running on a uniprocessor kernel, change the sed argument to s/custom//



5. Finish removing build files that are not required, install the configuration and prepare the environment:

make mrproper
cp configs/kernel-<kernel version>-i686-smp.config .config
make oldconfig
make dep

where <kernel version> is the version of the kernel you have upgraded to.



Note - If you are running on a uniprocessor kernel, change the configuration file name to kernel-<kernel version>-athlon.config



6. Change the directory to the location of the driver files, and build the drivers:

cd /root/build
KINC=/usr/src/linux-<kernel version>/include
INC="-I. -I$KINC -include $KINC/linux/modversions.h"
CFLAGS="$INC -Wall -O2 -D__KERNEL__ -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB"
rm -f linux
ln -s . linux
 
cc -c $CFLAGS -o suntg3.o suntg3.c
cc -c $CFLAGS -o bsc.o bsc.c
cc -c $CFLAGS -o sunecc.o sunecc.c
cc -c $CFLAGS -o failover.o failover.c
cc -c $CFLAGS -o highmem.o highmem.c
cc -c $CFLAGS -o pwrbtn.o pwrbtn.c
 
mtdd=/usr/src/linux-<kernel version>/drivers/mtd
cc -c $CFLAGS -I$mtdd -o mtdcore.o $mtdd/mtdcore.c
cc -c $CFLAGS -I$mtdd -o mtdchar.o $mtdd/mtdchar.c
cc -c $CFLAGS -I$mtdd -o mtdbios.o mtdbios.c

where <kernel version> is the version of the kernel you have upgraded to.

7. Install the drivers:

mkdir -p /lib/modules/<kernel version>smp/kernel/misc
mkdir -p /lib/modules/<kernel version>smp/kernel/drivers/mtd
mv -f suntg3.o /lib/modules/<kernel version>smp/kernel/drivers/net/suntg3.o
mv -f bsc.o /lib/modules/<kernel version>smp/kernel/drivers/misc/bsc.o
mv -f sunecc.o /lib/modules/<kernel version>smp/kernel/drivers/char/sunecc.o
mv -f failover.o /lib/modules/<kernel version>smp/kernel/drivers/net/failover.o
mv -f highmem.o /lib/modules/<kernel version>smp/kernel/drivers/char/highmem.o
mv -f mtdcore.o /lib/modules/<kernel version>smp/kernel/drivers/mtd/mtdcore.o
mv -f mtdchar.o /lib/modules/<kernel version>smp/kernel/drivers/mtd/mtdchar.o
mv -f mtdbios.o /lib/modules/<kernel version>smp/kernel/drivers/mtd/mtdbios.o
mv -f pwrbtn.o /lib/modules/<kernel version>smp/kernel/drivers/misc/pwrbtn.o

where <kernel version> is the version of the kernel you have upgraded to.



Note - If you are running on a uniprocessor kernel, remove the smp part of the path name.



8. Recreate the initrd file:

where <kernel version> is the version of the kernel you have upgraded to.



Note - If you are running on a uniprocessor kernel, remove the smp part of the path name.



The lilo command is required only if you are using the LILO bootloader. If you are using the GRUB bootloader, only the mkinitrd command is required.

9. Restart your system and select the new kernel from the boot menu.