Chapter 3. Driver Update

Table of Contents
3.1. Included files on the update medium
3.2. Creating the driver modules
3.3. Workflow for the Driver Update

The Driver Update is providing a possibility to install SuSE/UnitedLinux on devices that were not supported at the time the distribution was created and be able to boot the installed system afterwards without having to manually install the new device drivers after the installation. Even though linuxrc (the first stage of the installation process) has the ability to load driver modules from a separate modules floppy, these modules are not used for the installed system afterwards, because the YaST Installer installs a kernel RPM during the package installation. This driver update feature will use a provided kernel driver module during the installation process and will also place it into the installed system in order to be able to boot up the installed system later.

3.1. Included files on the update medium

For this type of Update Medium you need two subdirectorys below the base directory structure described above. One is the install directory: install/. This directory contains an optional pre-installation script named update.pre, the driver modules for all possible kernel versions either as a gzipped tar archive named update.tar.gz or as separate rpms (*.rpm, since SL 9.1) and two optional post-installation scripts named update.post and update.post2 (>= SL 9.0). The other directory is the modules directory: modules/. It contains the uncompressed updated driver modules (*.o or *.ko) for the installation kernel that are loaded during the initial installation. If you need to ensure a specific module loading order you can add a file 'module.order' (>= SLES9 SP1) which has one module name (without '.ko') per line. Modules are loaded in the order they are listed in that file.

Example 3-1. Contents of a Driver Update Medium


		linux/ 
		`-- suse/ 
		     `-- i386-9.1/
		         `-- dud.config         # >= SL 9.0
			 |-- install/
		         |    `-- update.pre
			 |     -- update.tar.gz
			 |     -- update.post
			 |     -- update.post2  # >= SL 9.0
			 |     -- foo.rpm       # >= SL 9.1
			 |     -- bar.rpm       # >= SL 9.1
			 |-- modules/
			 |    `-- module.order	# >= SLES9 SP1
			 |    `-- module1.ko
			 |    `-- module2.ko
			 |    `...
			 `-- inst-sys/          # >= SLES9 SP1
			      `-- foo
		

3.1.1. update.tar.gz

The file update.tar.gz is a gzipped tar archive that includes the directory structure and the updated driver modules. The archive should contain the driver modules compiled for all kernel versions available on the distribution in both SMP and uniprocessor configuration. In addition, the tarball may include new device nodes in /dev/ or other files that should be installed into the system (e.g. additional documentation) - it will simply be extracted in the root directory of the installed system.

Note

The files contained in this archive will not be listed in the RPM database and will overwrite files that are already installed on the system!

3.1.2. *.rpm (>= SL 9.1)

Instead of unpacking a tar archive, you might prefer to use rpm packages. Starting with SUSE LINUX 9.1 all rpms that are in the 'install' directory will be installed.

3.1.3. update.pre

update.pre is a shell script, that contains commands that should be executed within the running installation system right after the YaST installer is started, e.g. creating device entries using mknod or echoing parameters into /proc. If you need the driver module to acces the root filesystem you can use this update.pre script to add the driver module to the initial ramdisk (initrd).

3.1.4. update.post

update.post is an shell script that is executed by the YaST installer after the basic installation has finished and the update.tar.gz archive has been extracted into the installed system. This script is executed in the root directory of the installed system. It can be used for adding or changing entries in modules.conf, creating device nodes in the installed system etc.

3.1.5. update.post2 (>= SL 9.0)

There are situations for which update.post is run too early (say you want to apply changes to the boot loader config). A new script 'update.post2' is introduced that will be run just before YaST2 unmounts the installed system.

3.1.6. inst-sys (>= SLES9 SP1)

Sometimes it is necessary to update files in the installation environment itself. All files below the 'inst-sys' directory will be updated. The directory structure is preserved. If you want to replace the hardware detection library, for example, add it as 'inst-sys/usr/lib/libhd.so.X.Y'.

3.1.7. dud.config (>= SL 9.0)

The driver update config file consists of lines with the format 'key: value'. Valid keys are

  • UpdateName

    A short description, shown in linuxrc when the driver update is applied. This key may appear more than once.

  • UpdateID

    An unique string identifying the update. There's no meaning attached to the value. It is only used to avoid applying the same update accidentally twice.

  • UpdatePriority (>= SLES9 SP1)

    A number less than 900. Updates with higher numbers are applied after updates with lesser numbers. Normally, updates are assigned increasing priorities starting with 0 in the order they are found. Note that this does not work for module updates as modules are always loaded immediately.

3.1.8. Dummy Driver Module

To test if your Driver Update Medium works you can use this dummy driver module. You can compile it with the command below.


		gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -c duddm.c -I/lib/modules/`uname -r`/build/include