From ed710a3b4101f0c68d436b4720084215f7e787d8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 27 Jul 2026 22:20:15 -0700 Subject: [PATCH 1/2] Boot the T2 kernel the ISO says it boots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every boot entry has named vmlinuz-linux-t2 since 0638855, but the file has contained stock Arch. Verified against the shipped ISO: arch/boot/x86_64/vmlinuz-linux-t2: bzImage, version 7.1.5-arch1-1 (linux@archlinux) while the mirror carries linux-t2-7.1.4-2. T2 MacBooks have been installing with no keyboard or trackpad in the live environment. Kernel packages ship nothing in /boot — only usr/lib/modules//vmlinuz. install_kernel() in /usr/share/libalpm/scripts/mkinitcpio sources /etc/mkinitcpio.d/.preset and copies THAT package's kernel to whatever ALL_kver names, whenever is_kernelcopy() sees an unowned absolute path. Our file was named linux.preset, so it overrode releng's copy of the same name and pointed the STOCK kernel at the T2 filenames. linux-t2's own generated preset writes those same two paths, and stock won. c23e0e7 introduced it a week after 0638855 added T2 support, so the feature worked for exactly seven days: before the preset existed, releng's linux.preset kept the stock kernel on its own filenames and linux-t2's generated preset produced the real thing. The fix is the filename. releng's linux.preset takes over the stock kernel again, which now writes /boot/vmlinuz-linux and initramfs-linux.img instead of squatting on the T2 names — so the ISO grows by one kernel and one archiso initramfs. That cost is not free and is worth revisiting: the stock kernel is in the live root only because releng's broadcom-wl hard-depends on it, and broadcom-wl is a prebuilt module for that kernel which cannot load on the T2 one we now boot. Dropping both is ~147MB and old Broadcom Macs lose live Wi-Fi. Boot the ISO on a T2 Mac before trusting this; the version string is only evidence that the right kernel ships, not that it works. Co-Authored-By: Claude Opus 5 (1M context) --- .../airootfs/etc/mkinitcpio.d/linux-t2.preset | 18 ++++++++++++++++++ configs/airootfs/etc/mkinitcpio.d/linux.preset | 9 --------- plans/aarch64-support.md | 6 +++--- 3 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 configs/airootfs/etc/mkinitcpio.d/linux-t2.preset delete mode 100644 configs/airootfs/etc/mkinitcpio.d/linux.preset diff --git a/configs/airootfs/etc/mkinitcpio.d/linux-t2.preset b/configs/airootfs/etc/mkinitcpio.d/linux-t2.preset new file mode 100644 index 0000000..2fbeecd --- /dev/null +++ b/configs/airootfs/etc/mkinitcpio.d/linux-t2.preset @@ -0,0 +1,18 @@ +# mkinitcpio preset file for the 'linux-t2' package on archiso +# +# The filename is the pkgbase, and that is load-bearing. Kernel packages ship +# nothing in /boot — they only install usr/lib/modules//vmlinuz — so +# mkinitcpio's alpm hook sources /etc/mkinitcpio.d/.preset and copies +# THAT package's kernel to whatever ALL_kver names (is_kernelcopy in +# /usr/share/libalpm/scripts/mkinitcpio). Named linux.preset, this pointed the +# stock kernel at the T2 filenames, so the ISO booted stock Arch while every +# boot entry said linux-t2 and T2 Macs got no keyboard or trackpad. +# +# releng ships its own linux.preset for the stock kernel; leave it alone. + +PRESETS=('archiso') + +ALL_kver='/boot/vmlinuz-linux-t2' +archiso_config='/etc/mkinitcpio.conf.d/archiso.conf' + +archiso_image="/boot/initramfs-linux-t2.img" diff --git a/configs/airootfs/etc/mkinitcpio.d/linux.preset b/configs/airootfs/etc/mkinitcpio.d/linux.preset deleted file mode 100644 index c40726e..0000000 --- a/configs/airootfs/etc/mkinitcpio.d/linux.preset +++ /dev/null @@ -1,9 +0,0 @@ -# mkinitcpio preset file for the 'linux' package on archiso - -PRESETS=('archiso') - -ALL_kver='/boot/vmlinuz-linux-t2' -archiso_config='/etc/mkinitcpio.conf.d/archiso.conf' - -archiso_image="/boot/initramfs-linux-t2.img" - diff --git a/plans/aarch64-support.md b/plans/aarch64-support.md index cfa3455..305531f 100644 --- a/plans/aarch64-support.md +++ b/plans/aarch64-support.md @@ -76,9 +76,9 @@ aarch64 has no BIOS — only UEFI. Drop the syslinux path entirely on ARM. The cleanest cut: keep one `grub.cfg` shared, strip the x86 shell/memtest fragments at build time when `OMARCHY_ARCH=aarch64`. Don't fork the file. -### 6. mkinitcpio preset — `configs/airootfs/etc/mkinitcpio.d/linux.preset` +### 6. mkinitcpio preset — `configs/airootfs/etc/mkinitcpio.d/linux-t2.preset` -References `vmlinuz-linux-t2` and `initramfs-linux-t2.img` (lines 5, 8). For aarch64, swap to `vmlinuz-linux` / `initramfs-linux.img`. Generate the file at build time from a template, keyed on arch. +Names `vmlinuz-linux-t2` and `initramfs-linux-t2.img`. The filename is the pkgbase and the alpm hook keys off it, so aarch64 does not rename this file — it simply does not ship it, and releng's own `linux.preset` covers the stock kernel. Drop `linux-t2` from `arch_packages` on aarch64 and the boot entries point at `vmlinuz-linux` / `initramfs-linux.img`. ### 7. Configurator — `configs/airootfs/root/configurator` @@ -145,7 +145,7 @@ Code: - `configs/efiboot/loader/loader.conf` — per-arch default entry - `configs/efiboot/loader/entries/01-archiso-x86_64-linux.conf` — generate aarch64 sibling at build time - `configs/grub/grub.cfg`, `loopback.cfg` — strip x86-only fragments on aarch64 -- `configs/airootfs/etc/mkinitcpio.d/linux.preset` — template by arch (drop linux-t2 on aarch64) +- `configs/airootfs/etc/mkinitcpio.d/linux-t2.preset` — omit on aarch64 (drop linux-t2 there; releng's linux.preset covers the stock kernel) - `configs/airootfs/root/configurator` — branch archinstall JSON mirror list on `uname -m`; optionally guard lspci T2 probe - `.github/workflows/nightly-build.yml` — matrix x86_64/aarch64 From 0631c0530a383c9203cbfba99f640babd6344f92 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 27 Jul 2026 22:25:50 -0700 Subject: [PATCH 2/2] Stop shipping a second kernel nobody boots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The live ISO boots one kernel for every machine, and after the preceding commit that kernel is linux-t2. Stock linux is then a second kernel nobody boots, plus its own archiso initramfs, copied into both the ISO tree and the size-constrained FAT EFI image — about 147MB. It could not simply be deleted: releng's broadcom-wl hard-depends on linux and is the only releng package that does, so pacman would pull the kernel back in. broadcom-wl is a prebuilt module for stock linux and cannot load on linux-t2. It has kept working until now only because of the bug the preceding commit fixes — the ISO has been booting stock all along — so it is booting T2 that takes it away, not this commit. Dropping the package only stops shipping something that can no longer load. Nothing in the offline install needs Wi-Fi in the live environment. Both packages stay in the offline mirror and this changes nothing about installed systems: linux comes from builder/archinstall.packages and remains what configurator's detect_kernel picks for every machine that is not a T2 Mac, and broadcom-wl comes from omarchy-other.packages, so install/hardware/ fix-bcm43xx.sh can still install it offline on BCM4360/BCM4331 MacBooks. The removal is anchored so linux-t2, linux-firmware, linux-firmware-marvell and linux-atm are untouched; verified against releng's real list. Co-Authored-By: Claude Opus 5 (1M context) --- builder/build-iso.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/builder/build-iso.sh b/builder/build-iso.sh index 57a339c..852768d 100755 --- a/builder/build-iso.sh +++ b/builder/build-iso.sh @@ -116,6 +116,19 @@ cp "/tmp/$NODE_FILENAME" "$build_cache_dir/airootfs/opt/packages/" arch_packages=(linux-t2 git gum jq openssl plymouth python-terminaltexteffects tzupdate omarchy-keyring "$OMARCHY_SETTINGS_PACKAGE" lvm2 cryptsetup parted) printf '%s\n' "${arch_packages[@]}" >> "$build_cache_dir/packages.x86_64" +# The live ISO boots linux-t2 (see airootfs/etc/mkinitcpio.d/linux-t2.preset), so +# stock linux is a second kernel nobody boots: ~147MB of ISO, plus its own archiso +# initramfs, copied into both the ISO tree and the size-constrained FAT EFI image. +# +# It cannot just be deleted — releng's broadcom-wl hard-depends on it, and it is +# the only releng package that does, so pacman would drag the kernel straight back +# in. broadcom-wl is a prebuilt module for stock linux and cannot load on the +# kernel we boot, so it has done nothing since we started booting T2 anyway. The +# install is entirely offline and the live environment needs no Wi-Fi driver. +# +# Anchored so linux-t2 and linux-firmware are untouched. +sed -i -E '/^(linux|broadcom-wl)$/d' "$build_cache_dir/packages.x86_64" + # Build the offline mirror: everything pacstrap might want during the target # install. With --local-source, the omarchy* packages we just built are # already in the mirror and we filter them out below. Without it, pacman -Syw