Widevine ARM64 support - xbmc/inputstream.adaptive GitHub Wiki
To make the Widevine library work on a ARM64 / AARCH64 linux operative system there are some requirements, without them the Widevine library cannot be loaded properly and crashes may occur. Some Linux systems may already include them, but this needs to be checked.
- libnspr4 package must be installed.
- glibc patch for
_dt_determine_tlsoffset
, this patch is required: https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/devel/glibc/patches/widevine-arm/glibc-tls-libwidevinecdm.so-since-4.10.2252.0-has-TLS-with.patch, without it there will be a SEGV when runningdlopen()
. Note that RPIOS already includes this patch in their libc6==2.31-13+rpt2+rpi1+deb11u5 package. - glibc patch for
GLIBC_ABI_DT_RELR
support (if using glibc >= 2.36), patch found here: https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/devel/glibc/patches/widevine-arm/glibc-HACK-Don-t-check-GLIBC_ABI_DT_RELR-support-for-Chrom.patch, you will have to check if it is already included in your operating system for example ubuntu (using glibc 2.35) and debian/rpios (using glibc 2.31) already include it. - LSE atomic symbols present in .dynsym, inside the Widevine .so file, there are references to two required symbols:
it seems on ChromeOS have modified glibc/gcc packages to provide these as dynamic symbols inside various libraries, these are not present on stock linux glibc systems and must be provided by an external library, InputStream Adaptive for Kodi v20 and above already provide these symbols.
$ readelf -Ws libwidevinecdm.so | grep -v GLIBC | grep -v WEAK | grep -v NOTYPE | grep UND 25: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __aarch64_ldadd4_acq_rel 132: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __aarch64_swp4_acq_rel
Note: these requirements may change over the time when new Widevine versions are released.
References:
https://github.com/xbmc/inputstream.adaptive/issues/1128
https://github.com/xbmc/inputstream.adaptive/pull/1166
https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/248