code wiki / (root) / nx_osboot_research_fetch.nx

nx_osboot_research_fetch.nx source

↩ module page · 65 lines · 5447 B

1// nx_osboot_research_fetch.nx -- bank the BOOTABLE-SPORE rung field (operator 2026-07-07: NishiOS rung 4 = the 2// bootable spore -- native NXE loader + VFS-on-blockfs mount + journaling; "match Puppy" = live image from POST). 3// Fetches the incumbents' OWN designs so the rung is RESEARCHED not guessed, across the 6 axes the rung touches: 4// (1) the live-image incumbents we measure against (Puppy/TinyCore = the nearest rival class), (2) live-image 5// MECHANICS (squashfs read-only image + overlay + initramfs = how they boot from a medium without touching the 6// host disk -- the never-brick-aligned design), (3) the boot chain from POST (POST->firmware->MBR/UEFI->loader-> 7// kernel = the exact ladder our spore must climb in the emulator), (4) executable LOADING (what execve/ELF loaders 8// do, so the native NXE loader exceeds knowingly), (5) JOURNALING/crash-consistency (jbd2-class WAL vs soft-updates 9// vs log-structured vs CoW = the design space for nx_journal), (6) VFS/mount internals (mount semantics + inode 10// model for VFS-on-blockfs). Sovereign TLS; idempotent. expect_exit:0 ORIGINAL 11import "nx_research_engine.nx" 12const K_MAGIC_8388608: i64 = 8388608 13 14func F(u: *u8, o: *u8, store: *TrustStore, out: *u8, cap: i64) -> i64 { return rf_fetch_bank(u, o, store, out, cap) } 15 16func main() -> i64 { 17 let store: *TrustStore = rf_init() 18 if (store as i64) == 0 { rf_puts("osboot: trust store load failed\n" as *u8); return 1 } 19 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- BOOTABLE-SPORE rung field -> Library\n" as *u8) 20 let cap: i64 = K_MAGIC_8388608 21 let out: *u8 = sys_mmap(cap) 22 var ok: i64 = 0 23 24 rf_section("LIVE-IMAGE INCUMBENTS -- the match-Puppy rival class (what a live image from POST means to them)" as *u8) 25 ok = ok + F("https://en.wikipedia.org/wiki/Puppy_Linux" as *u8, "osb_puppy" as *u8, store, out, cap) 26 ok = ok + F("https://en.wikipedia.org/wiki/Tiny_Core_Linux" as *u8, "osb_tinycore" as *u8, store, out, cap) 27 ok = ok + F("https://en.wikipedia.org/wiki/Live_CD" as *u8, "osb_livecd" as *u8, store, out, cap) 28 ok = ok + F("https://en.wikipedia.org/wiki/Live_USB" as *u8, "osb_liveusb" as *u8, store, out, cap) 29 30 rf_section("LIVE-IMAGE MECHANICS -- read-only image + overlay + initramfs (their boot-without-install design)" as *u8) 31 ok = ok + F("https://en.wikipedia.org/wiki/SquashFS" as *u8, "osb_squashfs" as *u8, store, out, cap) 32 ok = ok + F("https://en.wikipedia.org/wiki/OverlayFS" as *u8, "osb_overlayfs" as *u8, store, out, cap) 33 ok = ok + F("https://en.wikipedia.org/wiki/Initial_ramdisk" as *u8, "osb_initramfs" as *u8, store, out, cap) 34 ok = ok + F("https://en.wikipedia.org/wiki/Tmpfs" as *u8, "osb_tmpfs" as *u8, store, out, cap) 35 36 rf_section("BOOT CHAIN FROM POST -- POST -> firmware -> MBR/UEFI -> loader -> kernel (the spore's ladder)" as *u8) 37 ok = ok + F("https://en.wikipedia.org/wiki/Power-on_self-test" as *u8, "osb_post" as *u8, store, out, cap) 38 ok = ok + F("https://en.wikipedia.org/wiki/BIOS" as *u8, "osb_bios" as *u8, store, out, cap) 39 ok = ok + F("https://en.wikipedia.org/wiki/UEFI" as *u8, "osb_uefi" as *u8, store, out, cap) 40 ok = ok + F("https://en.wikipedia.org/wiki/Master_boot_record" as *u8, "osb_mbr" as *u8, store, out, cap) 41 ok = ok + F("https://en.wikipedia.org/wiki/Booting" as *u8, "osb_booting" as *u8, store, out, cap) 42 ok = ok + F("https://en.wikipedia.org/wiki/GNU_GRUB" as *u8, "osb_grub" as *u8, store, out, cap) 43 44 rf_section("EXECUTABLE LOADING -- what execve/ELF loaders do (so the native NXE loader exceeds knowingly)" as *u8) 45 ok = ok + F("https://en.wikipedia.org/wiki/Loader_(computing)" as *u8, "osb_loader" as *u8, store, out, cap) 46 ok = ok + F("https://en.wikipedia.org/wiki/Executable_and_Linkable_Format" as *u8, "osb_elf" as *u8, store, out, cap) 47 ok = ok + F("https://en.wikipedia.org/wiki/Exec_(system_call)" as *u8, "osb_exec" as *u8, store, out, cap) 48 ok = ok + F("https://en.wikipedia.org/wiki/Position-independent_code" as *u8, "osb_pic" as *u8, store, out, cap) 49 50 rf_section("JOURNALING / CRASH CONSISTENCY -- jbd2-class WAL vs soft-updates vs log-structured vs CoW" as *u8) 51 ok = ok + F("https://en.wikipedia.org/wiki/Journaling_file_system" as *u8, "osb_journalfs" as *u8, store, out, cap) 52 ok = ok + F("https://en.wikipedia.org/wiki/Ext4" as *u8, "osb_ext4" as *u8, store, out, cap) 53 ok = ok + F("https://en.wikipedia.org/wiki/Soft_updates" as *u8, "osb_softupdates" as *u8, store, out, cap) 54 ok = ok + F("https://en.wikipedia.org/wiki/Log-structured_file_system" as *u8, "osb_logfs" as *u8, store, out, cap) 55 ok = ok + F("https://en.wikipedia.org/wiki/Copy-on-write" as *u8, "osb_cow" as *u8, store, out, cap) 56 ok = ok + F("https://en.wikipedia.org/wiki/Fsck" as *u8, "osb_fsck" as *u8, store, out, cap) 57 58 rf_section("VFS / MOUNT INTERNALS -- mount semantics + inode model (VFS-on-blockfs done knowingly)" as *u8) 59 ok = ok + F("https://en.wikipedia.org/wiki/Virtual_file_system" as *u8, "osb_vfs" as *u8, store, out, cap) 60 ok = ok + F("https://en.wikipedia.org/wiki/Mount_(computing)" as *u8, "osb_mount" as *u8, store, out, cap) 61 ok = ok + F("https://en.wikipedia.org/wiki/Inode" as *u8, "osb_inode" as *u8, store, out, cap) 62 63 rf_puts("BOOTABLE-SPORE FIELD BANKED: "); rf_putn(ok); rf_puts(" / 27 -- live-image + POST-chain + loader + journaling + VFS-mount RESEARCHED\n" as *u8) 64 return 0 65}