How do I compile drivers for Linux automation in Ghost Solution Suite?
Compiling drivers for Linux and adding them to your Linux Automation image
This How To explains how to compile drivers for Linux automation and add them to your Linux image. Compiling drivers for Linux automation can be a daunting task, but once your environment is setup and you've done it a few times it becomes quite easy.
To complete this How To, you will need access to a computer running Linux (most any distro will work; these steps were written using Centos 6.5). You will also need to access a Ghost Solution Suite server. It is presumed you have a basic understanding of Linux and Ghost Solution Suite. Ghost Solution Suite 3.x , along with Linux kernel version 3.18.22/, were used in the creation of this document.
Note: The Linux pre-boot environment shipping with Ghost Solution Suite uses kernel 3.18.22 . Compile drivers against this kernel version and source.
Preparing Your Linux Computer
NOTE: If using Centos or Redhat an account with sudo or root access is required.
First, you will need to setup your Linux computer to compile drivers for Linux automation. This involves installing the correct compiler, downloading the kernel source code, adding the configuration information from your Linux automation image, and compiling the source code. You should only have to do this part once; after you have everything setup you can skip to the Compiling Drivers section.
Copy the config from the eXpress share or the linux pre boot.
Compiling the Driver
Now everything should be set up and ready to go; from here on out you can skip the preparation steps and just compile drivers any time you like.
Note: The compilation process may fail with errors. If you are sure you did everything correctly then it is possible the driver source code is not compatible with the kernel version you are using. In this case you will have to find a different version of the driver source code. It is not uncommon for a variable declaration or function call that the driver expects the kernel to provide to be missing in later kernel releases. Linux kernels are released very frequently and anything is fair game for changing each time. For a particular driver that was needed once, 20 different versions were gone through before the one was found that worked. Even when a driver compiles that doesn't mean it will load properly, it may still complain about missing variables/function calls when it is loaded. That is the joy of working in Linux—you just have to keep trying. The advantage is someone else has probably had your same problem, and you can find how to fix it using the Internet.
Note: If the compilation succeeds, but has warnings this may not be a problem, try loading the driver to see how it goes.
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:
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:
Important: The drivers you just compiled will only work with the kernel version they were compiled with. If you upgrade your Linux automation kernel, you will have to re-setup your Linux computer and recompile the drivers.
Subscribing will provide email updates when this Article is updated. Login is required to Subscribe
Thanks for your feedback. Let us know if you have additional comments below. (requires login)
This will clear the history and restart the chat.