kernel: declare amd-ucode only (issue 1977, L10)
mesh/delivery merged: source.main moved to novox/mesh-catalog@e271757db78b
mesh/check checking c100e16ba0af on e271757db78b

intel-ucode failed an apply on a stale package database and stopped the delivery; an Intel machine
fails the unit by the image check and gets intel-ucode in the change that adds it. Tests: 1977/AC1
and the pinned order string adjusted.

Builds: L10 (issue 1977 note 6)
This commit is contained in:
2026-11-12 21:49:30 +01:00
parent b9abfde492
commit c100e16ba0
5 changed files with 6 additions and 11 deletions
+2 -2
View File
@@ -57,13 +57,13 @@ built for the fallback kernel too) after its boot-entries service, so the entry
Before this, `amd-ucode` was installed by hand on two machines and no initramfs carried it, so a machine booted from
its default entry ran the CPU's older microcode (one machine: revision 0x0a201016 while the package held 0x0a20102e). The module
declares the packages and makes mkinitcpio's own `microcode` hook part of every image, so every boot entry loads it,
declares the package and makes mkinitcpio's own `microcode` hook part of every image, so every boot entry loads it,
a default entry written by hand included, and no entry is edited. The fallback entry's own microcode lines stay (a second
early archive is harmless).
| | what | notes |
|---|---|---|
| packages | `amd-ucode`, `intel-ucode` | both on every machine; the `autodetect` hook keeps only the running CPU's microcode in the default image |
| package | `amd-ucode` | on every machine. `intel-ucode` is not declared yet (its install failed an apply on a stale package database, issue 1977): an Intel machine fails the unit by the image check, which names the images, and gets the package in the change that adds it |
| file | `/etc/mkinitcpio.conf.d/mesh-microcode.conf` | read by mkinitcpio after `mkinitcpio.conf`: appends `microcode` to `HOOKS` unless it names it |
| file | `${dir:state}/initramfs` | the script, `apply`: when the drop-in differs from the one the images were last built with (`${dir:state}/initramfs-built`) it runs `mkinitcpio -P` and then records the drop-in; otherwise it says "as it was". Before building it takes a preset's `ALL_config="/etc/mkinitcpio.conf"` line out (that line makes mkinitcpio skip `mkinitcpio.conf.d`; a copy of the preset goes to `${dir:state}/taken-over/`; another `ALL_config` is left and named); after building, an image without `kernel/x86/microcode/` in its first 64 KiB fails the unit, which names it. A failed mkinitcpio fails the unit, says so and records nothing |
| file | `/etc/systemd/system/mesh-kernel-initramfs.service` | oneshot, sandboxed: the file system read-only but for `/boot`, `/etc/mkinitcpio.d` and the module's state, a private `/tmp`, no home, no network |
@@ -24,7 +24,7 @@ func TestTheDefaultIsMadviseAndTheUnitFollowsTheSetting(t *testing.T) {
for _, r := range m.Resources {
ids = append(ids, r["id"].(string))
}
if strings.Join(ids, " ") != "state huge-pages unit apply boot-entries boot-unit boot-hook boot-apply linux-lts linux-lts-headers modules-load modules-keep modules-cleanup amd-ucode intel-ucode microcode-hook initramfs initramfs-unit initramfs-apply" {
if strings.Join(ids, " ") != "state huge-pages unit apply boot-entries boot-unit boot-hook boot-apply linux-lts linux-lts-headers modules-load modules-keep modules-cleanup amd-ucode microcode-hook initramfs initramfs-unit initramfs-apply" {
t.Fatalf("order: %v", ids)
}
script := m.resource(t, "huge-pages")
@@ -18,10 +18,10 @@ func TestAC1TheManifestDeclaresTheMicrocodePackagesDropInScriptAndService(t *tes
for _, r := range m.Resources {
ids = append(ids, r["id"].(string))
}
if !strings.HasSuffix(strings.Join(ids, " "), "modules-cleanup amd-ucode intel-ucode microcode-hook initramfs initramfs-unit initramfs-apply") {
if !strings.HasSuffix(strings.Join(ids, " "), "modules-cleanup amd-ucode microcode-hook initramfs initramfs-unit initramfs-apply") {
t.Fatalf("order: %v", ids)
}
for id, pkg := range map[string]string{"amd-ucode": "amd-ucode", "intel-ucode": "intel-ucode"} {
for id, pkg := range map[string]string{"amd-ucode": "amd-ucode"} {
if r := m.resource(t, id); r["type"] != "package" || r["package"] != pkg {
t.Fatalf("%s: %v", id, r)
}
+1 -1
View File
@@ -1,5 +1,5 @@
# Module kernel, novox/hq issue 1977. mkinitcpio reads this after /etc/mkinitcpio.conf: it adds the microcode
# hook, which puts the CPU's current microcode (amd-ucode, intel-ucode) at the front of every initramfs, so
# hook, which puts the CPU's current microcode (amd-ucode) at the front of every initramfs, so
# every boot entry loads it, the default one too. HOOKS that name it already are left as they are.
# Written by the mesh; change the module.
case "$(declare -p HOOKS)" in
-5
View File
@@ -125,11 +125,6 @@
"type": "package",
"package": "amd-ucode"
},
{
"id": "intel-ucode",
"type": "package",
"package": "intel-ucode"
},
{
"id": "microcode-hook",
"type": "file",