beautypg.com

6 updating drivers in the freebsd system, 1 updating the kernel with the new driver source, Section 6.6.1 – Avago Technologies MegaRAID SAS 9240-4i User Manual

Page 30: Updating the kernel with the new driver source, Er installation in, Section 6.6.1, updating the kernel with the, New driver source

background image

LSI Corporation

- 30 -

MegaRAID SAS Device Driver Installation User Guide

December 2012

Chapter 6: FreeBSD Driver Installation

Updating Drivers in the FreeBSD System

6.6

Updating Drivers in the FreeBSD System

You can update drivers either from source files or with driver modules. By using source files, you can compile drivers
into the kernel, or you can create modules for versions of the FreeBSD OS for which LSI does not supply modules.

This section includes these topics:

Updating the kernel with the new driver source

Compiling and loading the driver as a module using kldload (dynamically loadable module)

Updating the MegaRAID kernel driver module in the FreeBSD OS

6.6.1

Updating the Kernel with the New Driver Source

To obtain the source files, see

Section 6.2, Obtaining LSI FreeBSD Drivers

.

Perform the following steps to update your kernel with the driver source files:

1.

Make sure that the kernel source has been installed on the system.

The kernel sources are in the /usr/src/sys directory.

2.

Go to the /usr/src/sys/dev/ directory and perform the following steps.

a.

Check to see whether a directory with the driver name already exists. If a directory already exists, move it to a
different folder.

For example, to move the mfi driver, type the following command and press Enter:

# mv /usr/src/sys/dev/mfi /root/mfi.backup

To move the mrsas driver, type the following command and press Enter:

# mv /usr/src/sys/dev/mrsas /root/mrsas.backup

b.

Make sure the directory exists.

For example, to make sure the mfi directory exists, type the following command and press Enter:

# mkdir /usr/src/sys/dev/mfi

To make sure the mrsas directory exists, type the following command and press Enter:

# mkdir /usr/src/sys/dev/mrsas

3.

Proceed to the /usr/src/sys/modules/ directory, and check to see whether a directory with the name of
your driver already exists. If the directory already exists, move it to a different folder.

a.

Check to see whether a directory with the driver name already exists. If a directory already exists, move it to a
different folder.

For example, to move the mfi driver module, type the following command and press Enter:

# mv /usr/src/sys/modules/mfi /root/mfi_module.backup

To move the mrsas driver module, type the following command and press Enter:

# mv /usr/src/sys/modules/mrsas /root/mrsas_module.backup

b.

Make sure the directory exists.

For example, to make sure the mfi directory exists, type the following command and press Enter:

# mkdir /usr/src/sys/modules/mfi

To make sure the mrsas directory exists, type the following command and press Enter:

# mkdir /usr/src/sys/modules/mrsas

4.

Perform the following steps:

a.

Unpack the compressed driver source file (mfi.tgz for the mfi driver and mrsas.tgz for the mrsas driver).