I would like to share my insights on how to make makemkvcon work on the Open Source Media Center (OSMC). This also enables Kodi to play back Blu-Rays with an external USB drive.
OSMC is a Debian-based Linux distribution with Kodi as its main application. I use it on a Raspberry Pi 4B, but it is also available on the Vero 4K (among others). Regarding OSMC, the challenge is that it uses a 64-bit kernel but userland including Kodi is 32-bit. Basically, both 32-bit armhf and 64-bit arm64 executables work on OSMC.
Prerequisites:
For basic instructions on how to compile and use makemkv on Linux, see viewtopic.php?t=224.
Generally speaking, makemkv binaries for various architectures are contained in the makemkv-bin packages. An armhf version available in the post viewtopic.php?f=3&t=28533
Initial situation:
When executing the armhf binary of makemkvcon out of the box, the following error message appears:
Code: Select all
osmc@osmc:~$ makemkvcon info disc:0
...
Bus access error
Approach:
Step 1.: As a basic strategy, we need to make the arm64 binary of makemkvcon work so that it can make use of the 64-bit kernel module sg. It also requires the libraries libdriveio.so.0 and libmakemkv.so.1 in an arm64 version. Step 2.: In the next step, we need an 32-bit armhf version of libmmbd.so.0 so that Kodi can dynamically integrate it when playing Blu-Rays.
Step 1:
To be able to execute the arm64 binary of makemkvcon on OSMC we need to install some basic arm64 libraries which are not available in the standard image of OSMC.
Code: Select all
sudo apt install libc6:arm64 libstdc++6:arm64 libssl1.1:arm64 zlib1g:arm64 libexpat1:arm64 libavcodec58:arm64
Code: Select all
osmc@osmc:~$ makemkvcon info disc:0
...
makemkvcon: error while loading shared libraries: libmakemkv.so.1: wrong ELF class: ELFCLASS32
Code: Select all
makemkvcon info disc:0
Troubleshooting:
You might encounter the following message.
Code: Select all
osmc@osmc:~$ makemkvcon info disc:0
...
makemkvcon: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /lib/libmakemkv.so.1)
Step 2:
To enable Kodi to play back Blu-Rays, copy the 32-bit file libmmbd.so.0 to /usr/lib/arm-linux-gnueabihf on OSMC.
Then symlink this file to libaacs.so.0 and libbdplus.so.0:
Code: Select all
sudo ln -s /usr/lib/arm-linux-gnueabihf/libmmbd.so.0 /usr/lib/arm-linux-gnueabihf/libaacs.so.0
sudo ln -s /usr/lib/arm-linux-gnueabihf/libmmbd.so.0 /usr/lib/arm-linux-gnueabihf/libbdplus.so.0