You are not logged in.

#1 2006-12-09 20:54:33

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

[solved] fglrx with custom kernel

I installed a custom kernel without ABS.

The soucres are in /usr/src/liunx-<kernelversion> and /usr/src/linux is a link to it.

the ati-fglrx PKGBUILD from abs compiles against the kernel26 sources, and I can't modprobe the fglrx modul

FATAL: Error inserting fglrx/lib/modules/2.6.18.5-RADEONFB/video/fglrx.ko): Invalid module format

Which changes are needed to make the PKGBUILD compile against the sources under the /usr/src/linux link?

this is the ati-fglrx PKGBUILD from ABS

# Maintainer: James Rayner <iphitus>
# Maintainer: Travis Willard <travisw>

pkgname=ati-fglrx
pkgver=8.31.5
pkgrel=1
pkgdesc="ATI proprietary binary drivers for >= r300 chipsets. Drivers for the Linux kernel."
arch=(i686 x86_64)
url="http://www.ati.com"
license=""
depends=('ati-fglrx-utils' 'kernel26')
makedepends=()
conflicts=('ati-drivers-module' 'ati-drivers-arch' 'nvidia')
install=ati-fglrx.install
_kernver=2.6.18-ARCH
source=(http://www2.ati.com/drivers/linux/ati-driver-installer-$pkgver-x86.x86_64.run)
md5sums=('2be14c0459373149b3fff49504713d98')

build() {
    cd $startdir/src

    [ "$CARCH" = "i686" ] && _arch="x86"
    [ "$CARCH" = "x86_64" ] && _arch="x86_64"

    chmod a+x ati-driver-installer-$pkgver-x86.x86_64.run
    ./ati-driver-installer-$pkgver-x86.x86_64.run --extract archive_files

    cp $startdir/src/archive_files/arch/${_arch}/* $startdir/src/ -r 
    cp $startdir/src/archive_files/common/* $startdir/src/ -r 

    if [ "$CARCH" == "x86_64" ]; then
      cp $startdir/src/archive_files/x710_64a/* $startdir/src/ -r
    else
      cp $startdir/src/archive_files/x710/* $startdir/src/ -r
    fi
    cd $startdir/src
    #patch -Np0 -i 2.6.18-utsrelease.patch || return 1
    #patch -Np0 -i 2.6.18-vm.patch || return 1
    cd $startdir/src/lib/modules/fglrx/build_mod/
    # Build the kernel module
    cp 2.6.x/Makefile .
    make -C /lib/modules/${_kernver}/build SUBDIRS="`pwd`" modules || return 1

    # Install the kernel module
    install -m 644 -D $startdir/src/lib/modules/fglrx/build_mod/fglrx.ko 
        $startdir/pkg/lib/modules/${_kernver}/video/fglrx.ko

    sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/ati-fglrx.install

}


edit:
hmm, so simple :oops:

changed  _kernver variable to

_kernver=$(uname -r)

now it compiles against the current running kernel.

Offline

Board footer

Powered by FluxBB