Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: kagashe on December 20, 2008, 12:53:09 AM

Title: Is it possible to compile only intel driver on Xorg?
Post by: kagashe on December 20, 2008, 12: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
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: curaga on December 20, 2008, 12: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.
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: kagashe on December 20, 2008, 02: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
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: curaga on December 20, 2008, 02: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 :)
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: curaga on December 20, 2008, 02: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
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: kagashe on December 20, 2008, 02: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
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: kagashe on December 20, 2008, 04: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
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: kagashe on December 20, 2008, 05: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

Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: curaga on December 20, 2008, 06: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.
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: tobiaus on December 20, 2008, 07: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?
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: kagashe on December 20, 2008, 08: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
Title: Re: Is it possible to compile only intel driver on Xorg?
Post by: curaga on December 20, 2008, 08: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.