5 Commits

Author SHA1 Message Date
Pooya Parsa
97f8d9e5f1 guest: distroless base initramfs and separate Alpine and Debian erofs images
The bundle (unkernel.wasm) carries a small busybox initramfs that mounts a
distro image labelled kwroot under an overlay root, or starts the base shell
without one. guest/ replaces kernel/guest/: base/, distro/NAME/, shared lib/
and tools/. Images are laid out for their boot by a patched mkfs.erofs and a
recorded boot file list, with a prefetch hint in the image header. Debian
bakes its apt lists and cache, a set of everyday packages and a
command-not-found installer.
2026-11-19 14:46:13 +00:00
Pooya Parsa
f6cf124877 kernel: build Ubuntu Base 26.10 arm64, and run it in the Ubuntu demo
Ubuntu 25.10 and later were out of reach on riscv64 (RVA23 with V); the
arm64 baseline is ARMv8.0, so the newest release runs. Pin
ubuntu-base-26.10-base-arm64.tar.gz from its versioned release directory
for kernel/build.sh ubuntu and the page's Ubuntu demo, which was still
fetching the riscv64 24.04.5 tarball. The demo re-extracts a tree whose
bash is not an aarch64 program, and skips the page's download only for
an aarch64 tree.

Checked 2026-11-18: the disk boots to kw-init's shell (glibc 2.44, apt
3.3.3), apt-get update and installs work, systemd 261 boots to running
with no failed units, and the demo's chroot runs apt from the pushed and
from a self-fetched tarball.
2026-11-19 00:12:48 +00:00
Pooya Parsa
783c48c76e Switch the guest CPU to AArch64
User space is now unmodified aarch64 Linux ELF. kwemu gets an A64
interpreter (src/a64): integer, scalar and vector floating point,
AdvSIMD, exclusives and load-acquire/store-release, the EL0 system
registers, AES, PMULL, SHA1, SHA256 and CRC32. The kernel runs arm64
user space (signal frames, HWCAP, ptrace regsets, the arm64 syscall ABI),
and the guest image, the bundle, kwtest and the page's texts are built
for aarch64.
2026-11-19 00:12:38 +00:00
Pooya Parsa
0e1cd96b77 Build the SMP kernel and the bundle's SMP patch with kernel/build.sh
kernel/build.sh smp builds the SMP kernel (kw_defconfig + kw_smp.config,
kwemu with atomics) from the same tree into vendor/build/kernel-smp; all
builds both kernels, and every bundle refresh adds the UP-to-SMP patch
when the SMP kernel is the same build of the tree (KW_SMP=1 requires it,
KW_SMP=0 leaves it out). kernel stays the UP-only quick loop. The patch is
cached in kernel-smp/up.kwpatch. Fixed build stamps (user, host, a build
id hashed from the tree and kwemu sources, the tree's newest commit date)
make kernels and patch reproducible while every other build keeps its own
banner for snapshot matching. Configs are checked against their fragments
after a reconfigure. KW_BUILD, KOUT_SMP, KWEMU_SMP and LINUX_REPO make the
script runnable against another tree and output root.

bundle.mjs --smp refuses two kernels that are not the UP and SMP builds
of one tree (banner, KW_ABI_VERSION, wasm_cpu_start, memory type), with
--smp-optional to warn instead and --smp-patch to reuse a cached patch.
The release workflow builds both kernels, runs kwtest on 2 CPUs and the
kernel patch tests (unexercised).
2026-11-17 13:23:55 +00:00
Pooya Parsa
26d08730cc Initial commit 2026-11-15 23:27:04 +00:00