Lubuntu

[Needed] Tutorial for installing latest mali gpu driver

14 23470
Tonband  
Hi there bPi-Community,

i received my BananaPi last week and installed the latest provided lubuntu 3.1.1.
But it don't feel snappy at all, so i wanted to install the latest mali400 gpu driver.

Current Version of the driver is:
  1. /sbin/modinfo mali
Copy the Code
-> r2p8. Very,very old. Current Version is r4p1 -> http://malideveloper.arm.com/dev ... nel-device-drivers/

So how to update this driver, can anyone please help?
What i did so far and didn't work:

Followed the Tutorial on http://linux-sunxi.org/Mali_binary_driver and installed the UMP (Unified Memory Provider) userspace library and the Mali userspace driver.
This did not work, modinfo still says: r2p8
Tonband  
Next try:
Get sources from http://malideveloper.arm.com/dev ... nel-device-drivers/
and unpack.
go to:
  1. ./DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/
Copy the Code
and open readme.
It says:
Build the UMP Device Driver for Linux by running the following make command:

KDIR=<kdir_path> CONFIG=<your_config> BUILD=<build_option> make

where
    kdir_path: Path to your Linux Kernel directory
    your_config: Name of the sub-folder to find the required config.h file
                 ("arch-" will be prepended)
    build_option: debug or release. Debug is default.

What is the path to the linux kernel on lubuntu?
i tried
  1. /usr/src/linux-headers-3.1.10-6
  2. /lib/modules/3.4.90/kernel
Copy the Code
nothing worked here...errors all the time.

Tonband  
Followed again a tutorial ->
https://www.olimex.com/forum/index.php?topic=1910.0
but nothing changed..mali still version r2p8

  1. apt-get install build-essential xorg-dev xutils-dev libdrm-dev x11proto-dri2-dev libltdl-dev libtool automake
  2. git clone https://github.com/linux-sunxi/sunxi-mali.git
  3. cd sunxi-mali
  4. git clone https://github.com/robclark/libdri2
  5. cd libdri2
  6. ./autogen.sh --prefix=/usr
  7. make
  8. make install
  9. cd ..
  10. git submodule init
  11. git submodule update
  12. make install
  13. cd ..
  14. git clone https://github.com/ssvb/xf86-video-sunxifb.git
  15. cd xf86-video-sunxifb
  16. autoreconf -vi
  17. ./configure --prefix=/usr
  18. make
  19. make install
  20. cp xorg.conf /usr/share/X11/xorg.conf.d/99-sunxifb.conf
Copy the Code

snypa  
Post Last Edited by snypa at 2014-9-16 20:07
i tried
/usr/src/linux-headers-3.1.10-6
/lib/modules/3.4.90/kernel
Copy Code
nothing worked here...errors all the time.


There's another kernel folder inside /usr/src. Tried to use it and stopped with this warning:

make KDIR=/usr/src/linux-headers-3.1.10-6-ac100/ CONFIG=arch-default/          BUILD=release
make -C /usr/src/linux-headers-3.1.10-6-ac100/ M=/home/bananapi/Downloads/DX910-         SW-99002-r4p1-01rel0/driver/src/devicedrv/ump modules
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/usr/src/linux-headers-3.1.10-6-ac100'
/home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/Kbu         ild:17: Current directory is /home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0         /driver/src/devicedrv/ump
/home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/Kbu         ild:18: *** No configuration found for config arch-default/. Check that arch-arc         h-default//config.h exists.  Stop.
make[1]: *** [_module_/home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver         /src/devicedrv/ump] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.1.10-6-ac100'
make: *** [all] Error 2

make[1]: arm-none-linux-gnueabi-gcc: Command not found


apt-cache search could not find it. So i guess this can only be done with a PC?

Reply 1# Tonband

modinfo does not return the driver-version of the Mali module(not for me atleast).
you are most probably referring to the "p2v8" in the version magic string returned by modinfo.
if yes,then that is only a version check string against the kernel's vermagic so that an inappropriate module doesn't get loaded.
it will be the same for all modules.

to check the actual driver version I use the version check utility provided in the sunxi-mali github
https://github.com/linux-sunxi/sunxi-mali
simply compile the version.c file or use the one I've attached here.
For me it returns "r3p0"

version.tar.gz

2.91 KB, Downloads: 137

Mali Version Check

Tonband  
Yes, sashijoseph, you're right, i referred to vermagic string.
I didn't know, that this string will not change, if i install a new driver.

Thanks, i will try this sunxi-thing and and report!

Tonband  
So i testet it right now, and it returns:
r3p0.

So how to come to r4p1 now?
Thanks to all by the way, who helped so far...

snypa  
Back again.

Successfully installed Mali binary driver from sunxi.

Now the updated drivers.
I'm using a X64 PC with Lubuntu 14.10

1- Compiled the kernel for bananapi using the lemaker wiki (1GB download Holy Christ! )
2- Download the DX910-SW-99002-r4p1-01rel0 driver and installed arm-none-eabi- packages
3- First error:

