How to recompile the fglrx module by yourself
Danilo Piazzalunga
danilopiazza at libero.it
Mon Jan 31 15:28:17 UTC 2005
Danilo Piazzalunga wrote:
> Stay tuned as I will post a mini-howto
This is an ugly draft. I'll try to make up with a proper wiki document as soon
as possible.
** How to use the current fglrx Xorg driver with an older kernel **
Before starting, make sure you have installed the linux-headers-* package
matching the kernel you wish to build the module for.
To make this HOWTO independent of the targeted kernel, I'll be referring to
the kernel version as <TARGET_VERSION>. Replace this with whatever is
appropriate, e.g. 2.6.8.1-4-686.
0. Point your sources to the latest ones. In this example, I'm using Hoary.
deb-src http://archive.ubuntu.com/ubuntu/ hoary main restricted
1. Download the latest sources for linux-restricted-modules. They are in the
same source package as fglrx-driver, so
apt-get source fglrx-driver
2. Enter into the directory where the source package has been unpacked.
The name of the source package depends on the kernel version it is
build from. In this example, that version in 2.6.10. The name of the
directory will depend on the package version too, which currently is
2.6.10.3.
cd linux-restricted-modules-2.6.10-2.6.10.3
3. Unpack the rpm which contains the Ati drivers. This will create the
debian/build directory.
debian/rules unpack
4. Enter into the kernel module directory.
cd debian/build/ati-xorg/lib/modules/fglrx/build_mod/2.6.x
5. Just run 'make' to build the module.
If the kernel you are running is not the same you wish to build for, specify
either the kernel release (as returned by 'uname -r') by setting KVER or the
kernel source directory with the KDIR variable. Possible examples include:
make
make KVER=<TARGET_VERSION>
make KDIR=/usr/src/linux-2.6.10
6. If you have already installed the linux-restricted-modules package which
matches your target kernel, or if you ever plan to install it but you want
to keep your custom fglrx module from being rewritten, you should set up a
dpkg diversion.
sudo dpkg-divert --rename
--local /lib/modules/<TARGET_VERSION>/kernel/drivers/video/fglrx.ko
7. Install the module.
sudo cp fglrx.ko /lib/modules/<TARGET_VERSION>/kernel/drivers/video/fglrx.ko
8. Enjoy :-)
9. When you uninstall this kernel, remember to clean up everything.
sudo rm /lib/modules/<TARGET_VERSION>/kernel/drivers/video/fglrx.ko
sudo dpkg-divert
--remove /lib/modules/<TARGET_VERSION>/kernel/drivers/video/fglrx.ko
--
Danilo Piazzalunga +--------------------+
PGP Key available at subkeys.pgp.net | Linux User #245762 |
Fingerprint: D018 815E 8C7F 2AE2 5565 | ICQ #105550412 |
0C36 B5F6 DB20 B800 CB9F +--------------------+
More information about the ubuntu-users
mailing list