From ee821e0bc7ffe608157f7847cadeb451da10430b Mon Sep 17 00:00:00 2001 From: AprilNEA Date: Tue, 7 Apr 2026 17:17:37 +0800 Subject: [PATCH 1/2] feat(config): enable 8250/16550 serial for Hypervisor.framework backend Enable CONFIG_SERIAL_8250 alongside the existing PL011 so the same kernel binary works with both VZ and HV backends: - VZ backend: uses PL011 (earlycon=pl011, console=ttyAMA0) - HV backend: uses ns16550a via vm-superio (earlycon=uart,mmio32, console=ttyS0) Both drivers are built-in (CONFIG_MODULES=n) so no initramfs module loading is needed. Kernel size impact is minimal (~20KB). Also enable CONFIG_SERIAL_OF_PLATFORM for FDT-based UART discovery. --- CLAUDE.md | 4 +++- configs/arcbox-arm64.config | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 07429cc..88e8cb8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -64,9 +64,11 @@ Key configs for macOS Virtualization.framework compatibility: # Required for VirtioFS on macOS CONFIG_VIRTIO_IOMMU=y -# PL011 serial console (Virtualization.framework) +# Serial console: PL011 (VZ backend) + 8250/16550 (HV backend) CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y # GPIO support (Virtualization.framework) CONFIG_GPIOLIB=y diff --git a/configs/arcbox-arm64.config b/configs/arcbox-arm64.config index dcda3f8..dcfe64c 100644 --- a/configs/arcbox-arm64.config +++ b/configs/arcbox-arm64.config @@ -243,11 +243,17 @@ CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_TTY=y CONFIG_VT=n -CONFIG_SERIAL_8250=n -# PL011 serial console (for Virtualization.framework) +# Serial console: PL011 for VZ backend, 8250/16550 for HV backend. +# Both are built-in so the same kernel binary works with either backend. CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_DW=n +CONFIG_SERIAL_OF_PLATFORM=y # GPIO support (for Virtualization.framework) CONFIG_GPIOLIB=y From f6e4bd7545d6917f5cf1a77b828f5ca57c7a7904 Mon Sep 17 00:00:00 2001 From: AprilNEA Date: Tue, 7 Apr 2026 17:26:37 +0800 Subject: [PATCH 2/2] docs: update section heading to cover both VZ and HV backends --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 88e8cb8..3864538 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -58,7 +58,7 @@ arcbox-kernel/ ## Kernel Configuration -Key configs for macOS Virtualization.framework compatibility: +Key configs for macOS VM backends (VZ = Virtualization.framework, HV = Hypervisor.framework): ``` # Required for VirtioFS on macOS