Building and installing HAVEGE Linux kernel module on Debian systems.

Before proceeding further, please ensure that you have a configured kernel source tree with proper options enabled, as it is described here.

If you downloaded a prebuilt debian package, click here.

Required packages

If you want to build hrandom from the source package, make sure that the following software are installed onto your system: module-assistant, debhelper, kernel-package, fakeroot.

Note that this is not an exhaustive list and you should consult Debian's website if some packages are missing.

Building hrandom from source

Step 1: download hrandom-x.y.orig.tar.gz as well as the 'diff.gz' and '.dsc' files into the same directory.

Step 2: unpack the archive with:

$ dpkg-source -x hrandom_x.y-z.dsc

Step 3: move into the newly created hrandom-x.y directory

$ cd hrandom-x.y

Step 4: configuring and building

$ fakeroot debian/rules binary

Once done, the parent directory should contain the following debian packages:

hrandom_x.y-z_arch.deb contains hrandom documentation and the configuration files.

hrandom-source_x.y-z_arch.deb contains the module source code that needs to be built.

Installing and building hrandom

Installing the debian packages

To install hrandom debian packages, run the following command in a root shell:

$ dpkg -i hrandom_x.y-z_arch.deb

$ dpkg -i hrandom-source_x.y-z_arch.deb

Building hrandom

Various methods could be used to build hrandom. We, however, recommend using module-assistant or make-kpkg that are more specific to Debian-based distribution.

Keep in mind that you need root privileges to install hrandom.

module-assistant (recommended)

If you have never resorted to module-assistant before, you should prepare the build environment using:

$ module-assistant prepare

This will install the missing packages and unpack the hrandom sources in the proper directory (/usr/src/modules).

Then, execute the following command to compile and install hrandom:

$ module-assistant a-i hrandom

Upon success, hrandom-modules- should have been created into the parent directory and installed onto your system. You can check this out using debian tools such as dselect or apt-get.

Note for non-x86 systems

HAVEGE's configure script might fail guessing some architectural parameters depending on the target processor type (only x86-based systems are supported so far). The current solution to this problem is to provide extra arguments to the configure script, as described below.

Configuration parameters

Specify the L1 data-cache size, SIZE is the size in Kbytes.

$ DEB_BUILD_OPT="--with-l1-dcache=SIZE" module-assistant a-i hrandom

make-kpkg

Make sure /usr/src/modules contain a directory called hrandom, else unpack hrandom.tar.bz2 using

$ tar xjvf hrandom.tar.bz2

Then move into the Linux kernel source (/usr/src/linux) and issue the following command:

$ make-kpkg --added-modules hrandom modules_image

Upon success, hrandom-modules- should have been created into the parent directory. To install the package, please run into a root shell:

$ dpkg -i hrandom-modules

assuming that you move to the parent directory (/usr/src)

Note: information provided in this page is based on the Debian guideline for ATI Linux driver packages.

Creating device nodes

Please follow these steps once hrandom-modules is installed.