diego@amdlinux:~/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump$ KDIR=~/linux-bananapi/ CONFIG=arch-default BUILD=release  make
make -C /home/diego/linux-bananapi/ M=/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump modules
make[1]: Entering directory '/home/diego/linux-bananapi'
make[1]: arm-none-linux-gnueabi-gcc: Comando não encontrado (command not found)
/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/Kbuild:17: Current directory is /home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump
/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/Kbuild:18: *** No configuration found for config arch-default. Check that arch-arch-default/config.h exists.  Pare.
Makefile:1365: recipe for target '_module_/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump' failed
make[1]: *** [_module_/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump] Error 2
make[1]: Leaving directory '/home/diego/linux-bananapi'
Makefile:60: recipe for target 'all' failed
make: *** [all] Error 2


Again. Now using: KDIR=~/linux-bananapi/ CONFIG=arch-default BUILD=release CROSS_COMPILE=arm-none-eabi-  make

make -C /home/diego/linux-bananapi/ M=/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump modules
make[1]: Entering directory '/home/diego/linux-bananapi'
/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/Kbuild:17: Current directory is /home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump
/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/Kbuild:18: *** No configuration found for config arch-default. Check that arch-arch-default/config.h exists.  Pare.
Makefile:1365: recipe for target '_module_/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump' failed
make[1]: *** [_module_/home/diego/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump] Error 2
make[1]: Leaving directory '/home/diego/linux-bananapi'
Makefile:60: recipe for target 'all' failed
make: *** [all] Error 2

Tonband  
Sooo,

  1. # KDIR=~/linux-bananapi CONFIG=default BUILD=release make
Copy the Code
returns:

  1. make -C /root/linux-bananapi M=/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump modules
  2. make[1]: arm-none-linux-gnueabi-gcc: Command not found
  3. make[1]: Entering directory `/root/linux-bananapi'
  4.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_common.o
  5. /bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
  6. make[2]: *** [/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_common.o] Error 127
  7. make[1]: *** [_module_/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump] Error 2
  8. make[1]: Leaving directory `/root/linux-bananapi'
  9. make: *** [all] Error 2
Copy the Code
ok, that looked like snypa's...

But now! we do not need CROSS_COMPILE, because we are native on BananaPI, so:

  1. # KDIR=~/linux-bananapi CONFIG=default BUILD=release CROSS_COMPILE=  make  
Copy the Code
returns:


  1. make -C /root/linux-bananapi M=/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump modules
  2. make[1]: Entering directory `/root/linux-bananapi'
  3.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_common.o
  4.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_descriptor_mapping.o
  5.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_api.o
  6.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_ref_drv.o
  7.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_kernel_linux.o
  8.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_kernel_memory_backend_os.o
  9.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_kernel_memory_backend_dedicated.o
  10.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_memory_backend.o
  11.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_ukk_wrappers.o
  12.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_ukk_ref_wrappers.o
  13.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_osk_atomics.o
  14.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_osk_low_level_mem.o
  15.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_osk_misc.o
  16.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/linux/ump_kernel_random_mapping.o
  17.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/../mali/linux/mali_osk_atomics.o
  18.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/../mali/linux/mali_osk_locks.o
  19.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/../mali/linux/mali_osk_memory.o
  20.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/../mali/linux/mali_osk_math.o
  21.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/../mali/linux/mali_osk_misc.o
  22.   LD [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/ump.o
  23.   Building modules, stage 2.
  24.   MODPOST 1 modules
  25.   CC      /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/ump.mod.o
  26.   LD [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/ump.ko
  27. make[1]: Leaving directory `/root/linux-bananapi'
  28. KDIR=~/linux-bananapi CONFIG=default BUILD=release CROSS_COMPILE= make  18.10s user 3.16s system 69% cpu 30.733 total
Copy the Code
which looks very nice.
So what to do now? Copy stuff anywhere...?

Tonband  
But with mali:

  1. ..-r4p1-01rel0/driver/src/devicedrv/mali # KDIR=~/linux-bananapi CONFIG=default BUILD=release CROSS_COMPILE=  make
Copy the Code
results in:

  1. Makefile:43: "You have specified the CONFIG variable which is no longer in used. Use TARGET_PLATFORM instead."
  2. Makefile:110: CONFIG_TRACEPOINTS required for profiling
  3. make ARCH=arm -C /root/linux-bananapi M=/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali modules
  4. make[1]: Entering directory `/root/linux-bananapi'
  5.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali/linux/mali_osk_atomics.o
  6.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali/linux/mali_osk_irq.o
  7.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali/linux/mali_osk_wq.o
  8. ...
  9. ...
  10. ..

  11.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali/common/mali_group.o
  12.   CC [M]  /root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali/common/mali_dlbu.o
  13. ^Cmake[2]: *** [/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali/common/mali_dlbu.o] Interrupt
  14. make[1]: *** [_module_/root/MALI_DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali] Interrupt
  15. make: *** [all] Interrupt

  16. KDIR=~/linux-bananapi CONFIG=default BUILD=release CROSS_COMPILE= make  59.32s user 6.19s system 75% cpu 1:26.91 total
Copy the Code

You have to log in before you can reply Login | Sign Up

Points Rules