v19 Notes on compiling v19 alpha on the Raspberry Pi 4+ and Raspbian Buster.
#61
Oh it seems I have an issue with drm, https://paste.kodi.tv/oguraxinik.kodi
Reply
#62
(2021-02-10, 16:32)Gonto Wrote: Oh it seems I have an issue with drm, https://paste.kodi.tv/oguraxinik.kodi

I think you have to run the kms overlay, instead of fkms.  That would be my guess here.
Reply
#63
(2021-02-11, 01:56)wagnerch42 Wrote:
(2021-02-10, 16:32)Gonto Wrote: Oh it seems I have an issue with drm, https://paste.kodi.tv/oguraxinik.kodi

I think you have to run the kms overlay, instead of fkms.  That would be my guess here.
No, I was already using dtoverlay=vc4-kms-v3d-pi4,cma-256 at this time, but I had an issue to print my modules with lsmod so I've reinstalled upstream kernel properly and now it works smoothly Smile
Reply
#64
Hey guys! I tried following this guide a few months ago, as well as the documentation on GitHub, but to no avail. It's kind of confusing how I should go about compiling it now, with all the different links and terminal commands, I'm not quite sure how to read this whole thread tbh Huh .

Is any kind soul willing to put together a quick guide? It doesn't have to be too detailed, but just some clear idea how I should now go about compiling Kodi for and RPi4 running Raspbian would be a great help and much appreciated.
Reply
#65
(2021-02-12, 22:44)HDmaniac Wrote: Hey guys! I tried following this guide a few months ago, as well as the documentation on GitHub, but to no avail. It's kind of confusing how I should go about compiling it now, with all the different links and terminal commands, I'm not quite sure how to read this whole thread tbh Huh .

Is any kind soul willing to put together a quick guide? It doesn't have to be too detailed, but just some clear idea how I should now go about compiling Kodi for and RPi4 running Raspbian would be a great help and much appreciated.
I'll try my best, before posting my problem with the resulting binary ;-)
I build kodi with GBM, I'll try to include the command to configure for X11 but this is not tested and there might be dependencies missing (which can also be the case for the GBM build).

System

This guide is for the standard Raspbian Buster 32bit OS.

Dependencies

Code:
sudo apt install git debhelper autoconf automake autopoint gettext autotools-dev cmake curl default-jre doxygen gawk gcc gdc gperf libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev libbluray-dev libbz2-dev libcdio-dev libp8-platform-dev libcrossguid-dev libcurl4-openssl-dev libcwiid-dev libfstrcmp-dev libgcrypt-dev libgif-dev libgles2-mesa-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls28-dev libgpg-error-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libshairplay-dev libsmbclient-dev libsqlite3-dev libssl-dev libtag1-dev libtiff5-dev libtinyxml-dev libtool libudev-dev libva-dev libvdpau-dev libvorbis-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev lsb-release python3-dev python3-pil rapidjson-dev swig  unzip uuid-dev yasm zip zlib1g-dev libdrm-dev libinput-dev libxkbcommon-dev libunistring-dev samba-common-bin liblirc-dev

Setup Repo

Code:
Code:
cd kodi
Code:
mkdir kodi-build
Code:
cd kodi-build

Setup CMake

For GBM:

Code:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=gbm -DAPP_RENDER_SYSTEM=gles -DENABLE_VAAPI=OFF -DENABLE_VDPAU=OFF -DENABLE_DEBUGFISSION=OFF -DENABLE_TESTING=OFF -DENABLE_INTERNAL_FLATBUFFERS=ON -DENABLE_INTERNAL_FFMPEG=ON -DENABLE_INTERNAL_SPDLOG=ON -DENABLE_INTERNAL_FMT=ON

For X11:

Code:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gles -DENABLE_DEBUGFISSION=OFF -DENABLE_TESTING=OFF -DENABLE_INTERNAL_FLATBUFFERS=ON -DENABLE_INTERNAL_FFMPEG=ON -DENABLE_INTERNAL_SPDLOG=ON -DENABLE_INTERNAL_FMT=ON

Start Building

Code:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)

Wait around 2h, then you can test the build using

Code:
./kodi-gbm
or
Code:
./kodi-x11
Reply
#66
Addendum

After building you can install kodi using:

Code:
sudo make install

For GBM to run, the user needs to be inside the video and input group.
For more details, see https://github.com/xbmc/xbmc/blob/master...E.Linux.md
Reply
#67
Now for my problem :-)

I build as described above a GBM version. Before that, I had the standard debian repo kodi-standalone running as user pi.
After compiling, everything was working fine. However, after removing the standard kodi and rebooting. kodi-gbm when started as user pi (which is inside video and input group) only uses the software llvmpipe GL Renderer.
Only by starting as root (using sudo) I am able to get the V3D 4.2 Renderer. Any idea why this is happening and how to use the V3D Renderer as normal user?
Reply
#68
You need some udev rules for Kodi to work as a normal use. Maybe also some lines in the config.txt. I think that was talked about on the first comments.
Reply
#69
(2021-02-21, 21:45)rascas Wrote: You need some udev rules for Kodi to work as a normal use. Maybe also some lines in the config.txt. I think that was talked about on the first comments.

Thanks for the answer. My config.txt already includes:

Code:
dtoverlay=vc4-fkms-v3d,cma-256
dtoverlay=rpivid-v4l2
Also as root is able to get V3D this was not the problem.
This thread does not mention the string "udev" except in your post, however I found the culprit due to that hint:
I got the following /dev/dri devices:
Code:
drwxr-xr-x  3 root root        120 Feb 21 18:46 .
drwxr-xr-x 19 root root       3860 Feb 21 18:46 ..
drwxr-xr-x  2 root root        100 Feb 21 18:46 by-path
crw-rw----  1 root video  226,   0 Feb 21 18:46 card0
crw-rw----  1 root video  226,   1 Feb 21 18:46 card1
crw-rw----  1 root render 226, 128 Feb 21 18:46 renderD128
Well so, in addition to video and input, the target user needs to be inside the render group. Is this some specialty of raspbian? It is not mentioned in the Linux build README.
Reply
#70
ok, next problem:
When starting the new kodi v19 the LIRC remote is not working anymore. I did not change the configuration, so Lircmap.xml and keymaps/remote.xml did not change and look fine.
irw shows the correct commands when pressing the remote buttons but nothing happens in kodi.
It does not seem to be a permission issue as the problem is also present when starting kodi using root (with the same .kodi configuration folder).
kodi.log reveals:
Code:
2021-02-21 23:10:47.036 T:1805    DEBUG <general>: CLibInputHandler:Big GrineviceAdded - pointer type device added: gpio_ir_recv (event3)
2021-02-21 23:10:47.036 T:1805    DEBUG <general>: CLibInputHandler:Big GrineviceAdded - keyboard type device added: gpio_ir_recv (event3)
which looks fine. There is a /dev/input/event3 device, which is associated to the ir receiver and has the correct permissions:
Code:
pi@raspberrypi:/etc/lirc$ ls -al /dev/input
insgesamt 0
drwxr-xr-x  4 root root     200 Feb 21 22:39 .
drwxr-xr-x 19 root root    3860 Feb 21 22:39 ..
drwxr-xr-x  2 root root     120 Feb 21 22:39 by-id
drwxr-xr-x  2 root root     140 Feb 21 22:39 by-path
crw-rw----  1 root input 13, 64 Feb 21 22:39 event0
crw-rw----  1 root input 13, 65 Feb 21 22:39 event1
crw-rw----  1 root input 13, 66 Feb 21 22:39 event2
crw-rw----  1 root input 13, 67 Feb 21 22:39 event3
crw-rw----  1 root input 13, 63 Feb 21 22:39 mice
crw-rw----  1 root input 13, 32 Feb 21 22:39 mouse0
pi@raspberrypi:/etc/lirc$ ls -al /dev/input/by-path/
insgesamt 0
drwxr-xr-x 2 root root 140 Feb 21 22:39 .
drwxr-xr-x 4 root root 200 Feb 21 22:39 ..
lrwxrwxrwx 1 root root   9 Feb 21 22:39 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3.3:1.0-event-kbd -> ../event0
lrwxrwxrwx 1 root root   9 Feb 21 22:39 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3.3:1.1-event -> ../event1
lrwxrwxrwx 1 root root   9 Feb 21 22:39 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3.4:1.0-event-mouse -> ../event2
lrwxrwxrwx 1 root root   9 Feb 21 22:39 platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3.4:1.0-mouse -> ../mouse0
lrwxrwxrwx 1 root root   9 Feb 21 22:39 platform-ir-receiver@11-event -> ../event3

Is there anything missing, or anything else which should be listed in the kodi.log (with enabled debug logging)?

OT: Lol, maybe the admins should disable emoticons inside a syntax environment *g
Reply
#71
got it myself: liblirc-dev was not installed when compiling, so this needs to be added to the list of apt dependencies in the guide above (sadly I am not allowed yet to edit my own posts, which is kind of an interesting design decision, I didn't know yet, that the quality of posts usually decrease over time ;-) )
Reply
#72
Thank you so much for that guide! Much appreciated! I'll try it out tomorrow!
 
(2021-02-21, 23:32)derMart Wrote: Well so, in addition to video and input, the target user needs to be inside the render group.

Okay so am I right in thinking once it's all installed I run:

Code:
sudo usermod -a -G input,video,render pi
Reply
#73
(2021-02-22, 00:53)HDmaniac Wrote: Thank you so much for that guide! Much appreciated! I'll try it out tomorrow!
 
(2021-02-21, 23:32)derMart Wrote: Well so, in addition to video and input, the target user needs to be inside the render group.

Okay so am I right in thinking once it's all installed I run:

Code:
sudo usermod -a -G input,video,render pi
Exactly. if pi is not already in those groups, you additionally need to logout and login again, see https://github.com/xbmc/xbmc/blob/master...E.Linux.md
Reply
#74
I've managed to build kodi 19 using the gbm_matrix branch following dermart's guide. However my idle cpu usage is pretty high 15-20% and if I try to start a video it wont play at all.

Here is my log part 1:
https://pastebin.com/xVritMWn

and log part 2:
https://pastebin.com/HbSmeGbx

I had to split the log up in 2 sections because it was too big.

I am not sure what went wrong. If someone can help me out that would be great Smile
Reply
#75
I cant seem to edit my post but disabling prime decoder makes it so my video will play so the issue is with HW accel if I'm correct?
Reply

Logout Mark Read Team Forum Stats Members Help
Notes on compiling v19 alpha on the Raspberry Pi 4+ and Raspbian Buster.0