Compiling separate/external drivers for LinPE
search cancel

Compiling separate/external drivers for LinPE

book

Article ID: 185042

calendar_today

Updated On:

Products

Deployment Solution

Issue/Introduction

Please refer to “Compiling Non-Default Kernel Drivers for Linux Preboot ( LinPE )” and prepare required build environment before proceeding with this tutorial.
The example that follows, is to compile CCISS driver. These steps can be guideline for compiling any other external driver.

Resolution

  1. Download the external driver from the following URL:
    http://sourceforge.net/projects/cciss/files/cciss-4.6-tarballs/
  2. Save this to a folder on the kernel build computer from the previous tutorial.
  3. Extract the contents of the folder and change the directory to that folder.
  4. Follow the instructions from the README.
  5. Copy headers to the source folder of the kernel.
    cp <cciss_source_dir>/include/cciss_ioctl.h  <kernel_source_dir>.../include/linux 
    cp <cciss_source_dir>/include/cciss_defs.h  <kernel_source_dir>.../include/linux
     
  6. Uncomment “#define” for the OS being built on in 
    <cciss_source_dir>/drivers/block/cciss_kernel_compat.h
  7. Now Compile. 
    Go to folder “<cciss_source_dir>/driver/block”
    and execute  “make –C  <kernel_source_dir> SUBDIRS=$PWD modules”

    Generated cciss.ko file can be included to Linux Preboot with below script once the computer boots into Automation ( LinPE ).


Loading Driver in Linux Preboot ( LinPE )
Driver can be loaded into Linux Preboot using the following commands:

  1. Create opt/ folder under /lib/modules/2.6.32/kernel/opt
    Copy driver file ( .ko ) to Linux Preboot (eg. /lib/modules/2.6.32/kernel/opt/ )
  2. Go to the directory where the driver is copied.
  3. Execute depmod –ae
  4. ​Execute modprobe <dirvername> ( eg modprobe cciss) ​