Fix IOAPIC/HPET/NMI, PS/2 driver, and remove duplicate VT service entries

- IOAPIC: enable full IOAPIC initialization on AMD/Intel bare metal,
  dual GSI 0/2 timer mapping for platform compatibility, NMI handler
  uses raw COM1 PIO writes to avoid mutex deadlock
- HPET: counter validation, graceful fallback to PIT when HPET missing
- PS/2: fix 0xFE RESEND handling in all MouseState variants, add
  controller flush/self-test retry/aux port test from Linux 7.0
- ACPI: defer AML evaluation to avoid blocking initfs driver spawn
- VT chain: remove duplicate rootfs service files (inputd, vesad,
  fbcond, getty) that were already handled by initfs phase 1 and the
  legacy 30_console script from minimal.toml
- QEMU verified: boots to login prompt, 20 rootfs units (was 26),
  single login prompt (was double), only 1 expected error (wifictl)
This commit is contained in:
2026-04-24 00:57:19 +01:00
parent d3d8ca0239
commit 6d48f80bea
9 changed files with 8029 additions and 356 deletions
+6 -79
View File
@@ -5,8 +5,9 @@
#
# Target contract:
# - keep a text-login live/recovery surface only
# - use boot framebuffer for VT text consoles via vesad + fbcond
# - avoid the shared firmware/input/device-service stack from redbear-minimal
# - ship no graphics packages/services and no linux-firmware payload
# - ship no linux-firmware payload
include = ["minimal.toml", "redbear-legacy-base.toml", "redbear-netctl.toml"]
@@ -34,66 +35,13 @@ redbear-info = {}
# Keep package builder utility in live environment.
cub = {}
# VT/getty/login chain: initfs starts inputd + vesad + fbcond in phase 1,
# then minimal.toml legacy 30_console runs inputd -A 2 + getty 2 + getty debug.
[[files]]
path = "/etc/netctl/active"
data = "wired-dhcp\n"
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net
inputd -A 2
nowait getty 2
nowait getty /scheme/debug/no-preserve -J
"""
[[files]]
path = "/usr/lib/init.d/29_activate_console.service"
data = """
[unit]
description = "Activate console VT"
requires_weak = [
"10_net.target",
]
[service]
cmd = "inputd"
args = ["-A", "2"]
type = "oneshot"
"""
[[files]]
path = "/usr/lib/init.d/30_console.service"
data = """
[unit]
description = "Console terminals"
requires_weak = [
"29_activate_console.service",
]
[service]
cmd = "getty"
args = ["2"]
type = "oneshot_async"
respawn = true
"""
[[files]]
path = "/usr/lib/init.d/31_debug_console.service"
data = """
[unit]
description = "Debug console"
requires_weak = [
"10_net.target",
]
[service]
cmd = "getty"
args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async"
respawn = true
"""
[[files]]
path = "/etc/init.d/10_smolnetd.service"
data = """
@@ -147,22 +95,6 @@ cmd = "audiod"
type = "oneshot_async"
"""
[[files]]
path = "/etc/init.d/01_debug_console.service"
data = """
[unit]
description = "Debug serial login"
requires_weak = [
"00_ptyd.service",
]
[service]
cmd = "getty"
args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async"
respawn = true
"""
[[files]]
path = "/etc/init.d/02_serial_probe.service"
data = """
@@ -283,10 +215,5 @@ data = """
[[files]]
path = "/etc/pcid.d/00_text_mode_gpu_mask.toml"
data = """
# redbear-live-mini: force text-only mode by consuming all display-class PCI devices
# with a no-op command, before any graphics-capable driver rules are evaluated.
[[drivers]]
name = "Text-only live-mini display mask"
class = 0x03
command = ["/bin/true"]
# redbear-live-mini: no display driver matched; class 0x03 devices are skipped
"""
+4 -56
View File
@@ -48,59 +48,7 @@ redbear-info = {}
path = "/etc/netctl/active"
data = "wired-dhcp\n"
# minimal.toml: "inputd -A 2", "nowait getty 2", "nowait getty /scheme/debug/no-preserve -J"
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net
inputd -A 2
nowait getty 2
nowait getty /scheme/debug/no-preserve -J
"""
[[files]]
path = "/usr/lib/init.d/29_activate_console.service"
data = """
[unit]
description = "Activate console VT"
requires_weak = [
"10_net.target",
]
[service]
cmd = "inputd"
args = ["-A", "2"]
type = "oneshot"
"""
[[files]]
path = "/usr/lib/init.d/30_console.service"
data = """
[unit]
description = "Console terminals"
requires_weak = [
"29_activate_console.service",
]
[service]
cmd = "getty"
args = ["2"]
type = "oneshot_async"
respawn = true
"""
[[files]]
path = "/usr/lib/init.d/31_debug_console.service"
data = """
[unit]
description = "Debug console"
requires_weak = [
"10_net.target",
]
[service]
cmd = "getty"
args = ["/scheme/debug/no-preserve", "-J"]
type = "oneshot_async"
respawn = true
"""
# VT/getty/login chain is handled by the combination of:
# 1. initfs (phase 1): inputd daemon, vesad, fbcond — register input/display/fbcon schemes
# 2. minimal.toml legacy 30_console: inputd -A 2 + nowait getty 2 + nowait getty /scheme/debug
# No additional rootfs service files needed — initfs + legacy script covers the full chain.