Bpi-m2 Ultra kodi (xbmc)


(Олександр Кузьменко) #1

Hi everybody. I created this discussion because I need help with creating a media player based on BPI M2U.

Some information about image (img):

  1. uname -a

Linux bpi-iot-ros-ai 3.10.106-BPI-M2U-Kernel #1 SMP Sun Jun 25 18:07:21 EEST 2017 armv7l armv7l armv7l GNU/Linux

  1. dmesg

    … [ 1.397007] [drm] Initialized drm 1.1.0 20060810 … [ 1.783660] sunxi cedar version 0.1 [ 1.783757] [cedar]: install start!!! [ 1.783826] cedar_ve: cedar-ve the get irq is 85 [ 1.784328] [cedar]: install end!!! … [ 1.799415] sunxi gpu cooling probe start ! [ 1.799435] CPU gpu cooling register Success … [ 6.666931] Mali: Enable gpu power successfully. [ 6.667049] Mali: Set gpu frequency to 360 MHz [ 6.667164] Mali: Mali GPU initialization finished. [ 6.674652] usbcore: registered new interface driver option [ 6.678803] usbserial: USB Serial support registered for GSM modem (1-port) [ 6.684833] gpu cooling callback register Success [ 6.684851] Mali: Mali device driver loaded

  2. modinfo mali

    filename: /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/mali.ko version: r5p1-01rel0-964e72c0 author: ARM Ltd. license: GPL srcversion: E974EFBAF4956C9D5C6CE5D alias: of:NTCarm,mali-utgard* alias: of:NTCarm,mali-450* alias: of:NTCarm,mali-400* alias: of:NTCarm,mali-300* depends: ump vermagic: 3.10.106-BPI-M2U-Kernel SMP mod_unload modversions ARMv7 p2v8 parm: mali_debug_level:Higher number, more dmesg output (int) parm: mali_max_job_runtime:Maximum allowed job runtime in msecs. Jobs will be killed after this no matter what (int) parm: mali_l2_max_reads:Maximum reads for Mali L2 cache (int) parm: mali_dedicated_mem_start:Physical start address of dedicated Mali GPU memory. (uint) parm: mali_dedicated_mem_size:Size of dedicated Mali GPU memory. (uint) parm: mali_shared_mem_size:Size of shared Mali GPU memory. (uint) parm: mali_max_pp_cores_group_1:Limit the number of PP cores to use from first PP group. (int) parm: mali_max_pp_cores_group_2:Limit the number of PP cores to use from second PP group (Mali-450 only). (int)

  3. modinfo ump

    filename: /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/ump.ko version: -964e72c0 author: ARM Ltd. license: GPL srcversion: 9FE286C149D4A81A71963FF depends: vermagic: 3.10.106-BPI-M2U-Kernel SMP mod_unload modversions ARMv7 p2v8 parm: ump_backend:0 = dedicated memory backend (default), 1 = OS memory backend (int) parm: ump_memory_address:The physical address to map for the dedicated memory backend (uint) parm: ump_memory_size:The size of fixed memory to map in the dedicated memory backend (uint) parm: ump_debug_level:Higher number, more dmesg output (int) parm: ump_major:Device major number (int)

  4. glxinfo

    LIBGL: Initialising gl4es LIBGL: v0.9.7 built on Jun 25 2017 16:19:04 LIBGL:loaded: libGLESv1_CM.so LIBGL:loaded: libEGL.so LIBGL: Error while gathering supported extension (eglInitialize: EGL_BAD_DISPLAY), default to none LIBGL: Current folder is:/tmp/glshim Error: unable to open display

