WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Is it possible to compile only intel driver on Xorg?  (Read 10197 times)

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Is it possible to compile only intel driver on Xorg?
« on: December 20, 2008, 03:53:09 AM »
The necessity of loading agpgart, intel-agp and drm drivers manually indicate that there is a bug in the intel driver.

Is it possible to compile only intel driver on Xorg?

kagashe
« Last Edit: December 20, 2008, 05:37:41 AM by kagashe »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Is it possible to compile only intel driver on Xorg?
« Reply #1 on: December 20, 2008, 03:57:41 AM »
Yes, you can compile a newer version of just one driver and then replace the old one with it. Load compiletc, Xorg and Xorg-dev (not -light)

Then see ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/tce/src/Xorg-7.4/TC-script
particularly the driver config part - you'll need to use the same config arguments that are passed to driver's ./configure in the script.
The only barriers that can stop you are the ones you create yourself.

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Is it possible to compile only intel driver on Xorg?
« Reply #2 on: December 20, 2008, 05:10:37 AM »
Ok. This is what I understand.

$ export XORG_CONFIG="--prefix=/usr/local --sysconfdir=/etc \
    --mandir=/usr/local/share/man --localstatedir=/var"

$ export DRIVER_CONFIG="--with-xorg-module-dir=/usr/local/lib/X11/modules"

# Copy present Xorg.tcel to build directory and remove intel driver.
$ mkdir /tmp/dest
$ cp /path-to/Xorg-7.4.tcel /tmp/dest/Xorg-7.4.tar.gz
$ cd /tmp/dest
$ sudo tar xzf Xorg-7.4.tar.gz
$ rm Xorg-7.4.tar.gz
$ cd /usr/local/lib/X11/modules
$ sudo rm intel_drv.so
$ cd ..

# Copy downloaded driver source to /tmp and compile.
$ cp /path-to/xf86-video-intel-2.5.99.1.tar.gz /tmp
$ cd /tmp
$ sudo tar xjf xf86-video-intel-2.5.99.1.tar.gz
$ rm xf86-video-intel-2.5.99.1.tar.gz
$ cd xf86--video-intel-2.5.99.1
$ ./configure $XORG_CONFIG $DRIVER_CONFIG
$ make -j5
$ sudo make DESTDIR=/tmp/dest install

# Repack the new Xorg.tcel, change owner and move to safe place.
$ cd /tmp
$ sudo tar czf dest/ Xorg-7.4.tcel
$ sudo chown tc:staff Xorg-7.4.tcel
$ cp Xorg-7.4.tcel /home/tc

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Is it possible to compile only intel driver on Xorg?
« Reply #3 on: December 20, 2008, 05:24:08 AM »
That's correct up to repacking, because extensions start from / not /dest. Also before repacking I'd remove the man page (/tmp/dest/usr/local/share/man directory)

Here's repacking fixed up:

# Repack the new Xorg.tcel, change owner and move to safe place.
$ cd /tmp/dest
$ find etc usr var -not -type d > ../list
$ sudo tar czf ../Xorg-7.4.tcel -T ../list
$ sudo chown tc:staff ../Xorg-7.4.tcel
$ cp ../Xorg-7.4.tcel /home/tc

edit: -T ../list instead of -T list, typos happen :)
« Last Edit: December 20, 2008, 05:39:04 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Is it possible to compile only intel driver on Xorg?
« Reply #4 on: December 20, 2008, 05:26:04 AM »
Oh yeah, you'd need to remove the intel driver from the extension, not your system:

$ cd /usr/local/lib/X11/modules
$ sudo rm intel_drv.so

becomes

$ cd usr/local/lib/X11/modules
$ sudo rm intel_drv.so
The only barriers that can stop you are the ones you create yourself.

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Is it possible to compile only intel driver on Xorg?
« Reply #5 on: December 20, 2008, 05:32:06 AM »
Oh yeah, you'd need to remove the intel driver from the extension, not your system:

$ cd /usr/local/lib/X11/modules
$ sudo rm intel_drv.so

becomes

$ cd usr/local/lib/X11/modules
$ sudo rm intel_drv.so
That was a typo. Thanks.

kagashe

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Is it possible to compile only intel driver on Xorg?
« Reply #6 on: December 20, 2008, 07:57:08 AM »
Tried.
Quote
Checking for DRM... configure: error: Package requirement (libdrm > 2.4.2) were not met:

Requested "libdrm >= 2.4.2" but version libdrm is 2.3.1
Then I downloaded intel driver 2.5.1 and it requires libdrm >= 2.4.0

Ok.. I got libdrm 2.4.1 source compiling it now.

kagashe
« Last Edit: December 20, 2008, 08:33:11 AM by kagashe »

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Is it possible to compile only intel driver on Xorg?
« Reply #7 on: December 20, 2008, 08:43:09 AM »
I installed libdrm 2.4.1 in /tmp/dest but I think the configure script of intel driver is looking for libdrm on running Xorg.

Does it mean I have to do it in two steps?

kagashe


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Is it possible to compile only intel driver on Xorg?
« Reply #8 on: December 20, 2008, 09:56:27 AM »
Yes, for intel 2.5.1. First you'd install it to /tmp/dest, then copy as root to /, so it's still ready to be packed up in /tmp.

libdrm 2.4.2 is not released yet, so 2.6rc1 aka 2.5.99.1 might be difficult.

You could also try intel 2.4.3, which is .1 bigger than included 2.4.2, and compiles with current libdrm.
The only barriers that can stop you are the ones you create yourself.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: Is it possible to compile only intel driver on Xorg?
« Reply #9 on: December 20, 2008, 10:20:12 AM »
silly question, but is there a way to compile xorg or tc in general without libdrm? what would tc be like without it?

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Is it possible to compile only intel driver on Xorg?
« Reply #10 on: December 20, 2008, 11:14:25 AM »
Ok. Compiled libdrm 2.4.1 and intel 2.5.1.

No use I still need to load the modules agpgart etc manually or through bootlocal.sh

Is there any way to know how these modules are loading on Ubuntu 8.10 Intrepid Ibex? may be they are also using a workaround like our bootlocal.sh

I can boot with Live CD and I should know where to look. If I copy Xorg.0.log is that sufficient?

kagashe

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Is it possible to compile only intel driver on Xorg?
« Reply #11 on: December 20, 2008, 11:28:23 AM »
If you boot to textmode and see them listed in lsmod, and see them in /etc/modules* (I'm not sure of the exact file name)

@tobiaus: it's a part of the xorg extension, and you would not have 3D acceleration without it. I also think it's nowadays needed for AGP and PCI-E cards' accelerated use always, even when not used for 3d.
The only barriers that can stop you are the ones you create yourself.