Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widevine AARCH64 support #1128

Closed
tmm1 opened this issue Feb 9, 2023 · 5 comments
Closed

Widevine AARCH64 support #1128

tmm1 opened this issue Feb 9, 2023 · 5 comments
Labels
Issue Type: New feature issue has requested a new feature Resolution: Fixed issue was resolved by a code change Triage: Has proposed fix Issue has been reproduced and has a pending proposed fix

Comments

@tmm1
Copy link
Contributor

tmm1 commented Feb 9, 2023

We have aarch64 version of libwidevinecdm.so available now, as detailed here: emilsvennesson/script.module.inputstreamhelper#530

However to use it is still a challenge. I will document the requirements in this issue.

  1. libnspr4.so dependency

    not sure if this is new, but the libnspr4 package must be installed because libwidevinecdm.so depends on libnspr4.so

  2. glibc patch for _dt_determine_tlsoffset

    this patch is required: https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/devel/glibc/patches/arm/glibc-tls-libwidevinecdm.so-since-4.10.2252.0-has-TLS-with.patch

    without it, there will be a SEGV when running dlopen(). note that RPIOS already includes this patch in their libc6==2.31-13+rpt2+rpi1+deb11u5 package

  3. 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/arm/glibc-HACK-Don-t-check-GLIBC_ABI_DT_RELR-support-for-Chrom.patch

    not currently required on ubuntu (using glibc 2.35) or debian/rpios (using glibc 2.31)

  4. LSE atomic symbols present in .dynsym

    inside the .so file, there are references to two required 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
    

    it seems on chromeos they have modified glibc/gcc packages to provide these as dynamic symbols inside various libraries. on stock linux glibc systems, these are not present because they are only used as static/hidden methods provided by libgcc.a and embedded inside every library that uses them. we would expect that these definitions would be embedded inside the widevine.so, but instead they are undefined and expected to be provided by an external library

@CastagnaIT CastagnaIT added Issue Type: New feature issue has requested a new feature Triage: Has proposed fix Issue has been reproduced and has a pending proposed fix labels Feb 10, 2023
@CastagnaIT
Copy link
Collaborator

have you some ideas when will be available a stable build?

@tmm1
Copy link
Contributor Author

tmm1 commented Feb 12, 2023

I only know what was posted here: https://groups.google.com/a/chromium.org/g/chromium-os-dev/c/GdZ0mebutXw

@jakermx
Copy link

jakermx commented Feb 17, 2023

@CastagnaIT hi there, long time no see... hope you are doing great

@Nachtzuster
Copy link

FYI: aarch64 seems to have hit stable:
from: https://chromiumdash.appspot.com/serving-builds?deviceCategory=ChromeOS
I pulled the 110 build for trogdor/lazor https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15278.64.0_trogdor_recovery_stable-channel_mp-v7.bin.zip

$ file ROOT-A/opt/google/chrome/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so 
ROOT-A/opt/google/chrome/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=b71fd3342a03fdb140e1f7a757960df219d63625, stripped
$ ls -l ROOT-A/opt/google/chrome/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so 
-rw-r--r--. 1 root root 9490256 Feb 14 03:21 ROOT-A/opt/google/chrome/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so

@CastagnaIT
Copy link
Collaborator

I have add new Wiki page with references to PR/Issue
so i close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue Type: New feature issue has requested a new feature Resolution: Fixed issue was resolved by a code change Triage: Has proposed fix Issue has been reproduced and has a pending proposed fix
Projects
None yet
Development

No branches or pull requests

4 participants