Description
Preamble: first, why on Earth would anyone want to run x86_64 Kodi on an aarch64 box? Well, quite simply: DRM. On x86_64 linux, the ChromeOS Widevine has support for (or rather allows) playing streams with something called "Verified Media Path". This is a layer of protection currently applied by various (legal) TV streaming services. Items provided by these streaming services using this protection just fail to play back with the aarch64 widevine library, but doing the exact same thing on x86_64 Linux; they play back fine.
So I'm not trying to access anything that I cannot otherwise legally access, if my HTPC had a different architecture.
So yes, the easy way out is to buy an x86_64 mini-ITX motherboard and just use that. But where is the fun in that?
So I went on a little adventure to try and get x86_64 Kodi running on my aarch64 media box (a NanoPi M4). Since the bulk of work in Kodi is hopefully done by the video decoding hardware and the GPU, I'm hoping to get acceptable performance and the ability to play the streams that won't play on aarch64.
So I set up an x86_64 Archlinux sysroot with Kodi and with qemu-user I can chroot into it to maintain it (for some reason Box64 doesn't get used when chrooting cross-architecture, but that's not the current issue). I recompiled mesa to include the panfrost driver and compiled ffmpeg to include the hardware video decoding bits for my RK3399. Starting the x86_64 kodi using qemu-user I can get it to start, but it fails to find a display and audio devices, so I think it's hitting some qemu-specific emulation barrier.
Next step: I built and installed box64 v0.3.4. Setting BOX64_LD_LIBRARY_PATH to the x86_64 sysroot's lib directory, I get the output of box64.txt
. Setting BOX64_PREFER_EMULATED=1 and rerunning Kodi, I get the output in box64_prefer_emulated.txt
. This seems like it succeeds loading more libraries, but ultimately fails to get far enough to start the application.
I understand running a somewhat complex application (including Python, Samba, FFmpeg and whatnot), but it seems I'm hitting some Box64 limitations loading some of these and I wonder what can be done to improve the situation (and perhaps eventually run Kodi).