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

feat: Adding Framework power kmod #139

Closed
wants to merge 11 commits into from
1 change: 1 addition & 0 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-steamdeck.sh \
; fi && \
/tmp/build-kmod-ayaneo-platform.sh && \
/tmp/build-kmod-framework-laptop-tests.sh && \
/tmp/build-kmod-ayn-platform.sh && \
/tmp/build-kmod-bmi160.sh && \
/tmp/build-kmod-bmi260.sh && \
Expand Down
17 changes: 17 additions & 0 deletions build-kmod-framework-laptop-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/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')"

Copy link
Contributor

@bsherman bsherman Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should take a look at build-kmod-v4l2loopback.sh and add a similar conditional to this script so that it only runs on main KERNEL_FLAVOR and RELEASE >= 39.

You'll need to move the cp for the COPR repo after the conditional as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so the kernel flavor is just nvidia or main right now yea? Given that frameworks don't have nvidia drivers that's safe to exit as well. So I think the != main is still fine. I've got a commit that will do that, but now that I've taken a look at it, I don't think that this is my only concern. Its very likely "a" concern, but there are other things that are still borked I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, given that my != main should still stand.

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

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