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

Update microcode handling #2384

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Update microcode handling #2384

merged 1 commit into from
Mar 7, 2024

Conversation

fortifiedhill
Copy link
Contributor

PR Description:

As of mkinitcpio v38, microcode is handled by a hook and inserted into the initrd by default. Therefore, we don't have to add microcode entries to bootloaders anymore. Additionally, the microcode option in .preset files has been deprecated in favor of the new microcode hook.

See: https://archlinux.org/news/mkinitcpio-hook-migration-and-early-microcode/

Tests and Checks

  • I have tested the code!

As of mkinitcpio v38, microcode is handled by a hook
and inserted into the initrd. Therefore, we don't have to
add microcode entries to bootloaders anymore.
@fortifiedhill fortifiedhill requested a review from Torxed as a code owner March 7, 2024 00:03
@Torxed
Copy link
Member

Torxed commented Mar 7, 2024

This is awesome to see, minimizing code - simpler life :D

@Torxed
Copy link
Member

Torxed commented Mar 7, 2024

We might need to do something about this too:

if ucode := self._get_microcode():
(self.target / 'boot' / ucode).unlink(missing_ok=True)
self.base_packages.append(ucode.stem)
else:
debug('Archinstall will not install any ucode.')

@fortifiedhill
Copy link
Contributor Author

We might need to do something about this too:

if ucode := self._get_microcode():
(self.target / 'boot' / ucode).unlink(missing_ok=True)
self.base_packages.append(ucode.stem)
else:
debug('Archinstall will not install any ucode.')

This code appears to handle adding the respective microcode package to the package install list, depending on the user's CPU. In a VM (after removing this line), I've tested this by removing the linked code, and sure enough, the microcode does not install, so it appears that we need that code.

@Torxed
Copy link
Member

Torxed commented Mar 7, 2024

Ah you are correct! I should have known this you'd think heh. Cheers for pointing that out!

@Torxed Torxed merged commit 85fda53 into archlinux:master Mar 7, 2024
6 checks passed
@fortifiedhill fortifiedhill deleted the update_microcode_handling branch March 7, 2024 23:37
@fortifiedhill fortifiedhill restored the update_microcode_handling branch March 7, 2024 23:37
@fortifiedhill fortifiedhill deleted the update_microcode_handling branch March 7, 2024 23:37
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