I`m have errors with display (ssh session) and mali_drm driver. Any help is welcome =)

Images history:

V001 - kernel 3.10.106/Ubuntu 16 https://mega.nz/#!nM8AAZZB!KRNUf_AZhDItS6fjpXqoeRgdvIcQCvSF9ZfRKA73IvI

SD (img) size: 16GB

Cred. : pi/bananapi (root/bananapi)

Kernels history:

3.10.106-BPI-M2U-Kernel: https://mega.nz/#F!CFFBVJpJ!mTqEf_zLY9B_xSp_3bsQoA

FAQ:

  1. Install kernel and modules (mali.ko,ump.ko,umplock.ko) on Centos/Debian/Ubuntu image

    3.10.106-BPI-M2U-Kernel with maki.ko, ump.ko, umplock.ko

    How install:

    1. BPI-BOOT-bpi-m2u.tgz mkdir /tmp/mmc mount /dev/mmcblk0p1 /tmp/mmc

    Extract BPI-BOOT-bpi-m2u.tgz to /tmp/mmc/bananapi/bpi-m2u/linux/

    umount /tmp/mmc sync

    1. BOOTLOADER-bpi-m2u.tgz Extract BOOTLOADER-bpi-m2u.tgz to /usr/lib/u-boot/bananapi/bpi-m2u/

    2. 3.10.106-BPI-M2U-Kernel.tgz Extract BOOTLOADER-bpi-m2u.tgz to /lib/modules/

    3. Install modules maki.ko, ump.ko, umplock.ko mkdir /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu cp umplock.ko /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/ cp ump.ko /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/ cp maki.ko /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/ depmod ldconfig insmod /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/umplock.ko insmod /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/ump.ko insmod /lib/modules/3.10.106-BPI-M2U-Kernel/kernel/drivers/gpu/mali.ko reboot


BPI-M2 Ultra Volumio open source project
Mali drivers GPU
An unofficial method to solve instability problem
(bpi team) #2

very cool ,thank you share your image .:wink:


(Денис Маслюк) #3

Shrinked for emmc (8GB img): https://drive.google.com/open?id=0B1SQgCuVGpOwXzkwWmNRM1QzUWM


(Олександр Кузьменко) #4

Updated first post with links to last kernel and modules for install on clean system (Debian/Centos/Ubuntu etc) with instructions.


(Олександр Кузьменко) #5

Any ideas? )))) how fix it
Xorg.log (xinit &) log when unsing mali_drv.so: Driver “mali”

[    73.737] (II) LoadModule: "glx"
[    73.739] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    75.789] (II) Module glx: vendor="X.Org Foundation"
[    75.790]    compiled for 1.18.4, module version = 1.0.0
[    75.790]    ABI class: X.Org Server Extension, version 9.0
[    75.790] (==) AIGLX enabled
[    75.790] (II) LoadModule: "mali"
[    75.791] (II) Loading /usr/lib/xorg/modules/drivers/mali_drv.so
[    75.792] (II) Module mali: vendor="X.Org Foundation"
[    75.792]    compiled for 1.18.4, module version = 0.4.2
[    75.792]    ABI class: X.Org Video Driver, version 20.0
[    75.792] (II) MALI: driver for Mali Framebuffer: mali
[    75.828] (WW) Falling back to old probe method for mali
[    75.828] (II) MALI(0): using default device
[    75.828] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    75.829] (II) MALI(0): [MaliPreInit:1046]: Entering
[    75.829] (II) MALI(0): [MaliGetRec:179]: Entering
[    75.829] (II) MALI(0): [MaliHWInit:829]: Entering
[    75.829] (II) MALI(0): [MaliHWGetDepth:861]: Entering
[    75.829] (II) MALI(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    75.829] (==) MALI(0): Depth 24, (==) framebuffer bpp 32
[    75.829] (==) MALI(0): RGB weight 888
[    75.829] (==) MALI(0): Default visual is TrueColor
[    75.829] (==) MALI(0): Using gamma correction (1.0, 1.0, 1.0)
[    75.829] (II) MALI(0): [MaliHWGetVidmem:879]: Entering
[    75.829] (II) MALI(0): [MaliHWGetName:887]: Entering
[    75.829] (II) MALI(0): hardware:  (video memory: 7200kB)
[    75.829] (**) MALI(0): Option "DRI2" "true"
[    75.829] (**) MALI(0): Option "DRI2_PAGE_FLIP" "true"
[    75.829] (**) MALI(0): DRI Fullscreen page flip enabled
[    75.829] (**) MALI(0): DRI Fullscreen page flip VSYNC disabled
[    75.829] (**) MALI(0): Use uncached UMP memory
[    75.829] (**) MALI(0): Don't use umplock across processes
[    75.922] (EE) MALI(0): [mali_drm_open_master:1015] Error: mali_drm_open_master Unable to open DRM: No such file or directory
[    75.922] (EE) MALI(0): [MaliPreInit:1148] Error: Failed to be master of DRM!
[    75.922] (II) UnloadModule: "mali"
[    75.922] (EE) Screen(s) found, but none have a usable configuration.

Xorg.log (xinit &) log when unsing fbturbo_drv.so: Driver “fbturbo”

[   285.650] (II) LoadModule: "glx"
[   285.653] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   287.705] (II) Module glx: vendor="X.Org Foundation"
[   287.705]    compiled for 1.18.4, module version = 1.0.0
[   287.705]    ABI class: X.Org Server Extension, version 9.0
[   287.705] (==) AIGLX enabled
[   287.705] (II) LoadModule: "fbturbo"
[   287.707] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[   287.721] (EE) Failed to load /usr/lib/xorg/modules/drivers/fbturbo_drv.so: libUMP.so.3: cannot open shared object file: No such file or directory
[   287.721] (II) UnloadModule: "fbturbo"
[   287.721] (II) Unloading fbturbo
[   287.721] (EE) Failed to load module "fbturbo" (loader failed, 7)
[   287.722] (==) Matched modesetting as autoconfigured driver 0
[   287.722] (==) Matched fbdev as autoconfigured driver 1
[   287.722] (==) Assigned the driver to the xf86ConfigLayout
[   287.722] (II) LoadModule: "modesetting"
[   287.724] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   287.733] (II) Module modesetting: vendor="X.Org Foundation"
[   287.733]    compiled for 1.18.4, module version = 1.18.4
[   287.733]    Module class: X.Org Video Driver
[   287.733]    ABI class: X.Org Video Driver, version 20.0
[   287.733] (II) LoadModule: "fbdev"
[   287.735] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   287.738] (II) Module fbdev: vendor="X.Org Foundation"
[   287.739]    compiled for 1.18.1, module version = 0.4.4
[   287.739]    Module class: X.Org Video Driver
[   287.739]    ABI class: X.Org Video Driver, version 20.0
[   287.739] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   287.739] (II) FBDEV: driver for framebuffer: fbdev
[   287.782] (WW) Falling back to old probe method for modesetting
[   287.782] (EE) open /dev/dri/card0: No such file or directory
[   287.782] (WW) Falling back to old probe method for fbdev
[   287.782] (II) Loading sub module "fbdevhw"
[   287.782] (II) LoadModule: "fbdevhw"
[   287.784] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[   287.787] (II) Module fbdevhw: vendor="X.Org Foundation"
[   287.787]    compiled for 1.18.4, module version = 0.0.2
[   287.787]    ABI class: X.Org Video Driver, version 20.0
[   287.788] (II) FBDEV(0): using default device
[   287.788] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   287.788] (II) FBDEV(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[   287.788] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[   287.788] (==) FBDEV(0): RGB weight 888
[   287.788] (==) FBDEV(0): Default visual is TrueColor
[   287.788] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[   287.788] (II) FBDEV(0): hardware:  (video memory: 7200kB)
[   287.789] (II) FBDEV(0): checking modes against framebuffer device...
[   287.789] (II) FBDEV(0): checking modes against monitor...
[   287.789] (--) FBDEV(0): Virtual size is 1280x720 (pitch 1280)
[   287.789] (**) FBDEV(0):  Built-in mode "current"
[   287.789] (==) FBDEV(0): DPI set to (96, 96)
[   287.789] (II) Loading sub module "fb"
[   287.789] (II) LoadModule: "fb"
[   287.791] (II) Loading /usr/lib/xorg/modules/libfb.so
[   287.800] (II) Module fb: vendor="X.Org Foundation"
[   287.800]    compiled for 1.18.4, module version = 1.0.0
[   287.800]    ABI class: X.Org ANSI C Emulation, version 0.4
[   287.800] (**) FBDEV(0): using shadow framebuffer
[   287.800] (II) Loading sub module "shadow"
[   287.800] (II) LoadModule: "shadow"
[   287.802] (II) Loading /usr/lib/xorg/modules/libshadow.so
[   287.807] (II) Module shadow: vendor="X.Org Foundation"
[   287.807]    compiled for 1.18.4, module version = 1.1.0
[   287.807]    ABI class: X.Org ANSI C Emulation, version 0.4
[   287.808] (II) UnloadModule: "modesetting"
[   287.808] (II) Unloading modesetting
[   287.808] (==) Depth 24 pixmap format is 32 bpp
[   287.847] (==) FBDEV(0): Backing store enabled
[   287.853] (==) FBDEV(0): DPMS enabled
[   287.854] (==) RandR enabled
[   287.918] (II) SELinux: Disabled on system
[   287.926] (II) AIGLX: Screen 0 is not DRI2 capable
[   287.927] (EE) AIGLX: reverting to software rendering
[   288.377] (EE) AIGLX error: dlopen of /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
[   288.377] (EE) GLX: could not load software renderer
[   288.377] (II) GLX: no usable GL providers found for screen 0

....
LIBGL: Error while gathering supported extension (eglInitialize: EGL_BAD_DISPLAY), default to none

#6

It is not an answer but I gave BSP a try with the mali thing just to see how far i could go, i was able to build mali.ko, ump.ko and umplock.ko but was unable to build mali_drm.ko due to missing headers (drm) for this mali version. I could not find libMali.ko unless i borrowed it from another vendor as a test.

I think for the X11 session and fbturbo you need mali_drm. How did you get (or build) mali_drm.ko? and libUMP.ko and libMali.ko?


(Олександр Кузьменко) #7

libMali.so and libUMP.so you can find there:

https://github.com/hardkernel/buildroot/tree/master/package/opengl/src/lib/eabihf/r5p1

m400-X - for X11
m400     - for framebuffer

For X11 need use m400-X and FBDEV driver, becouse mali driver require mali_drm. BUT, mali_drm.ko is not exist for kernel version 3.10


(Reinier Millo Sánchez) #8

Hi, I have compiled OpenELEC with Kodi 17.3 to a BananaPi M2 Ultra. I’m using the OpenELEC-OPI2 support as base. Currently I have Kodi running on tge BPI M2u using OpenGLES-FB to handle the graphical interface. At the moment the board gets very hot on video reproduction, because all decoding is handled by software.

I’m trying to support the CedarX prebuilt binaries to perform the video decoding. I have found many variants of the CedarX API in the web and tried it but fails. In my case the Opengles that i’m using is compiled with float-abi softfp and some CedarX apis can’t be used because are compiled with float-abi hard.

Somebody have tested CedarX on the BPi M2U and can share the used API and how to use it?

Best regards


(Олександр Кузьменко) #9

Great news) maybe you can share image?


(Ryan Hernandez) #10

New here, can some share the working image for BPI M2U with Kodi. Thanks


(Oscar ) #11

Please, share your image, thank you.


(Sanya) #12

hello everyone! Does anyone have a working image for Kodi?


#13

Ребят, так запустить Kodi можно в итоге на Linux, или нет? Может, какие альтернативы есть? Не коди, а какой-нибудь другой медиацентр… Купил железку, как универсальное устройство - медиацентр/сервер автоматизации умный дом, а медиацентр как-то не очень получается…

So, in result, can anyone start Kodi and play films with hw acceleration?


(Олександр Кузьменко) #14

Нет, покачто не работает kodi на этом устройстве


#15

Олександр, спасибо за ответ :). А разработчики еще поддерживают данное устройство (M2U)? Они проблемой данной озадачены, или не решают? Есть у ник в какой-нибудь багзилле тикет по коди? Или разрабы считают, что видеоплеера определенной марки с поддержкой vdpau достаточно? Как я понял, вся проблема в проприетарной часть mali? Есть только бинарник под определенную версию ядра? Или дело не в этом?

Небольшой опыт по сборке ядер есть (в области виртуализации правда: Xen, KVM), но вот с графическим окружением бодаться не приходилолсь.


#16

P.S.

А вот вроде пишут, что есть сборка Kodi на OpenElec Такое никто не пробовал собирать? Что-нибудь получалось?


(Олександр Кузьменко) #17

Проблема в видеоускорителе. Нет блобов для нашей версии. Но есть блобы для ядра 3.4. Но этого ядра нет поддержки m2u. Есть блобы для ядра 4.1, но это ядро поддерживает не все драйвера m2u. Вот и вся проблема. В публичном доступе есть драйвера r6p1 с блобами, но этот драйвер собирается на ядре 4.1+


#18

Да уж. Как все сложно. Зачем бананы используют ядро 3.10? Какого функционала не хватает в ветке 3.4? А зачем тогда было олвинерам делать юсерспэйс-драйвер для ядра 3.4 и игнорить 3.10 и более свежие lts релизы… Это из-за android? Эти ядра (3.4 и 4.1) используются в android?


(Олександр Кузьменко) #19

В M2U 3.10.65 в Android. Когда было ядро 3.4 - еще не было M2U. Совместимость никто не будет делать. Для ядра 4.* еще много драйверов нет, только базовая поддержка аппаратной части


#20

Я думал эту банана как нас использовать и заодно как медиацентр. Но, в конечном итоге, использую только как смотрелку фильмов с сетевого диска. Андроид вполне нормально на ней работает.