[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

amd64 for 2.6.13



Hello All,

I had some progress, even if it is not won yet.
At least, the progress encourages me to go further.
The mail below is long because I copy a lot of screen.

In summary :
target : amd64, sarge, kernel 2.6.13  --> there is a X300SE card in this PC
I have  : x86, sarge, kernel 2.6.13  --> no ati card (just to debug/help)

method 3b amd64 binaries : not possible (too old)
method 3a. source : 
	. working for x86
	. working for amd64 (remember I'm sarge, not sid)

method 4.1 Build with the supplied make.sh script
	x86 : compiles on 2.6.13
	amd64 : compiles direct on 2.6.8
	amd64 : not compiles on 2.6.13 but manage with
		dirty "ln -s ../linux/ioctl32.h ioctl32.h"

method 4.2 Method : make -C $src SUBDIRS=modules/fglrx/  modules 
	x86 : compiles on 2.6.13
	amd64 : compiles direct on 2.6.8
	amd64 : not compiles on 2.6.13 but manage with
		dirty "ln -s ../linux/ioctl32.h ioctl32.h"

===========================================================================
Here are some details :

    3a-source :
    ----------
    prompt> cd 3a-source/
    prompt> wget "http://www.stanchina.net/~flavio/debian/fglrx-installer_8.16.20-1.tar.gz";
    prompt> wget "http://www.stanchina.net/~flavio/debian/fglrx-installer_8.16.20-1.dsc";
    prompt> dpkg-source -x fglrx-installer_8.16.20-1.dsc
        dpkg-source: extracting fglrx-installer in fglrx-installer-8.16.20
    prompt> cd glrx-installer-8.16.20/
    prompt> dpkg-buildpackage -b -rfakeroot -tc -uc -D
    Unmet build dependencies: rpl ia32-libs             --> on AMD64
        --> on AMD64    apt-get install rpl ia32-libs
    Unmet build dependencies: debhelper (>= 4.2.11) rpm libqt3-mt-dev   --> on X86
        --> on X86         apt -get install rpm debhelper libqt3-mt-dev
    prompt> dpkg-buildpackage -b -rfakeroot -tc -uc -D

    on X86 :
        ( pkg is doing wget -nd http://www2.ati.com/drivers/linux/fglrx_4_3_0-8.16.20-1.i386.rpm )
    prompt> cd .. && ls -la *.deb
        -rw-r--r--  1 jeanluc jeanluc   57002 2005-09-14 21:48 fglrx-control-qt3_8.16.20-1_i386.deb
        -rw-r--r--  1 jeanluc jeanluc 6504908 2005-09-14 21:48 fglrx-driver_8.16.20-1_i386.deb
        -rw-r--r--  1 jeanluc jeanluc    8396 2005-09-14 21:48 fglrx-driver-dev_8.16.20-1_i386.deb
        -rw-r--r--  1 jeanluc jeanluc  276016 2005-09-14 21:48 fglrx-kernel-src_8.16.20-1_i386.deb
        -rw-r--r--  1 jeanluc jeanluc   72642 2005-09-14 21:48 fglrx-sources_8.16.20-1_i386.deb
    on AMD64 :
        ( pkg is doing wget -nd http://www2.ati.com/drivers/linux/64bit/fglrx64_4_3_0-8.16.20-1.x86_64.rpm )
    prompt> cd .. && ls -la *.deb
        -rw-r--r--  1 jeanluc jeanluc    57980 2005-09-14 23:08 fglrx-control-qt3_8.16.20-1_amd64.deb
        -rw-r--r--  1 jeanluc jeanluc 12836302 2005-09-14 23:08 fglrx-driver_8.16.20-1_amd64.deb
        -rw-r--r--  1 jeanluc jeanluc     8318 2005-09-14 23:08 fglrx-driver-dev_8.16.20-1_amd64.deb
        -rw-r--r--  1 jeanluc jeanluc   246182 2005-09-14 23:08 fglrx-kernel-src_8.16.20-1_amd64.deb
        -rw-r--r--  1 jeanluc jeanluc    72646 2005-09-14 23:08 fglrx-sources_8.16.20-1_amd64.deb


    install pkg :
    -------------
    root# dpkg -i fglrx-kernel-src_8.16.20-1_i386.deb
    prompt> dpkg -L fglrx-kernel-src
                --> /usr/src/fglrx.tar.bz2
    prompt> cp /usr/src/fglrx.tar.bz2 /home/jeanluc/src/linux
    prompt> bzip2 -d fglrx.tar.bz2 && tar xf fglrx.tar
    prompt> cd modules/fglrx/	: that is the source of my module

    4.1 Build with the supplied make.sh script
    -------------------------------------------
    X86 : working for 2.6.13

        [jeanluc jeanlucsarge]> cd /home/jeanlucsarge/src/kernel/linux-2.6.13
        [jeanluc linux-2.6.13]> cd modules/fglrx/
        [jeanluc fglrx]> ./make.sh
        ./make.sh: line 42: [: 3: unary operator expected
        ATI module generator V 2.0
        ==========================
        initializing...
        cleaning...
        patching 'highmem.h'...
        probing for VMA API version...
        doing script based build for kernel 2.4.x and similar
        compiling './agpgart_be.c'...
        compiling './agp3.c'...
        compiling './i7505-agp.c'...
        compiling './nvidia-agp.c'...
        compiling './firegl_public.c'...
        linking of fglrx kernel module...
        done.
        ==============================
        You must copy fglrx.o to /lib/modules/2.4.26-06sep2005/misc
        and then call 'depmod -ae' in order to install the built module.
        ==============================


    AMD64 : not working

        prompt> cd modules/fglrx/
        prompt> ./make.sh
        prompt> /home/jeanluc/src/kernel-source-2.6.8/modules/fglrx/firegl_public.c:124:25: asm/ioctl32.h: No such file or directory
                OK, normal, he should find ioctl32.h in include/linux/ioctl32.h, so it's normal it fails
                ==> the ./make.sh method is not working for amd64 architecture

    4.2 Method : make -C $src SUBDIRS=modules/fglrx/  modules

    X86 :
        working on 2.6.13 (more warning than ./make.sh method )
    one typical compile line for x86 :
        gcc -m32 -Wp,-MD,modules/fglrx/.firegl_public.o.d  -nostdinc -isystem /usr/lib/gcc-lib/i486-linux/3.3.5/include -D__KERNEL__
        -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2     -fomit-frame-pointer
        -pipe -msoft-float -mpreferred-stack-boundary=2  -march=athlon -Iinclude/asm-i386/mach-default
        -I/home/jeanlucsarge/src/kernel/linux-2.6.13 -D__AGP__ -DFGL -DFGL_LINUX -DFGL_GART_RESERVED_SLOT -DFGL_LINUX253P1_VMA_API
        -DPAGE_ATTR_FIX=1   -DMODULE -DKBUILD_BASENAME=firegl_public -DKBUILD_MODNAME=fglrx -c -o modules/fglrx/.tmp_firegl_public.o
        modules/fglrx/firegl_public.c

    AMD64 :
        2.6.8= working
        2.6.13= not working (now working ... with dirty symplink see st the end)

        prompt> make  -C /home/jeanluc/src/kernel-source-2.6.8  SUBDIRS=modules/fglrx/  modules
        make: entrant dans le répertoire « /home/jeanluc/src/kernel-source-2.6.8 »
          CC [M]  modules/fglrx/agp3.o
          CC [M]  modules/fglrx/nvidia-agp.o
          CC [M]  modules/fglrx/agpgart_be.o
        modules/fglrx/agpgart_be.c:6070: attention : `ati_gart_base' defined but not used
          CC [M]  modules/fglrx/i7505-agp.o
          CC [M]  modules/fglrx/firegl_public.o
        modules/fglrx/firegl_public.c: Dans la fonction « firegl_get_user_ptr »:
        modules/fglrx/firegl_public.c:1067: attention : affectation transforme un entier en pointeur sans transtypage
        modules/fglrx/firegl_public.c: Dans la fonction « firegl_put_user_ptr »:
        modules/fglrx/firegl_public.c:1099: attention : cast from pointer to integer of different size
        modules/fglrx/firegl_public.c:1099: attention : cast from pointer to integer of different size
        modules/fglrx/firegl_public.c:1099: attention : cast from pointer to integer of different size
        modules/fglrx/firegl_public.c:1099: attention : cast from pointer to integer of different size
          LD [M]  modules/fglrx/fglrx.o
          Building modules, stage 2.
          MODPOST
          CC      modules/fglrx/fglrx.mod.o
          LD [M]  modules/fglrx/fglrx.ko
        make: quittant le répertoire « /home/jeanluc/src/kernel-source-2.6.8 »

[jeanluc linux-2.6.13]> env LANGUAGE=C make  V=1 -C /home/jeanluc/src/linux-2.6.13   SUBDIRS=modules/fglrx/  modules
make: Entering directory `/home/jeanluc/src/linux-2.6.13'
mkdir -p modules/fglrx//.tmp_versions
make -f scripts/Makefile.build obj=modules/fglrx
  gcc -Wp,-MD,modules/fglrx/.agp3.o.d  -nostdinc -isystem /usr/lib/gcc-lib/x86_64-linux/3.3.5/include -D__KERNEL__ -Iinclude
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer
-mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks   -Wno-sign-compare -fno-asynchronous-unwind-tables  -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow   -I/home/jeanluc/src/linux-2.6.13 -D__AGP__ -DFGL -DFGL_LINUX -DFGL_GART_RESERVED_SLOT
-DFGL_LINUX253P1_VMA_API -DPAGE_ATTR_FIX=1   -DMODULE -DKBUILD_BASENAME=agp3 -DKBUILD_MODNAME=fglrx -c -o
modules/fglrx/.tmp_agp3.o modules/fglrx/agp3.c
  gcc -Wp,-MD,modules/fglrx/.nvidia-agp.o.d  -nostdinc -isystem /usr/lib/gcc-lib/x86_64-linux/3.3.5/include -D__KERNEL__ -Iinclude
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer
-mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks     -Wno-sign-compare -fno-asynchronous-unwind-tables  -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow   -I/home/jeanluc/src/linux-2.6.13 -D__AGP__ -DFGL -DFGL_LINUX -DFGL_GART_RESERVED_SLOT
-DFGL_LINUX253P1_VMA_API -DPAGE_ATTR_FIX=1   -DMODULE -DKBUILD_BASENAME=nvidia_agp -DKBUILD_MODNAME=fglrx -c -o
modules/fglrx/.tmp_nvidia-agp.o modules/fglrx/nvidia-agp.c
  gcc -Wp,-MD,modules/fglrx/.agpgart_be.o.d  -nostdinc -isystem /usr/lib/gcc-lib/x86_64-linux/3.3.5/include -D__KERNEL__ -Iinclude
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer
-mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks     -Wno-sign-compare -fno-asynchronous-unwind-tables  -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow   -I/home/jeanluc/src/linux-2.6.13 -D__AGP__ -DFGL -DFGL_LINUX -DFGL_GART_RESERVED_SLOT
-DFGL_LINUX253P1_VMA_API -DPAGE_ATTR_FIX=1   -DMODULE -DKBUILD_BASENAME=agpgart_be -DKBUILD_MODNAME=fglrx -c -o
modules/fglrx/.tmp_agpgart_be.o modules/fglrx/agpgart_be.c
modules/fglrx/agpgart_be.c: In function `__fgl_agp_init':
modules/fglrx/agpgart_be.c:8166: warning: `pm_register' is deprecated (declared at include/linux/pm.h:107)
modules/fglrx/agpgart_be.c: In function `__fgl_agp_cleanup':
modules/fglrx/agpgart_be.c:8176: warning: `pm_unregister_all' is deprecated (declared at include/linux/pm.h:117)
modules/fglrx/agpgart_be.c: At top level:
modules/fglrx/agpgart_be.c:6070: warning: `ati_gart_base' defined but not used
  gcc -Wp,-MD,modules/fglrx/.i7505-agp.o.d  -nostdinc -isystem /usr/lib/gcc-lib/x86_64-linux/3.3.5/include -D__KERNEL__ -Iinclude
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer
-mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks      -Wno-sign-compare -fno-asynchronous-unwind-tables  -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow   -I/home/jeanluc/src/linux-2.6.13 -D__AGP__ -DFGL -DFGL_LINUX -DFGL_GART_RESERVED_SLOT
-DFGL_LINUX253P1_VMA_API -DPAGE_ATTR_FIX=1   -DMODULE -DKBUILD_BASENAME=i7505_agp -DKBUILD_MODNAME=fglrx -c -o
modules/fglrx/.tmp_i7505-agp.o modules/fglrx/i7505-agp.c
  gcc -Wp,-MD,modules/fglrx/.firegl_public.o.d  -nostdinc -isystem /usr/lib/gcc-lib/x86_64-linux/3.3.5/include -D__KERNEL__
-Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer
-mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks  -Wno-sign-compare -fno-asynchronous-unwind-tables  -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow   -I/home/jeanluc/src/linux-2.6.13 -D__AGP__ -DFGL -DFGL_LINUX -DFGL_GART_RESERVED_SLOT
-DFGL_LINUX253P1_VMA_API -DPAGE_ATTR_FIX=1   -DMODULE -DKBUILD_BASENAME=firegl_public -DKBUILD_MODNAME=fglrx -c -o
modules/fglrx/.tmp_firegl_public.o modules/fglrx/firegl_public.c
modules/fglrx/firegl_public.c:124:25: asm/ioctl32.h: No such file or directory
modules/fglrx/firegl_public.c: In function `firegl_stub_putminor':
modules/fglrx/firegl_public.c:498: warning: `inter_module_put' is deprecated (declared at include/linux/module.h:573)
modules/fglrx/firegl_public.c:500: warning: `inter_module_unregister' is deprecated (declared at include/linux/module.h:570)
modules/fglrx/firegl_public.c: In function `firegl_stub_register':
modules/fglrx/firegl_public.c:520: warning: `inter_module_register' is deprecated (declared at include/linux/module.h:569)
modules/fglrx/firegl_public.c:551: warning: `inter_module_put' is deprecated (declared at include/linux/module.h:573)
modules/fglrx/firegl_public.c: In function `firegl_get_user_ptr':
modules/fglrx/firegl_public.c:1099: warning: cast from pointer to integer of different size
modules/fglrx/firegl_public.c:1099: warning: cast from pointer to integer of different size
modules/fglrx/firegl_public.c:1099: warning: cast from pointer to integer of different size
modules/fglrx/firegl_public.c: In function `__ke_verify_area':
modules/fglrx/firegl_public.c:1428: warning: `verify_area' is deprecated (declared at include/asm/uaccess.h:54)
modules/fglrx/firegl_public.c: In function `__ke_register_ioctl32_conversion':
modules/fglrx/firegl_public.c:2177: warning: implicit declaration of function `register_ioctl32_conversion'
modules/fglrx/firegl_public.c: In function `__ke_unregister_ioctl32_conversion':
modules/fglrx/firegl_public.c:2182: warning: implicit declaration of function `unregister_ioctl32_conversion'
make[1]: *** [modules/fglrx/firegl_public.o] Error 1
make: *** [_module_modules/fglrx] Error 2
make: Leaving directory `/home/jeanluc/src/linux-2.6.13'

my comments :
--------------------
mistake is because he searched for asm/ioctl32.h
$src/include/asm/ioctl32.h is same as $src/include/asm-x86_64/ioctl32.h
because symlink :
    cd $scr/include
    ls -la
    lrwxrwxrwx    1 jeanluc jeanluc     asm -> asm-x86_64/
but this file doesn't exist !!!
the only file  ioctl32.h is $src/include/linux/ioctl32.h

The temporary dirty solution is :
    cd $scr/include/asm-x86_64/
    ln -s ../linux/ioctl32.h ioctl32.h

and now than both method 4.1 and 4.2 are compiling on amd64 for 2.6.13.
But I didn't try to load the module yet. (not tried yet to load the modules ).
Tomorrow, I will try to load the module, maybe.

-- 
Jean-Luc