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: facetimehd-kmod (feedback requested) #158

Merged
0 commits merged into from
Apr 4, 2024
Merged

Conversation

mulderje
Copy link
Contributor

@mulderje mulderje commented Apr 1, 2024

I have been working on getting an old MacBook Air fully running, and running into things like not being able to just copy firmware files into the base system... :)

One thing missing within the Fedora repos for me was the FacetimeHD Firmware. This led me down a path of creating the below. Please note this was my first time messing around with spec files/copr, and any feedback/suggestions would be much appreciated.

  1. Spec files can be found here.
  2. COPR. Note: I can leverage this to add to my machine locally now via adding the copr and sudo rpm-ostree install akmod-facetimehd facetimehd-firmware, which is already a huge improvement
  3. I would like to figure out how to get the automated builds working with something like Blue build. Note: this is currently failing builds with e.g. permission issues

Open questions:

  • Would you want this to be included here in your main akmod repo or is this too niche?
  • If you would like here, would you also like included in your COPR vs [2] above?
  • If no, any suggestions or recommendations for the spec [1]/copr [2] setup to help get [3] working?
  • Are there any best practices that I should be following with things like packit, bohdi, koji, etc.? It looks like there are a few things that I need to do to make sure things stay up to date, but would love to plug into something you have if possible.

Thanks!
Jon

@mulderje mulderje requested a review from castrojo as a code owner April 1, 2024 03:06
@mulderje mulderje marked this pull request as draft April 1, 2024 03:08
@mulderje mulderje marked this pull request as ready for review April 1, 2024 03:10
@mulderje mulderje force-pushed the main branch 5 times, most recently from 447c36f to 85f3a4e Compare April 1, 2024 18:42
@mulderje
Copy link
Contributor Author

mulderje commented Apr 1, 2024

For the build issues, now I am getting things related to the build tool chain e.g. missing ld. Looks like I am making some progress, but missing something in the build process.

@fiftydinar
Copy link
Contributor

fiftydinar commented Apr 1, 2024

For the build issues, now I am getting things related to the build tool chain e.g. missing ld. Looks like I am making some progress, but missing something in the build process.

EDIT: Oh, I just remembered.

You need to use workaround to install ld, which is part of binutils.
It complains something about "alternatives".
To solve this issue, use this script & place it before akmods are built:

#!/usr/bin/env bash

set -euo pipefail

# alternatives cannot create symlinks on its own during a container build
ln -sf /usr/bin/ld.bfd /etc/alternatives/ld && ln -sf /etc/alternatives/ld /usr/bin/ld

@mulderje
Copy link
Contributor Author

mulderje commented Apr 1, 2024

Thank you for the pointer, @fiftydinar! Looks like that fixed the linker issues. Now I am getting a new error (snip and link below):

Build error: https://github.com/mulderje/ublue-oldair/actions/runs/8513848731/job/23318355846#step:2:2262

#36 17.70 2024/04/01 21:21:17 akmods: Installing newly built rpms
#36 17.70 2024/04/01 21:21:17 akmods: DNF not found, using YUM instead.
#36 17.70 /usr/sbin/akmods: line 326: yum: command not found
#36 17.70 2024/04/01 21:21:17 akmods: Could not install newly built RPMs. You can find them and the logfile in:
#36 17.70 2024/04/01 21:21:17 akmods: /var/cache/akmods/facetimehd/0.6.8-1.20240322gitb1f7424-for-6.7.10-200.fc39.x86_64.failed.log

I'm also hopeful this may just build within this repo setup?

@mulderje
Copy link
Contributor Author

mulderje commented Apr 2, 2024

Wanted to also quickly confirm that podman build -f Containerfile.common . works locally with this PR, and appears to add in the facetimehd-kmod RPM.

...snip...

+ rpm-ostree install 'akmod-facetimehd-*.fc39.x86_64' facetimehd-firmware
Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates rpmfusion-nonfree fedora updates updates-archive
Updating metadata for 'copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod'...done
Importing rpm-md...done
rpm-md repo 'copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod'; generated: 2024-03-30T21:06:18Z solvables: 21
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2024-03-31T11:47:41Z solvables: 170
rpm-md repo 'rpmfusion-free' (cached); generated: 2023-11-04T16:49:08Z solvables: 445
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2024-03-31T12:14:57Z solvables: 74
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2023-11-04T17:26:32Z solvables: 208
rpm-md repo 'fedora' (cached); generated: 2023-11-01T00:12:39Z solvables: 70825
rpm-md repo 'updates' (cached); generated: 2024-04-01T00:38:09Z solvables: 25385
rpm-md repo 'updates-archive' (cached); generated: 2024-03-28T01:49:15Z solvables: 37996
Resolving dependencies...done
Will download: 3 packages (663.3?kB)
Downloading from 'copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod'...done
Installing 3 packages:
  akmod-facetimehd-0.6.8-1.20240322gitb1f7424.fc39.x86_64 (copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod)
  facetimehd-0.6.8-1.20240322gitb1f7424.fc39.x86_64 (copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod)
  facetimehd-firmware-0.1-1.20240319gitmaster.fc39.x86_64 (copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod)
