Skip to content

Commit

Permalink
feat: Add dwc3 driver for Steam Deck DRD
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Nov 17, 2023
1 parent dfc93ae commit 0ed91c9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
; fi && \
if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-steamdeck.sh \
/tmp/build-kmod-steamdeck-dwc3.sh \
; fi && \
/tmp/build-kmod-gasket.sh && \
/tmp/build-kmod-gcadapter_oc.sh && \
Expand Down
19 changes: 19 additions & 0 deletions build-kmod-steamdeck-dwc3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

set -oeux pipefail

cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/

ARCH="$(rpm -E '%_arch')"
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E '%fedora')"

rpm-ostree install \
akmod-steamdeck-dwc3-*.fc${RELEASE}.${ARCH}
akmods --force --kernels "${KERNEL}" --kmod steamdeck-dwc3
modinfo /usr/lib/modules/${KERNEL}/extra/steamdeck-dwc3/dwc3.ko.xz > /dev/null \
|| (find /var/cache/akmods/steamdeck/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/steamdeck-dwc3/dwc3-{pci,haps}-hwmon.ko.xz > /dev/null \
|| (find /var/cache/akmods/steamdeck/ -name \*.log -print -exec cat {} \; && exit 1)

rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo

0 comments on commit 0ed91c9

Please sign in to comment.