Skip to content

Implement UKI and CPU microcode hooks - #49

Merged
dkwo merged 6 commits into
illiliti:masterfrom
dsemy:master
Sep 8, 2025
Merged

Implement UKI and CPU microcode hooks#49
dkwo merged 6 commits into
illiliti:masterfrom
dsemy:master

Conversation

@dsemy

@dsemy dsemy commented Jul 20, 2025

Copy link
Copy Markdown

I decided to create a GitHub account, this is an updated version of #48.
Pretty sure in this version all issues have been fixed, but I still have only tested with an AMD machine so it might not work for Intel CPUs.

This pull request, aside from implementing the aforementioned hooks, also allows arbitrary generation of temporary files which will not be included in the final initramfs but will be deleted using the same mechanism other temporary files are deleted, and also adds support for a new type of hook which runs after the initramfs has been generated (required to implement both hooks added by this set of patches).

I have been using this version for a while with no issues.

@dkwo

dkwo commented Jul 21, 2025

Copy link
Copy Markdown
Collaborator

Thanks, this looks good. I can test intel ucode. For uki, I have been running similar code for a while.

It is perhaps good to note that for hooks (and late hooks) order matters (e.g. device managers first, and here ucode before uki).

@dsemy

dsemy commented Jul 22, 2025

Copy link
Copy Markdown
Author

I've updated some of the manpage (I realized there were some more changes I wanted to make), but have not made a commit yet; are there any more order dependent hooks?
I've added the following text about the order of hooks to the manpage so far:

The order in which hooks appear is significant; a device manager hook (e.g. the 'eudev' hook) should be the first element of the list, the 'ucode' hook should be placed before the 'uki' hook, if both are used.

Edit: AFAICT there shouldn't be ordering issues with other hooks so I've pushed my changes. If there are any, let me know and I'll change it and force push the changes to keep the commit log clean.

@dsemy

dsemy commented Jul 22, 2025

Copy link
Copy Markdown
Author

Also, unrelated to this pull request, I implemented a plymouth hook, seems to work including with LUKS but it still has a few issues I need to figure out.
Would you be able to test it with ZFS encryption? I haven't implemented support for it yet as I don't use ZFS and it will be hard to setup a test for that.

@dkwo

dkwo commented Jul 22, 2025

Copy link
Copy Markdown
Collaborator

Looks good to me, tested with intel and uki. I was using /usr/bin/iucode_tool -S --write-earlyfw=${tmpdir}/ucode /usr/lib/firmware/intel-ucode/* but your choice works equailly well, and requires no external tool.

@dkwo

dkwo commented Jul 22, 2025

Copy link
Copy Markdown
Collaborator

(I do not use zfs at the moment, but if you end up opening another pr maybe someone else can help.)

@dkwo

dkwo commented Aug 14, 2025

Copy link
Copy Markdown
Collaborator

@illiliti Any comments, before I merge this?

@dkwo
dkwo merged commit b581339 into illiliti:master Sep 8, 2025
1 check passed
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