Installing: facetimehd-0.6.8-1.20240322gitb1f7424.fc39.x86_64 (copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod)
Installing: akmod-facetimehd-0.6.8-1.20240322gitb1f7424.fc39.x86_64 (copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod)
Building /usr/src/akmods/facetimehd-kmod-0.6.8-1.20240322gitb1f7424.fc39.src.rpm for kernel 6.7.10-200.fc39.x86_64
ERROR: Not to be used as root; start as user or 'akmodsbuild' instead.
Installing: facetimehd-firmware-0.1-1.20240319gitmaster.fc39.x86_64 (copr:copr.fedorainfracloud.org:mulderje:facetimehd-kmod)
+ akmods --force --kernels 6.7.10-200.fc39.x86_64 --kmod facetimehd
Unable to figure out the default kernel [WARNING]
Checking kmods exist for 6.7.10-200.fc39.x86_64 [  OK  ]
Building and installing facetimehd-kmod [  OK  ]
+ modinfo /usr/lib/modules/6.7.10-200.fc39.x86_64/extra/facetimehd/facetimehd.ko.xz
+ rm -f /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo

...snip...

[1/2] STEP 15/15: RUN find /var/cache/rpms
/var/cache/rpms
/var/cache/rpms/kmods
/var/cache/rpms/kmods/kmod-VirtualBox-6.7.10-200.fc39.x86_64-7.0.14-2.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-ayaneo-platform-6.7.10-200.fc39.x86_64-0.0.git.21.325607e9-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-ayn-platform-6.7.10-200.fc39.x86_64-0.0.git.40.a8d762ec-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-bmi160-6.7.10-200.fc39.x86_64-0.0.git.3.25b90933-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-bmi260-6.7.10-200.fc39.x86_64-0.0.git.19.337ce2ed-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-bmi323-6.7.10-200.fc39.x86_64-0.0.git.5.844ec2b6-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-evdi-6.7.10-200.fc39.x86_64-1.14.2-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-facetimehd-6.7.10-200.fc39.x86_64-0.6.8-1.20240322gitb1f7424.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-gcadapter_oc-6.7.10-200.fc39.x86_64-0.0.git.30.1fac57e3-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-nct6687d-6.7.10-200.fc39.x86_64-0.0.git.79.534194f7-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-openrazer-6.7.10-200.fc39.x86_64-100.0.0.git.530.886f986d-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-openrgb-6.7.10-200.fc39.x86_64-0.0.git.15.f3f94bed-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-rtl8814au-6.7.10-200.fc39.x86_64-5.8.5.1.git-2.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-rtl88xxau-6.7.10-200.fc39.x86_64-5.6.4.2.git-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-ryzen-smu-6.7.10-200.fc39.x86_64-0.0.git.153.ca1d8ba5-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-steamdeck-6.7.10-200.fc39.x86_64-0.0.git.13.f4734070-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-v4l2loopback-6.7.10-200.fc39.x86_64-0.12.7^20230503g2c9b670-2.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-winesync-6.7.10-200.fc39.x86_64-0.0.git.4.60975d21-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-wl-6.7.10-200.fc39.x86_64-6.30.223.271-49.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-xone-6.7.10-200.fc39.x86_64-0.0.git.45.5441d09a-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-xpadneo-6.7.10-200.fc39.x86_64-0.9.6-1.fc39.x86_64.rpm
/var/cache/rpms/kmods/kmod-zenergy-6.7.10-200.fc39.x86_64-0.0.git.30.98b5115f-1.fc39.x86_64.rpm
/var/cache/rpms/ublue-os
/var/cache/rpms/ublue-os/ublue-os-akmods-addons-0.4-1.fc39.noarch.rpm
--> e049e28b2343
[2/2] STEP 1/2: FROM scratch
[2/2] STEP 2/2: COPY --from=builder /var/cache/rpms /rpms
[2/2] COMMIT
--> ff4f05c1dbe0

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 this pull request may close these issues.

2 participants