matta
02-22-2005, 07:07 PM
To compile kernel modules that can be dynamically inserted into the running kernel you need to ensure you use the same kernel source, config, and GCC version as was used to build the kernel.
Example of how to build modules is below. Please note your kernel version may be different and to substitute where needed.
wget http://www.unixshell.com/kernel-source/linux-2.6.10-xenU.tgz
tar xzfv linux-2.6.10-xenU.tgz
cd linux-2.6.10-xenU
gzip -dc /proc/config.gz >.config
make menuconfig ARCH=xen
<select modules to compile using the "M" key, not "Y">
make modules ARCH=xen
make modules_install ARCH=xen
After this has completed you may insert modules by running "modprobe module_name", substuting module_name for the name of the module you want to load.
If you receive an error loading the module run "dmesg" and check the error. If it complains about the GCC version you will need to make sure you install the same version of GCC as it states it missing.
Example of how to build modules is below. Please note your kernel version may be different and to substitute where needed.
wget http://www.unixshell.com/kernel-source/linux-2.6.10-xenU.tgz
tar xzfv linux-2.6.10-xenU.tgz
cd linux-2.6.10-xenU
gzip -dc /proc/config.gz >.config
make menuconfig ARCH=xen
<select modules to compile using the "M" key, not "Y">
make modules ARCH=xen
make modules_install ARCH=xen
After this has completed you may insert modules by running "modprobe module_name", substuting module_name for the name of the module you want to load.
If you receive an error loading the module run "dmesg" and check the error. If it complains about the GCC version you will need to make sure you install the same version of GCC as it states it missing.