Which Rockchip SOC are you using?
I'm using a NanoPi M4, so RK3399.
Which Rockchip SOC are you using?
I'm using a NanoPi M4, so RK3399.
I feel ridiculously stupid, but my problem was that the linux-qpi-headers package on Archlinux ARM does not match the regular kernel version. There was probably a difference in some constant that my kernel gave another meaning to (see the "type 9" vs "type 10" in the good and bad logs I posted above.
Installing matching linux-api-headers and just rebuilding everything as I was doing (so linux and ffmpeg with the LibreELEC rockchip patches for linux 6.2.x) accelerated HEVC now works like a charm.
Thank you again LIbreELEC devs for maintaining these patches for already so long for this trusty little ARM chip.
Hi robertoj,
I have just Frankenstein-extracted the LibreELEC SYSTEM partition and by bind mounting /dev, /proc, and /sys, chrooting into the extracted directory, and running /lib/kodi/kodi.sh I could get Kodi to run, audio and video and all, and I could effortlessly play an HEVC file.
This means my patched 64-bit kernel contains all the necessary and correct bits to play back HEVC properly, and the problem as you suspected lies with either ffmpeg or kodi.
Since building kodi with (patched) ffmpeg in-tree is such a hassle, I am reworking my kodi build to use a system installed ffmpeg which I can patch and replace more easily.
Hi everyone,
I really appreciate all the RockChip work done here, but LibreELEC as a distribution does not fit my needs.
Therefore I have created packages for my distribution with the LibreELEC patches and keep kernel+Kodi versions aligned with LibreELEC insofar the patches apply and work.
Currently I am running LInux 6.2.2 (patches for 6.1.2 applied cleanly), Kodi 20.0, FFMPEG 4.4.1-Nexus-Alpha1 (LibreELEC patches which seem to be for 5.1.2 apply cleanly here too).
I have most things working fine, except that I cannot seem to decode HEVC content which does work on LibreELEC when I checked last week.
For the kernel, I have applied these patches:
https://github.com/LibreELEC/Libr…s/linux/default
For FFMPEG; I applied these patches:
https://github.com/LibreELEC/Libr…s/v4l2-drmprime
https://github.com/LibreELEC/Libr…es/v4l2-request
My build scripts can be found here (the FFMPEG patches I integrated into Kodi's FFMPEG build as that is how my distro builds kodi):
I have an old Kodi log of mine (Kodi 19.0 Alpha,FFMPEG 4.2.2, Linux 5.7.0) which shows the HEVC decoding working: kodi_working.log
It goes on to probe the various devices, set up the pixel format yuv420p10le, and continue on its merry way.
Currently, running the above patched binaries, I get the story in "kodi_broken.log"
For some reason it can't set the format it wants on the v4l2 device.
Note: this latter log is produced by trying to play a file that plays correctly under LIbreELEC.
Is there some Kodi or FFMPEG or Linux configuration that might cause this difference?
Aside from sifting through LibreELEC patches, I have tried:
I will try using FFMPEG 5.1.2 but I fear that won't make much difference, as I've had this problem for quite a while (since right after the "kodi_working.log".
Any help is much appreciated!
PROJECT=ARM DEVICE=ARM-ALL ARCH=aarch64 PLATFORM=RK UBOOT_SYSTEM=rk3399-nanopi-m4 make image
Thanks, that did the trick.
I wanted to evaluate the mainline/LibreELEC/your status with respect to two things that are completely eluding me in my setup:
1. 4K resolution output. My edid seems to report 4K modes (e.g. CEA 93/94/95/98/99/100 are 2160p24/25/30 resolutions) but I can't seem to get anything (e.g. the kodi UI itself) to output at those resolutions:
Section "Monitor"
Identifier "LG TV"
ModelName "LG TV"
VendorName "GSM"
# Monitor Manufactured week 1 of 2015
# EDID version 1.3
# Digital Display
DisplaySize 1600 900
Gamma 2.20
Option "DPMS" "false"
Horizsync 30-83
VertRefresh 58-62
# Maximum pixel clock is 160MHz
#Not giving standard mode: 640x480, 60Hz
#Not giving standard mode: 800x600, 60Hz
#Not giving standard mode: 1024x768, 60Hz
#Not giving standard mode: 1152x864, 60Hz
#Not giving standard mode: 1280x1024, 60Hz
#Extension block found. Parsing...
#WARNING: I may have missed a mode (CEA mode 93)
#WARNING: I may have missed a mode (CEA mode 94)
#WARNING: I may have missed a mode (CEA mode 95)
#WARNING: I may have missed a mode (CEA mode 98)
#WARNING: I may have missed a mode (CEA mode 99)
#WARNING: I may have missed a mode (CEA mode 100)
Modeline "Mode 16" 74.25 1920 2008 2052 2200 540 542 547 562 +hsync +vsync interlace
Modeline "Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 1" 85.50 1360 1424 1536 1792 768 771 777 795 +hsync +vsync
Modeline "Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 3" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
Modeline "Mode 5" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
Modeline "Mode 6" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
Modeline "Mode 7" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
Modeline "Mode 8" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
Modeline "Mode 9" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
Modeline "Mode 10" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
Modeline "Mode 11" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 12" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 13" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 14" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
Modeline "Mode 15" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
Modeline "Mode 17" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync
Option "PreferredMode" "Mode 16"
EndSection
Display More
2. HDMI audio passthrough (Dolby, DTS, TrueHD, Atmos). I've had my best trial run with @Joern-p's builds, but they are still on the Rockchip 4.4 kernel with some minor patches. The only thing that didn't work there was one of the HD audio bitstream formats (be it Atmos or TrueHD, I don't remember).
Unfortunately, the freshly built image does not want to boot on my NanoPi M4 from SD card. I have no means to actually debug boot issues so I'm just going to hope you (or someone else) can comment on the above two issues and perhaps point me in the direction of patches you use to make this work (if at all). Thanks!
I tried building your arm-master branch:
GitHub - 150balbes/LibreELEC.tv at master-arm
But it failed on u-boot-scripts:
$ PROJECT=ARM DEVICE=ARM-ALL ARCH=aarch64 UBOOT_SYSTEM=rk3399-nanopi-m4 make image
./scripts/image mkimage
=================================================================================
Configuration for LibreELEC (community)
=================================================================================
Buildoptions:
======================================================
- CPU (ARCH): cortex-a53 (aarch64)
- FLOAT:
- FPU:
- CPU features: 64bit neon
- LTO (Link Time Optimization) support: yes
- GOLD (Google Linker) Support: yes
- LLVM support: no
- DEBUG: no
Graphic configuration:
======================================================
- OpenGL (GLX) support (provider): no (no)
- OpenGLES support (provider): yes (mesa)
Hardware decoder configuration:
======================================================
- Kodi Player driver: mesa
- VAAPI Support: no
- VDPAU Support: no
Input device configuration:
======================================================
- Remote support: yes
- CEC Adapter support: yes
- CEC Framework support: yes
- Kodi Joystick support: yes
Misc. hardware configuration:
======================================================
- ALSA support: yes
- Pulseaudio support: yes
- Bluetooth support: yes
- Include driver: RTL8192CU
- Include driver: RTL8192DU
- Include driver: RTL8192EU
- Include driver: RTL8188EU
- Include driver: RTL8812AU
- Include driver: RTL88x2BU
- Include driver: RTL8189ES
- Include driver: RTL8189FS
- Include driver: RTL8821CU
- Include driver: RTL8822BS
- Include driver: RTL8723DS
- Include driver: RTL8188FU
- Include firmware: brcmfmac_sdio-firmware
- Include firmware: kernel-firmware
- Include firmware: dvb-firmware
- Include firmware: misc-firmware
- Include firmware: wlan-firmware
Network service configuration:
======================================================
- Avahi (Zeroconf) support: yes
- NFS mounting support: yes
- SAMBA mounting support: yes
- SAMBA server support: yes
- SFTP server support: yes
- OpenVPN support: yes
- WireGuard support: yes
OS configuration:
======================================================
- OEM Support: no
- Default ROOT Password: libreelec
- Bootloader: u-boot
- UDevil support: yes
- Installer support: no
- Include package: u-boot-script
- Include package: dtc
- Include package: ethmactool
Misc. Filesystems:
======================================================
- Swap Support: yes
- Swapfile default size: 128
- exFAT Support (via Fuse): yes
- NTFS Support (via Fuse): yes
- Install HFS Tools: yes
Kodi configuration:
======================================================
- Kodi version: kodi
- Kodi Blu-Ray support: yes
- Bluray BD+ support: yes
- Bluray AACS support: yes
- Kodi DVDCSS support: yes
- Kodi Airplay support: yes
- Kodi Airtunes support: yes
- Kodi NFS support: yes
- Kodi MySQL support: mariadb
- Kodi Optical Drive support: yes
- Kodi SAMBA client support: yes
- Kodi UPNP support: yes
- Kodi Webserver support: yes
- Include Skin: Estuary
- Default Skin: Estuary
- Include extra fonts: yes
=================================================================================
End Configuration for LibreELEC
=================================================================================
Packages loaded : 881
Build trigger(s): 1 [image]
Package steps : 272
<<< configtools:host seq 2 <<<
>>> configtools:host seq 2 >>>
[001/272] [DONE] build configtools:host
<<< make:host seq 1 <<<
>>> make:host seq 1 >>>
[002/272] [DONE] build make:host
<<< brcmfmac_sdio-firmware:target seq 3 <<<
INSTALL brcmfmac_sdio-firmware (target)
>>> brcmfmac_sdio-firmware:target seq 3 >>>
[003/272] [DONE] install brcmfmac_sdio-firmware:target
<<< wireless-regdb:target seq 5 <<<
INSTALL wireless-regdb (target)
>>> wireless-regdb:target seq 5 >>>
[004/272] [DONE] install wireless-regdb:target
<<< alsa-topology-conf:target seq 8 <<<
INSTALL alsa-topology-conf (target)
>>> alsa-topology-conf:target seq 8 >>>
[005/272] [DONE] install alsa-topology-conf:target
<<< ethmactool:target seq 6 <<<
INSTALL ethmactool (target)
>>> ethmactool:target seq 6 >>>
[006/272] [DONE] install ethmactool:target
<<< kernel-firmware:target seq 4 <<<
INSTALL kernel-firmware (target)
>>> kernel-firmware:target seq 4 >>>
[007/272] [DONE] install kernel-firmware:target
<<< texturecache.py:target seq 7 <<<
INSTALL texturecache.py (target)
>>> texturecache.py:target seq 7 >>>
[008/272] [DONE] install texturecache.py:target
<<< alsa-ucm-conf:target seq 9 <<<
INSTALL alsa-ucm-conf (target)
>>> alsa-ucm-conf:target seq 9 >>>
[009/272] [DONE] install alsa-ucm-conf:target
<<< ccache:host seq 11 <<<
>>> ccache:host seq 11 >>>
[010/272] [DONE] build ccache:host
<<< ir-bpf-decoders:target seq 10 <<<
INSTALL ir-bpf-decoders (target)
>>> ir-bpf-decoders:target seq 10 >>>
[011/272] [DONE] install ir-bpf-decoders:target
<<< m4:host seq 12 <<<
>>> m4:host seq 12 >>>
[012/272] [DONE] build m4:host
<<< xz:host seq 18 <<<
>>> xz:host seq 18 >>>
[013/272] [DONE] build xz:host
<<< autoconf-archive:host seq 14 <<<
>>> autoconf-archive:host seq 14 >>>
[014/272] [DONE] build autoconf-archive:host
<<< openssl:host seq 15 <<<
>>> openssl:host seq 15 >>>
[015/272] [DONE] build openssl:host
<<< intltool:host seq 16 <<<
>>> intltool:host seq 16 >>>
[016/272] [DONE] build intltool:host
<<< gettext:host seq 13 <<<
>>> gettext:host seq 13 >>>
[017/272] [DONE] build gettext:host
<<< bzip2:host seq 17 <<<
>>> bzip2:host seq 17 >>>
[018/272] [DONE] build bzip2:host
<<< p7zip:host seq 19 <<<
>>> p7zip:host seq 19 >>>
[019/272] [DONE] build p7zip:host
<<< bison:host seq 20 <<<
>>> bison:host seq 20 >>>
[020/272] [DONE] build bison:host
<<< gmp:host seq 22 <<<
>>> gmp:host seq 22 >>>
[021/272] [DONE] build gmp:host
<<< sed:host seq 21 <<<
>>> sed:host seq 21 >>>
[022/272] [DONE] build sed:host
<<< libcap:host seq 23 <<<
>>> libcap:host seq 23 >>>
[023/272] [DONE] build libcap:host
<<< swig:host seq 24 <<<
>>> swig:host seq 24 >>>
[024/272] [DONE] build swig:host
<<< pkg-config:host seq 26 <<<
>>> pkg-config:host seq 26 >>>
[025/272] [DONE] build pkg-config:host
<<< autoconf:host seq 25 <<<
>>> autoconf:host seq 25 >>>
[026/272] [DONE] build autoconf:host
<<< ncurses:host seq 27 <<<
>>> ncurses:host seq 27 >>>
[027/272] [DONE] build ncurses:host
<<< mpfr:host seq 28 <<<
>>> mpfr:host seq 28 >>>
[028/272] [DONE] build mpfr:host
<<< fakeroot:host seq 29 <<<
>>> fakeroot:host seq 29 >>>
[029/272] [DONE] build fakeroot:host
<<< automake:host seq 31 <<<
>>> automake:host seq 31 >>>
[030/272] [DONE] build automake:host
<<< mpc:host seq 32 <<<
>>> mpc:host seq 32 >>>
[031/272] [DONE] build mpc:host
<<< libtool:host seq 33 <<<
>>> libtool:host seq 33 >>>
[032/272] [DONE] build libtool:host
<<< autotools:host seq 34 <<<
>>> autotools:host seq 34 >>>
[033/272] [DONE] build autotools:host
<<< libffi:host seq 35 <<<
>>> libffi:host seq 35 >>>
[034/272] [DONE] build libffi:host
<<< rsync:host seq 38 <<<
>>> rsync:host seq 38 >>>
[035/272] [DONE] build rsync:host
<<< flex:host seq 37 <<<
>>> flex:host seq 37 >>>
[036/272] [DONE] build flex:host
<<< u-boot-tools:host seq 40 <<<
>>> u-boot-tools:host seq 40 >>>
[037/272] [DONE] build u-boot-tools:host
<<< u-boot-script:target seq 41 <<<
BUILD u-boot-script (target)
TOOLCHAIN manual
cp: cannot stat '/home/ruben/Development/LibreELEC.tv/build.LibreELEC-ARM-ALL.aarch64-9.80-devel/build/u-boot-script-1.0/*': No such file or directory
FAILURE: scripts/build u-boot-script:target during makeinstall_target (package.mk)
*********** FAILED COMMAND ***********
cp -a $PKG_BUILD/* $INSTALL/usr/share/bootloader/
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
FAILURE: scripts/install u-boot-script:target has failed!
The following log for this failure is available:
/home/ruben/Development/LibreELEC.tv/build.LibreELEC-ARM-ALL.aarch64-9.80-devel/.threads/logs/41.log
>>> u-boot-script:target seq 41 >>>
[038/272] [FAIL] install u-boot-script:target
The following log for this failure is available:
/home/ruben/Development/LibreELEC.tv/build.LibreELEC-ARM-ALL.aarch64-9.80-devel/.threads/logs/41.log
Parallel build failure - see log for details. Time of failure: Thu May 7 10:32:54 CEST 2020
Display More
The log isn't very informative either:
BUILD u-boot-script (target)
TOOLCHAIN manual
cp: cannot stat '/home/ruben/Development/LibreELEC.tv/build.LibreELEC-ARM-ALL.aarch64-9.80-devel/build/u-boot-script-1.0/*': No such file or directory
FAILURE: scripts/build u-boot-script:target during makeinstall_target (package.mk)
*********** FAILED COMMAND ***********
cp -a $PKG_BUILD/* $INSTALL/usr/share/bootloader/
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
FAILURE: scripts/install u-boot-script:target has failed!
Display More
This is on Archlinux, and I have built e.g. the @Joern-p's 9.2 beta before succesfully.
Current LibreELEC master branch also fails for me, but this due to patches failing to apply on the kernel (which I think is a step much later than the one failing here).
Any idea what it might be?