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

Surface: Include kernel modules into initramfs in build-time, instead of utilizing initramfs-etc #250

Closed
fiftydinar opened this issue May 22, 2024 · 2 comments · Fixed by #258
Assignees

Comments

@fiftydinar
Copy link

fiftydinar commented May 22, 2024

This should make things more reliable for Surface users.

We can change surface-hardware-setup script to exclude initramfs-etc argument that would be leftover from this transition for some time, which would run this command:
rpm-ostree initramfs-etc --untrack=/etc/modules-load.d/ublue-surface.conf

We wouldn't use --untrack-all, because we don't want to erase user modifications to it.

Besides this, it should be a simple change to utilize:

#!/usr/bin/env bash

set -euo pipefail

rpm-ostree cliwrap install-to-root /
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "${QUALIFIED_KERNEL}" --reproducible -v --add ostree -f "/lib/modules/${QUALIFIED_KERNEL}/initramfs.img"
chmod 0600 "/lib/modules/${QUALIFIED_KERNEL}/initramfs.img"

Than we would place ublue-surface.conf file from /etc/modules-load.d/ to /usr/lib/modules-load.d/

That would be basically it.

@m2Giles
Copy link
Member

m2Giles commented Jun 27, 2024

We are going to want to do this for all the images in this repo. Nvidia also should have the modules

@bsherman
Copy link
Contributor

I'm working on this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants