Discussion

Mali GPU driver

134 125290
nnn2  

Roy360  
Post Last Edited by Roy360 at 2014-9-12 20:41

Post Last Edited by Roy360 at 2014-9-12 20:41

nnn2 Posted at 2014-9-12 08:55
http://antifa.pw/banana.7z



   Is this the image you promised? How do you use it? Win32 Disk Imager doesn't flash properly (ie. Red light), and PhoenixCard says to update the image.

nnn2  
Reply 72# Roy360


    It;s the simple debian-based image that has 100% working mplayer, nothing more. Not sure if that's what you were after.
Unpack it and flash to card, exactly like you do with raspbian. Need card min. 1 gb.

Hi people,
Bit of a noob at this but got to the stage when I can access a video file on a usb drive but can't seem to get it to play. Tried double cicking but nothing happens so ran it from terminal but got errors. Any ideas why?:

root@banana:/home/banana# mplayer /mnt/SIMPSONS-S04E02.mp4
Warning unknown option fullscreen at line 5
MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /mnt/SIMPSONS-S04E02.mp4.
Cache fill:  0.00% (0 bytes)   

Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (mpeg4), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [MP4V]  720x540  24bpp  29.970 fps  1967.0 kbps (240.1 kbyte/s)
Clip info:
major_brand: isom
minor_version: 512
compatible_brands: isomiso2mp41
creation_time: 1970-01-01 00:00:00
title: SIMPSONS_SEASON4_D1
encoder: DigiArty AV Encoder Core
genre: MyDVD
Load subtitles in /mnt/
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 6 ch, s16le, 177.0 kbit/4.18% (ratio: 22121->529200)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video

Tonband  
Hi nnn2,

i am new to the bpi, but i wanted to follow your instructions to compile the mali gpu driver. But there are still a lot of questions, and i'd like to ask you the following:

Build kernel normally, as per here. When you built uImage and modules, make sure it has mali.ko, for example:
...

Where do i have to look, if this mali.ko file already exists? Why do we need mali.ko?
  1. ls -la /lib/ |grep mali
Copy the Code
didn't found anything, so i think it is not there.

So, for working mali you said, we need our own kernel. Do we need it although in lubuntu
lsmod says: mail, mali_drm, drm and ump are loaded?
But your mali_drmsunxi_cedar_mod is not loaded. What does this module do, and where to get from?

Then i tried to compile the kernel (under Linux Mint 17), to get this this mali.ko and follow the "Building the kernel"-instructions on
http://wiki.lemaker.org/index.php?title=Building_u-boot,_script.bin_and_linux-kernel

Didn't work.
First:
  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install build-essential u-boot-tools uboot-mkimage binutils-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base g++-4.7-arm-linux-gnueabihf
  4. gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot kernel-package zlib1g-dev libncurses5-dev
Copy the Code
then i typed the following commands:
  1. git clone https://github.com/LeMaker/linux-bananapi.git
  2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig
  3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig  //didn't make changes here, mali support was already activated under gpu..
  4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules
Copy the Code
But this command didn't work, i got:
  1. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules
  2. make: arm-linux-gnueabihf-gcc: Command not found
  3. scripts/kconfig/conf --silentoldconfig Kconfig
  4. make: arm-linux-gnueabihf-gcc: Command not found
  5.   WRAP    arch/arm/include/generated/asm/auxvec.h
  6.   WRAP    arch/arm/include/generated/asm/bitsperlong.h
  7.   WRAP    arch/arm/include/generated/asm/cputime.h
  8.   WRAP    arch/arm/include/generated/asm/emergency-restart.h
  9.   WRAP    arch/arm/include/generated/asm/errno.h
  10.   WRAP    arch/arm/include/generated/asm/ioctl.h
  11.   WRAP    arch/arm/include/generated/asm/irq_regs.h
  12.   WRAP    arch/arm/include/generated/asm/kdebug.h
  13.   WRAP    arch/arm/include/generated/asm/local.h
  14.   WRAP    arch/arm/include/generated/asm/local64.h
  15.   WRAP    arch/arm/include/generated/asm/percpu.h
  16.   WRAP    arch/arm/include/generated/asm/poll.h
  17.   WRAP    arch/arm/include/generated/asm/resource.h
  18.   WRAP    arch/arm/include/generated/asm/sections.h
  19.   WRAP    arch/arm/include/generated/asm/siginfo.h
  20.   WRAP    arch/arm/include/generated/asm/sizes.h
  21.   CHK     include/linux/version.h
  22.   UPD     include/linux/version.h
  23.   CHK     include/generated/utsrelease.h
  24.   UPD     include/generated/utsrelease.h
  25.   Generating include/generated/mach-types.h
  26.   CC      kernel/bounds.s
  27. /bin/sh: 1: arm-linux-gnueabihf-gcc: not found
  28. make[1]: *** [kernel/bounds.s] Error 127
  29. make: *** [prepare0] Error 2
