Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/aurora-boot/90-aurora.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
HOOKS=(base systemd autodetect modconf keyboard sd-vconsole asahi aurora-usb4 aurora-vendor block sd-encrypt aurora-root filesystems fsck)
HOOKS=(base systemd autodetect modconf keyboard sd-vconsole asahi aurora-usb4 aurora-display aurora-vendor block sd-encrypt aurora-root filesystems fsck)
COMPRESSION="zstd"
7 changes: 4 additions & 3 deletions packages/aurora-boot/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
pkgname=aurora-boot
pkgver=20261018
pkgrel=8
pkgrel=9
pkgdesc='Aurora Alarm boot integration'
arch=('any')
license=('MIT')
url='https://github.com/aurora-silicon/alarm-aurora'
source=('90-aurora.conf' 'initialize-keyring' 'aurora-alarm-keyring.service' 'aurora-boot.hook' '80-aurora-image.preset' 'aurora-usb4.install')
sha256sums=('d13854cdb2d8dd83d3a29737d9dced264c57ac00af251938b4d4c5b5a0996b57' 'fec1107e24cda3e1197d9a803792b79e18ccdd839b5cf78cf862e7ee46a27e5b' 'f358a3db63a0a7d293607e56d519d747158d6ff8bc9704d12c8340745fe0f9e1' '69ec3a3f9e749209186f350e3948148b6db9d3960631ce452aa31353568e19a7' '92eddf89ceab1c399a7601d16571d6b22f515b6a7148fd25300dcdb9f4ea6ec2' '83c9f4a85658401161aa860544cbf4e4ddeb2e26c0759e2605dc775774d41d2d')
source=('90-aurora.conf' 'initialize-keyring' 'aurora-alarm-keyring.service' 'aurora-boot.hook' '80-aurora-image.preset' 'aurora-usb4.install' 'aurora-display.install')
sha256sums=('c3f872a03b22d88fb6cc479eb380d36aac7141b2563ba7f6e77d3751cd464dce' 'fec1107e24cda3e1197d9a803792b79e18ccdd839b5cf78cf862e7ee46a27e5b' 'f358a3db63a0a7d293607e56d519d747158d6ff8bc9704d12c8340745fe0f9e1' 'd6f302ee3fb35a0537acda4d49f5da71f6dbe58a51ce1382aa528471f3b4e1e7' '92eddf89ceab1c399a7601d16571d6b22f515b6a7148fd25300dcdb9f4ea6ec2' '83c9f4a85658401161aa860544cbf4e4ddeb2e26c0759e2605dc775774d41d2d' 'c76ddae94811c2b1f55be9a0ec1622c9c66496b929de322e0ea45628f714a710')
package() {
depends=('mkinitcpio' 'grub' 'asahi-scripts' 'aura' 'uboot-aurora' 'aurora-firmware' 'aurora-firstboot' 'aurora-neo-platform-config' 'speakersafetyd-aurora-profiles' 'aurora-keyring' 'asahi-alarm-keyring')
install -Dm644 90-aurora.conf "$pkgdir/etc/mkinitcpio.conf.d/90-aurora.conf"
install -Dm644 aurora-usb4.install "$pkgdir/usr/lib/initcpio/install/aurora-usb4"
install -Dm644 aurora-display.install "$pkgdir/usr/lib/initcpio/install/aurora-display"
install -Dm644 aurora-boot.hook "$pkgdir/usr/share/libalpm/hooks/95-aurora-boot.hook"
install -Dm755 initialize-keyring "$pkgdir/usr/libexec/aurora/initialize-keyring"
install -Dm644 aurora-alarm-keyring.service "$pkgdir/usr/lib/systemd/system/aurora-alarm-keyring.service"
Expand Down
1 change: 1 addition & 0 deletions packages/aurora-boot/aurora-boot.hook
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Operation = Remove
Type = Path
Target = etc/mkinitcpio.conf.d/90-aurora.conf
Target = usr/lib/initcpio/install/aurora-usb4
Target = usr/lib/initcpio/install/aurora-display

[Action]
Description = Updating the Aurora initramfs...
Expand Down
16 changes: 16 additions & 0 deletions packages/aurora-boot/aurora-display.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# The display chain belongs in the initramfs, as Fedora's 91aurora-early-kms
# puts it there. On the M4 Pro the kernel's T6041 display gate brings the
# external display processors up only once the PMP driver binds, and gives up
# 20 s into the boot. With apple-pmp only on the root filesystem, an encrypted
# root holds it back until the passphrase is typed, so the gate gives up and
# every external display and Type-C DP route stays off for the whole boot.
# appledrm brings apple-pmp, dcp-fabric-core and typec as dependencies, and
# its crossbar soft dependency; both are named so that neither depends on
# that resolution. udev loads them during the initramfs coldplug.
build() {
add_module apple-pmp?
add_module mux-apple-display-crossbar?
add_module appledrm?
}
help() { echo 'Add the Apple display chain and its PMP to the initramfs.'; }
17 changes: 17 additions & 0 deletions tests/test_initramfs_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ def test_usb4_router_comes_with_the_type_c_controllers(self):
config = (ROOT/'packages/linux-aurora/config').read_text().splitlines()
self.assertIn('CONFIG_USB4_APPLE_SOC=m', config)

def test_display_chain_and_pmp_come_before_the_root_is_unlocked(self):
# The T6041 display gate waits 20 s for the PMP driver; on an encrypted
# root, apple-pmp on the root filesystem arrives only after the passphrase.
hooks = sourced('HOOKS')
self.assertIn('aurora-display', hooks)
self.assertLess(hooks.index('aurora-display'), hooks.index('sd-encrypt'))
hook = [line.strip() for line in (BOOT/'aurora-display.install').read_text().splitlines()]
for module in ('apple-pmp?', 'mux-apple-display-crossbar?', 'appledrm?'):
self.assertIn(f'add_module {module}', hook)
self.assertIn('install -Dm644 aurora-display.install "$pkgdir/usr/lib/initcpio/install/aurora-display"',
(BOOT/'PKGBUILD').read_text())
self.assertIn('Target = usr/lib/initcpio/install/aurora-display',
(BOOT/'aurora-boot.hook').read_text().splitlines())
config = (ROOT/'packages/linux-aurora/config').read_text().splitlines()
for option in ('CONFIG_DRM_APPLE=m', 'CONFIG_APPLE_PMP=m'):
self.assertIn(option, config)

def test_modules_have_no_optional_suffix(self):
# The systemd hook writes MODULES to modules-load.d unchanged, and
# systemd-modules-load has no optional "name?" form.
Expand Down
Loading