Compiling drivers for Linux automation in Ghost Solution Suite
search cancel

Compiling drivers for Linux automation in Ghost Solution Suite

book

Article ID: 181055

calendar_today

Updated On:

Products

Ghost Solution Suite Client Management Suite IT Management Suite

Issue/Introduction

How do I compile drivers for Linux automation in Ghost Solution Suite?

Environment

GSS 3.x

Resolution

Compiling drivers for Linux and adding them to your Linux Automation image

This article explains how to compile drivers for Linux automation and add them to your Linux image.  The following steps can be used for LinPE based on frm2 (6.9.11004+) file that was delivered with GSS 3.3 RU8 or newer release:

With new frm we recommend to build drivers directly on LinPe environment

Boot from LinPE (x86 or x64 correspondingly)

It will be more convenient to set up an SSH server and work over SSH. This step may be skipped

#install ssh

apt update
apt -y install ssh

#specify password 
echo 'root:<your password>'
sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
service ssh restart

#show IP address of your LinPe
ip a

Now you can connect to your LinPe over SSH

ssh root@<LinPe IP>

Prepare build environment

apt update
apt y --reinstall install gcc wget make binutils linux-headers-$(uname -r)

#Now you are ready to build your drivers. You can build mentioned brcm driver with following commands ( this is only example your drivers will vary )

#Download and build

mkdir /build && cd /build
wget https://dl.dell.com/FOLDER06347117M/1/Bcom_LAN_216.0.333.12_NX_Linux_Source_216.0.333.12.tar.gz
tar xvfz Bcom_LAN_216.0.333.12_NX_Linux_Source_216.0.333.12.tar.gz
tar xvfz Bcom_LAN_216.0.333.12_NX_Linux_Source_216.0.333.12/tg3-3.139a.tar.gz
cd tg3-3.139a
make

This will result in having a .ko file.  Copy off to your desktop.

# Verify driver by loading into LinPE for testing

cp tg3.ko /lib/modules/$(uname -r)/
modprobe -v tg3
lsmod

Adding Drivers to the Linux Automation Image

To use the drivers, you need to copy them to the correct location on your Deployment Solution server and then regenerate your image. To do so do the following:

  1. Copy the .ko files to the folder: ".\Boozwiz\platforms\Linux\x64\Drivers\CUSTOM\lib\modules\_ver_\kernel\opt\bdc"  (Create this path if it doesn't exist)
  2. Regenerate your Linux image, this can be done in PXE Configuration Manager. Edit the boot image and click next until the image regenerates. Then click Save on the main PXE Configuration Manager menu to save the changes.

If you don't want to add the driver to your image or want to load it using a script you can load it with the following commands:

  1. Copy the driver to the Linux automation local file system (after it boots).
  2. Change to the directory where you copied the driver to.
  3. Type depmod -ae (optional).
  4. Type modprobe drivername, and omit the .ko extension, so for the bnx2 driver type "modprobe bnx2". If you get an error, you can try the -f parameter, which tries to force the driver to load. You may get a warning about a tainted kernel but this isn't a huge deal.