Copy the Code
What is wrong here? arm-linux-gnueabihf-gcc not found, but if i type
  1. sudp apt-get install arm-linux-gnueabihf-gcc
Copy the Code
he cannot find this package...

nnn2  
Try installing:
  1. apt-get install gcc-4.7-arm-linux-gnueabihf g++-4.7-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
Copy the Code
To check if you have mali in your lib, ls -la /lib/ isn't enough, it won't search for subdirectories etc. Try:
  1. find /lib -name mali.ko
Copy the Code
But your mali_drmsunxi_cedar_mod is not loaded. What does this module do, and where to get from?


I kinda forgot what all of the different modules do ^^ but I can assure you that all of them are required for playback.

You can start with my system I linked above, minimal debian with working mplayer, and just install what you want on top of it.

Tonband  
i wanna have a lubuntu 3.1.1, so your debian doesn't help me =(
Versioncheck can be done be compile and run version.c from sunxi-mali repository:

  1. cd sunxi-mali/version
  2. gcc version.c -o versionCheck
  3. sudo chmod +x versionCheck
  4. ./versionCheck
Copy the Code
It only shows r3p0. Current one is r4p1, but i don't get it to compile it from sources on
http://malideveloper.arm.com/dev ... nel-device-drivers/

so is this because the driver is not packaged in any other linux apart from bananian. So you need to install these GPU drivers?

ged  
Post Last Edited by ged at 2014-9-18 20:05
Hi nnn2,

i am new to the bpi, but i wanted to follow your instructions to compile the mali gpu driv ...
Tonband Posted at 2014-9-14 08:59



Hey Tonband,
couple of things...

You'll want to use apt-cache search <keyword/substring> to find the package like this:
  1. $ apt-cache search gnueabi
  2. mlton-runtime-arm-linux-gnueabihf - Optimizing compiler for Standard ML - armhf runtime libraries
Copy the Code



I'm not convinced that you need specify the compiler if you building on the BPi, since it's likely set-up for cross compiling...


With regular gcc, you can build with CROSS_COMPILE=""


  1. tar -zxvf DX910-SW-99002-r4p1-01rel0.tgz
  2. cd DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/mali
  3. # Comments out all the lines that fail the build because of negative array size
  4. for line_no in $(KDIR=/usr/src/linux-$(uname -r) BUILD=release CROSS_COMPILE="" make 2>&1 | grep negative | cut -d: -f2); do sed -i -e "${line_no}s-^..-\/\/-" linux/mali_kernel_linux.c; done
  5. KDIR=/usr/src/linux-$(uname -r) BUILD=release CROSS_COMPILE="" make
Copy the Code




I'll have to look at what you did for the kernel source, because I'm stuck at missing modpost script in the kernel sources/headers.

Tonband  
so is this because the driver is not packaged in any other linux apart from bananian. So you need to ...
orcaorcadia Posted at 2014-9-18 15:46


Yes, in fact, there is no Lubuntu (i wanna have Lubuntu), which is currently using latest drivers!
@ged:
If i want to compile on BPi, i don't need a cross-compiler, yes, i got that ;)
I tried to compile the driver with the kernel location:

  1.    KDIR=/usr/src/linux-headers-3.1.10-6-ac100 CONFIG=default BUILD=release make
Copy the Code

which results in:
  1. make -C /usr/src/linux-headers-3.1.10-6-ac100 M=/home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump modulesmake[1]: arm-none-linux-gnueabi-gcc: Kommando nicht gefundenmake[1]: Betrete Verzeichnis '/usr/src/linux-headers-3.1.10-6-ac100'  CC [M]  /home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_common.o/bin/sh: 1: arm-none-linux-gnueabi-gcc: not foundmake[2]: *** [/home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump/common/ump_kernel_common.o] Fehler 127make[1]: *** [_module_/home/bananapi/Downloads/DX910-SW-99002-r4p1-01rel0/driver/src/devicedrv/ump] Fehler 2make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-3.1.10-6-ac100'make: *** [all] Fehler 2
Copy the Code

.... i read, that others had the same problem, and didn't get it working yet.

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

Points Rules