# common.fragment — the kconfig layer EVERY wasm32 kernel in this tree gets. # # Every config this rig produces is built the same way, and only from files: # # arch/wasm32/configs/wasm32_defconfig the arch base (kernel tree) # + config/common.fragment THIS FILE, shared by all # + e.g. nfs/hosttrans gate layers # + CONFIG_INITRAMFS_SOURCE=... # -> olddefconfig -> build/.config # # Nothing is edited in place afterwards. That is the point: a config produced # by mutating an already-resolved config is how this tree got a full 881-object # rebuild on every alternation, a crash window that could leave the shared # .config naming some gate rig's cpio, and a build that stopped to ask a human # for INITRAMFS_ROOT_UID. All three were the same defect wearing three hats. # # WHAT BELONGS HERE: a setting that must hold for EVERY wasm32 kernel this tree # builds, and that is NOT already in wasm32_defconfig. Anything true of only one # target belongs in that target's own fragment. # # THE SECOND CONSUMER THAT MADE THIS TEST BITE IS GONE (2026-08-31). Until then # the rule read "the mainline distro kernels AND the machine-fs appliance", and # the appliance was what stopped "so both get it" from being a free move: it was # headless and shell-less by design, so a shared default that quietly grew it # was a real cost with a real objector. The distro rigs are now the only # non-gate consumer, which makes it EASIER to drop something in here and harder # to notice you should not have. The per-target fragments beside this file # (nfs, hosttrans, and the gate layers) are still the right home for anything # not universally true, and their headers say why in their own terms. # # DELIBERATELY EMPTY TODAY, and that is a statement rather than a placeholder: # as of 2026-08-10 there is no setting that both targets need and the arch # defconfig lacks. The layer exists so the first one has an obvious home and # so the dependency graph is complete -- every config in this rig depends on # this file, so a shared change re-merges both targets and a per-target change # re-merges only its own. # ── THE FIRST GENUINELY SHARED SETTING (2026-08-23) ───────────────────────── # # CONFIG_PREEMPT_COUNT, via the arch symbol that selects it. Both targets need # it and neither gets it from wasm32_defconfig, which is exactly the test this # file's header states. # # WHY THE ARCH SYMBOL AND NOT `CONFIG_PREEMPT_COUNT=y` DIRECTLY. Because that # line does nothing. CONFIG_PREEMPT_COUNT is a promptless `bool` with no default # (kernel/Kconfig.preempt); olddefconfig re-resolves it from its definition and # discards the fragment's value. Measured 2026-08-23: a fragment carrying # `CONFIG_PREEMPT_COUNT=y` merged without a single warning from merge_config.sh # and the resulting config had no PREEMPT_COUNT line at all. The kernel-side # selector is arch/wasm32/Kconfig's WASM32_PREEMPT_COUNT, which carries the full # incident; this line is the switch. # # WHAT IT BUYS. A counter, not preemption — CONFIG_PREEMPT_NONE stays y. It # makes "no lane yields the thread while holding a lock" enforceable rather than # hoped-for: __cond_resched() declines when preempt_count() != 0, which is what # the M6 budget safepoint (__hwjs_safepoint_reschedule) and the collapsed CPU 0 # (docs/plans/PLAN-COLLAPSED-CPU0.md §3.3) are both already written against. # # WHAT IT COSTS, measured on this pin rather than asserted — see the commit that # added this line for the vmlinux.wasm size delta and the boot evidence. # # THE RED ARM IS DELETING THIS LINE. The arch symbol defaults to n, so a build # without it is the pre-2026-08-23 kernel and the delta is one fragment line. CONFIG_WASM32_PREEMPT_COUNT=y # ── ARMED BUDGETED SAFEPOINTS ARE NOT TURNED ON HERE, AND THIS SAYS WHY ───── # # `CONFIG_WASM32_CORO_SAFEPOINTS=y` is the one line that would arm them, and it # is deliberately absent. It was built and booted on 2026-08-24 and the kernel # does not survive it yet: # # armed appliance link (832 of 834 TUs — the two host-boundary TUs are # excluded by name in arch/wasm32/{mm,kernel}/Makefile), 15,211,503 bytes # against 13,342,519 unarmed, boots for 0.3 s and traps: # # hwjs-rt VIOLATION[lane 0]: set-over-set: parked slot not empty at a new # park … a coroutinized frame parked under a NATIVE caller and the witness # reached the next park # # That is the native-traversal contract, kernel-wide rather than in the two TUs # the COMPILE refused: a checkpoint turns an ordinary function into a suspender, # and every native frame that drives one has to be able to absorb the park. The # two compile-time refusals were the same fault caught early; this is the rest of # the population, and finding it needs the frames enumerated, not the arming # relaxed. Turning the line on before that is turning a boot failure into a # different boot failure. # # The knob, the Kbuild emission, the sentinel translation and the per-TU/artifact # accounting all landed with this measurement and are dormant: the symbol # defaults to n and arch/wasm32/Makefile emits nothing. Whoever takes the # native-traversal work next needs one fragment line, not a build system. # Roots must mount from the selected filesystem device. Archive roots are retired. # CONFIG_BLK_DEV_INITRD is not set # Local ext4 image boot uses the same kernel and upstream block/filesystem drivers. CONFIG_BLOCK=y CONFIG_BLK_DEV=y CONFIG_VIRTIO_BLK=y CONFIG_EXT4_FS=y # The Node disk contract is a filesystem at byte zero. Partition scanners # allocate a vmalloc map, which wasm32's linear kernel memory cannot map. CONFIG_PARTITION_ADVANCED=y # CONFIG_MSDOS_PARTITION is not set # CONFIG_EFI_PARTITION is not set # ── THE MACHINE HAS A NAME (2026-10-10) ───────────────────────────────────── # # Nothing in a booted machine sets the hostname: there is no /init, the init is # the distro's own shell, and no shell reads /etc/hostname (whose text in these # rootfs builds is a description, not a name). So `uname -n` answered the # kernel's compiled-in default, "(none)" — and the shell prompt the host now # hands every machine, `\u@\h:\w\$ ` (hardwarejs frame/machine/drive.ts), would # have rendered as `root@(none):/# `. Every distro kernel gets this name until a # machine has an init that sets its own. CONFIG_DEFAULT_HOSTNAME="brintos" # ── x86-64 ELFs RUN THROUGH THE USER-SPACE EMULATOR (2026-10-28) ──────────── # # The user exec loader routes an x86-64 ELF to /usr/bin/blink as if it were a # `#!/usr/bin/blink --` script (arch/wasm32/kernel/binfmt_wasm.c). The arch # symbols default to y; they are asserted here so config-survived proves they # stuck, because a kernel without them boots fine and every x86 program then # fails ENOEXEC — the x86emu gate is the only thing that would notice. The # path must match where the rigs stage Blink (DISTRO_PACKAGES). CONFIG_WASM32_X86_EMU=y CONFIG_WASM32_X86_EMU_PATH="/usr/bin/blink"