Tiny Core Extensions > Extension requests

64-bit drivers from ati-fglrx-kernel-source.tcz

(1/3) > >>

MiniQ9:
Help me build a driver for 64-bit system Ati from ati-fglrx-kernel-source.tcz

Arslan S.:
i didn't test ati-fglrx extensions in an 64 bit system, but you need toolchain64 extension and tc linux kernel src patched and installed for building any kernel module, that's quite complicated for a standart user to do unfortunately, wish there was a linux-headers-* for tc 64 too

steps to do in summary
1) download linux src patched and related config file
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/src/kernel/
2) load compiletc + toolchain64 extensions and open up a toolchain64 shell
3) extract linux src patched, cd to linux src, and move config file into linux src with name .config
4) prepare linux src for compiling modules

--- Code: ---export ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux-gnu-
make oldconfig
make modules_prepare
--- End code ---
6) create system symlinks for pointing to linux src installation

--- Code: ---sudo mkdir -p /usr/src
sudo ln -sf /path/to/linux/src /usr/src/linux
sudo ln -sf /usr/src/linux /lib/modules/`uname -r`/kernel/build
--- End code ---

then you should be able compile ati fglrx kernel module by a simple make command

MiniQ9:
ATI modules compiled by ./make.sh
In make.sh many calls uname-r.
In order not to change make.sh I booted into TinyCore64.
and

--- Quote from: Arslan S. on January 10, 2011, 06:23:32 AM ---1) download linux src patched and related config file
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/src/kernel/
2) load compiletc + toolchain64 extensions and open up a toolchain64 shell
3) extract linux src patched, cd to linux src, and move config file into linux src with name .config
4) prepare linux src for compiling modules

--- Code: ---export ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux-gnu-
make oldconfig
make modules_prepare
--- End code ---
6) create system symlinks for pointing to linux src installation

--- Code: ---sudo mkdir -p /usr/src
sudo ln -sf /path/to/linux/src /usr/src/linux
sudo ln -sf /usr/src/linux /lib/modules/`uname -r`/kernel/build
--- End code ---

--- End quote ---
But I have compilation errors.

--- Code: ---AMD kernel module generator version 2.1
.
Active kernel:
uname -a = Linux box 2.6.33.3-tinycore64 #444 SMP Wed May 12 16:51:51 EEST 2010 x86_64 GNU/Linux
uname -s = Linux
uname -m = x86_64
uname -r = 2.6.33.3-tinycore64
uname -v = #444 SMP Wed May 12 16:51:51 EEST 2010
.
Target kernel:
uname -a = Linux box 2.6.33.3-tinycore64 #444 SMP Wed May 12 16:51:51 EEST 2010 x86_64 GNU/Linux
uname -s = Linux
uname -m = x86_64
uname -r = 2.6.33.3-tinycore64
uname -v = #444 SMP Wed May 12 16:51:51 EEST 2010
.
OsVersion says: SMP=1
file /lib/modules/2.6.33.3-tinycore64/build/include/generated/autoconf.h says: SMP=1
file /lib/modules/2.6.33.3-tinycore64/build/include/generated/autoconf.h says: MODVERSIONS=
file /lib/modules/2.6.33.3-tinycore64/build/arch/x86/include/asm/compat.h says: COMPAT_ALLOC_USER_SPACE=compat_alloc_user_space
.
doing Makefile based build for kernel 2.6.x and higher
make -C /lib/modules/2.6.33.3-tinycore64/build SUBDIRS=/usr/local/src/fglrx-build/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux'
  CC [M]  /usr/local/src/fglrx-build/fglrx/build_mod/2.6.x/firegl_public.o
/usr/local/src/fglrx-build/fglrx/build_mod/2.6.x/firegl_public.c:1: error: code model ‘kernel’ not supported in the 32 bit mode
/usr/local/src/fglrx-build/fglrx/build_mod/2.6.x/firegl_public.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[2]: *** [/usr/local/src/fglrx-build/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/usr/local/src/fglrx-build/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux'
make: *** [kmod_build] Error 2
build failed with return value 2

--- End code ---

MiniQ9:
People, well, help the module to compile

Arslan S.:
Aassuming you have setup linux kernel source as instructed in my first post and toolchain64.tcz is installed.

Start a toolchain64-shell (just type "toolchain64-shell" in a terminal)


--- Code: ---patch -p0 -i makefile.patch
cd fglrx/build_mod
cp libfglrx_ip.a.GCC4.x86_64 libfglrx_ip.a.GCC4
make CC=x86_64-unknown-linux-gnu-gcc LD=x86_64-unknown-linux-gnu-ld GCC_VER_MAJ=4 SMP=1 PAGE_ATTR_FIX=0 COMPAT_ALLOC_USER_SPACE=compat_alloc_user_space
--- End code ---

makefile.patch

--- Code: ------ fglrx/build_mod/Makefile 2011-01-11 14:31:30.427033848 +0000
+++ fglrx/build_mod/Makefile 2011-01-11 14:33:51.979514906 +0000
@@ -66,6 +66,7 @@
                 -DFGL_GART_RESERVED_SLOT \
                 -DFGL_LINUX253P1_VMA_API \
                 -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
+                -DCOMPAT_ALLOC_USER_SPACE=$(COMPAT_ALLOC_USER_SPACE) \
 
 ifeq ($(KERNELRELEASE),)
 # on first call from remote location we get into this path
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version