View Single Post
Old Feb 19, 2005, 05:24 AM   #3
JonSvenJonsson
Radeon R520
 
Join Date: Mar 2004
Posts: 581
JonSvenJonsson is still being judged by the masses


Default

Ok here comes an quick howto on adding latest xorg-cvs ati-drivers to your distributions x-package (debian/ubuntu specific, but should work for other distros similiar). Note i mainly do this to a) check out r300 progress and b) maintain my distributions package-managment.

1) Get Ubuntu for your architecture
http://releases.ubuntu.com/warty/ (or install debian sid)

2) After you installed it and set it up (X running) change your /etc/apt/sources.list so that it contains the following line:
Code:
deb-src ftp://archive.ubuntu.com/ubuntu hoary main restricted universe
Do this also if you have debian-sid, it is save to do so, as we only add an source repository.

3) do an
Code:
apt-get update
4) get the build-deps for xorg
Code:
 apt-get build xserver-xorg
If it say something about "not possible" (mainly on debian-sid, it want an newer xrender) then repeat the above step, but get the build-dep for the missing dependency. This gets ubuntus source of the missing.

5) get the source-code
Code:
apt-get source xserver-xorg
if you had previous an missing dependency you should also get the source of it

6) change to the newly unpacked directory. If you needed to get libxrender-dev and friends, first change to them, issue the following command
Code:
dpkg-buildpackage -us -uc
watch it compile and install the new packages by changing to the toplevel dir and doing an
Code:
 dpkg -i package-name.deb
7) now comes the somewhat tricky part: do an cvs-checkout of these two directory from xorg into a fresh directory: xc/programs/Xserver/hw/xfree86/drivers/i2c and xc/programs/Xserver/hw/xfree86/drivers/ati and also checkout the Imakefile xc/programs/Xserver/hw/xfree86/drivers/Imakefile

Code:
cvs -d :pserver:[email protected]:/cvs/xorg co xc/programs/Xserver/hw/xfree86/drivers/i2c

cvs -d :pserver:[email protected]:/cvs/xorg co xc/programs/Xserver/hw/xfree86/drivers/ati

cvs -d :pserver:[email protected]:/cvs/xorg co xc/programs/Xserver/hw/xfree86/drivers/Imakefile
You could repeat this step for other parts of xorg that are of interest for you.

Now change to the xorg-build directory (its called xorg-6.8.1) and do an
Code:
dpkg-buildpackage -us -uc
. Watch the output, it first unpacks the source, then applies the patches and the does an lndir (this is the one where many lines with ../../../somename scroll over your screen). After it finished the lndir command hit strg+c to stop the build-process. Now change to the sublevel directory called build-tree. You should see two directory one called xc and one called xc-xserver-xorg-dbg. do an
Code:
rm -fr xc-xserver-xorg-dbg
. then change into the xc directory. Now do an
Code:
cp -a /whereyoustoredcvscheckout/xc/* .
to copy the cvs checkout into ubuntus build-tree. now change back into the toplevel directory xorg-6.8.1.

Now you are ready to build xorg, this time for real. Do an
Code:
IGNORE_MANIFEST_CHANGES=1 dpkg-buildpackage -us -uc -nc
.
Notice the differences between the two build-commands ? The first one is because the new ati drivers adds new files and this would stop the packaging, with the Ignore directive we skip the file check. The second option "-nc" says that the build-command should NOT clean the source tree but worked with our changed source-tree.

Get a book, read and wait for the compile to finish.

8) after the compile finished you should have many *.deb files. You could install them all, but this would probably be waste of disk-space, so do the following:
create a dir called dbg. do an
Code:
 mv *dbg*.deb dbg
. This moves the debug-libs into its own directory. Then do an
Code:
dpkg -i *.deb
to install the new packages.

Have fun

Benefits of this approach:
1) you remain distributions package-sanity
Contras:
2) somewhat difficult
JonSvenJonsson is offline  
Advertisement (Guests Only)
Login or Register to remove this ad