This commit is contained in:
2026-03-20 08:57:03 +01:00
parent b85f3d1fdd
commit f41cc5aef1
7 changed files with 556 additions and 13 deletions

View File

@@ -2,6 +2,49 @@
---
## V30 2026-03-20 07:50:00
**Add kernel build script, initramfs, and live ISO boot support (Phase 4)**
### Changes:
- Created `kernel/build-kernel.sh` — automated kernel build script:
- Downloads Linux 6.19.9 from cdn.kernel.org (with mirror fallback)
- Applies DarkForge config via `make olddefconfig`
- Verifies all critical config options (EFI_STUB, NVME, EXT4, PREEMPT, etc.)
- Compiles bzImage with `-j32` and KCFLAGS="-march=znver4 -pipe"
- Outputs to `kernel/vmlinuz`, `kernel/vmlinuz.efi`, `kernel/System.map`
- Installs modules to `kernel/modules/`
- Updated `kernel/config`:
- Added CONFIG_CMDLINE_BOOL=y with serial console (ttyS0,115200n8)
- Added CONFIG_CMDLINE_OVERRIDE=n (allows efibootmgr to override at boot)
- Added CONFIG_BLK_DEV_INITRD=y (needed for live ISO squashfs boot)
- Added CONFIG_SERIAL_8250=y + CONFIG_SERIAL_8250_CONSOLE=y
- Created `src/iso/initramfs/init` — live ISO init script:
- Mounts proc/sys/devtmpfs, scans for DarkForge media on CD/USB/NVMe
- Mounts squashfs root, creates tmpfs overlay for writable root
- switch_roots into the live system
- Falls back to emergency shell if media not found
- Created `src/iso/build-initramfs.sh` — builds initramfs.cpio.gz from busybox
- Updated `src/iso/build-iso-arch.sh`:
- Now builds initramfs automatically if not present
- Includes initramfs in the EFI partition alongside kernel
- Creates startup.nsh for UEFI shell fallback
- Dynamically sizes the ESP based on kernel + initramfs size
- Updated `tests/run-tests.sh` QEMU test:
- Uses QEMU direct kernel boot (`-kernel` + `-initrd`) when a compiled kernel
is available — more reliable than UEFI ISO boot for testing
- Falls back to OVMF UEFI boot when no compiled kernel exists
### Plan deviation/changes:
- Kernel version bumped from 6.19.8 to 6.19.9 (latest 6.19.x stable)
### What is missing/needs polish:
- Kernel must be compiled by running `bash kernel/build-kernel.sh` on the target machine
- Once kernel is built, `qemu.kernel_boots` and `qemu.reaches_userspace` should pass
- Live ISO boot chain: kernel → initramfs → squashfs → overlay → init — needs end-to-end test
---
## V29 2026-03-20 07:36:03
**Fix brace expansion failure in ISO build script causing missing directories**