Commit Graph
69 Commits
Author SHA1 Message Date
Linehu bd098f51ec feat(wlan): DKM wlan driver framework + net connect/disconnect ABI extension
- wlan.drv: multi-vendor PCI probe (class 02:80; Intel AX2xx/Realtek/Atheros ath9k/Broadcom), registers wireless netdev when real hw present (attest net_wlan)
- scan/connect/disconnect: strict panic skeletons (NETWL-E10/E11/E12) until native chip backends (ath9k first, no fw blob) or linuxguest backend land
- net.h/dkm_shared.h: connect/disconnect appended to dkm_net_api + device_desc (ABI-compatible tail append); net.c dispatch with zero-degrade panic
- QEMU (no wlan card): no netdev registered, attest MISSING exempted by FUCK [attest] as designed
2026-10-06 12:13:59 +08:00
Linehu 14015b78a4 chore: drop realtest image variant (dev/release only) 2026-10-05 21:30:51 +08:00
Linehu ace5711a1e fix(login): atomic ld.lld output (tmp+move) - stop intermittent make failure under Defender lock 2026-10-05 21:24:48 +08:00
Linehu 6caf1aa322 feat: login wallpaper blur backdrop + no logo intro + login spinner; firstInit wallpaper backdrop
- login: drop ohMyLogo intro, blurred back.rgba as full-screen backdrop (built-in data)
- login: spinner (int 16-seg table, no SSE) below card during desktop load, wallpatch clear
- firstInit: same blurred wallpaper backdrop behind wizard cards
- note: 1.8MB wallpaper data also absorbs the DSK-E70 write-zero minefield -> integrity OK
2026-10-05 20:12:51 +08:00
boonxiong2andGitHub 5db517f435 chore/gitignore-local-artifacts
chore(git): ignore IDE config and local run logs
2026-10-05 18:41:54 +08:00
boonxiong2andGitHub c5c192c570 fix/boot-to-desktop
fix(dsk,firstInit,build): let the system boot all the way to the desktop
2026-10-05 18:41:28 +08:00
boonxiong2 ccf76b3ec4 chore(git): ignore IDE config and local run logs
JetBrains only ships a partial .idea/.gitignore, so Deshab-OS.iml and
inspectionProfiles/ kept showing up as untracked. Local QEMU serial dumps
(run_qemu.bat > deshab_log.log) are build-time artifacts of the same kind.

Machine-local files must not land in a shared repository - they carry no
information for anyone else and create noise on every checkout.
2026-10-05 18:35:16 +08:00
boonxiong2 780230599d fix(dsk,firstInit,build): let the system boot all the way to the desktop
Four independent blockers sat between "the image boots UTSM" and "the desktop
comes up". Each one wedged the boot on its own; all four are fixed here and the
tree now reaches "[desktop] desktop ready" under QEMU/OVMF
(evidence: .build_tmp/d2.log).

1. FirstInit made networking a hard gate (CODE/firstInit/main.c)
   The setup wizard always showed the network page, and on a machine with no
   wireless device the only exit was Save - pressing Connect raised NET-E01.
   Networking is not a precondition for entering the system, so a wizard that
   cannot be completed without it is a plain design defect.
   - No wireless device detected -> skip the network page entirely (the
     g_no_wireless_device flag already existed but was only logged).
   - With a device present, add a Skip button (draw + mouse hit-box + keyboard
     Enter), mirroring "I don't have internet" on Windows.
   - Connect keeps its zero-fallback NET-E01 panic: the unimplemented path is
     still honest, it just no longer holds the user hostage.

2. ESP cluster size left no room in the root directory
   (CODE/linux/pack_system_image.sh)
   With the cluster size left to mkfs it chose 1 sector, i.e. 16 directory
   entries per cluster. The ESP root ends up holding exactly 16 entries
   (DESHABBOOT/EFI/LIMINE/BOOT/DRIVER/SYSTEM/USER/NVVARS plus one long-name
   entry each), and the root chain is a single cluster - so on first boot the
   DSK could never write USER.CONF.
   Pin -s 4 (2KiB, 64 entries): it clears the FAT32 65525 lower bound and the
   0xFFF5 boundary that -s 8 lands on at this 256MiB size, and leaves 48 free
   entries. The alternatives were measured, not guessed (see the comment).

3. DSK could not grow the root directory (CODE/dsk/main.c)
   fat32_write_root_file returned -4 "no free dir entry" whenever the scan of
   the root chain came up empty. A FAT filesystem is supposed to extend the
   directory chain, so allocate a cluster, link it at the current tail, write
   the entry there and commit the FAT. Fixing only (2) would have papered over
   this: any real disk whose root fills up would still fail the same way.

4. Nothing generated the CJK bitmap font packs (build.ps1)
   The desktop loads system/font/simhei_16.dbf and panics DESK-E04 FONT PACK
   MISSING without it. The .dbf files are generated from simhei.ttf by
   CODE/font/mkfont.py and are gitignored, but no build step ever invoked it -
   same class of bug as the previously untracked .drv binaries. Generate
   simhei_16.dbf / simhei_24.dbf in build.ps1 (with the existing WSL python3
   fallback for Pillow), rebuilding only when the TTF is newer than the pack.

docs/STATUS.md updated to match: FirstInit wizard and the D3 named API export
table move to done, and the FAT32 / ESP cluster size / CJK font pack entries
are added or corrected. D3 was already fully implemented (table, lookup,
selftest with positive and negative cases, TST-E21..E24 instrumentation) -
only the status row was stale.

Verified boot chain (QEMU/OVMF, dev variant):
  BdsDxe -> Limine -> UTSM -> DKM 17/17 -> DSK -> FirstInit (network page
  skipped) -> USER.CONF written -> login (password accepted) -> desktop:
  "[zhfont] dbf loaded (16px ok)" ... "[desktop] desktop ready"
2026-10-05 18:32:24 +08:00
LinehuandGitHub 10599b62c4 Merge pull request #4 from Linehu-Studio/fix/bootable-image-and-dkm-build
fix(build): make the packed image bootable, restore 9 missing DKM drivers
2026-10-05 15:13:41 +08:00
boonxiong2 240daa3409 docs(lessons): record the three causes of "build succeeds, image won't boot"
Covers the ESP FAT geometry vs OVMF FatPkg, the limine.conf guest module
drift, and the nine drivers that 055c521 untracked without a build step that
could regenerate them. Also the autocrlf/.gitattributes conclusion and the
check_env.sh hardcoded-path trap.
2026-10-05 14:54:25 +08:00
boonxiong2 cf395474bf docs(status): correct stale subsystem states against the source
STATUS.md/TASKBOARD.md under-reported several subsystems that are in fact
implemented. Corrected against the code and against a clean QEMU boot log
(.build_tmp/qemu_final.log, this branch).

- 页表映射接口 was ⬜ "mmio 通用映射待做". It exists and is in use:
  kernel_api.mm_map_mmio / mm_unmap_mmio (PCD|PWT independent window), called
  by apic, ehci, xhci and nvme, including BARs above 4G. -> ✅

- NVMe was 🔶 "PCI discovery only, BAR0>4G 待映射". CODE/DKM/nvme/nvme.c is
  1641 lines: admin SQ/CQ with phase bit, IDENTIFY, IO queue (qid=1), read/
  write/flush, cross-page PRP lists, MSI and MSI-X (vector allocator, IDT pool
  0x40-0xDF), block provider registration, NVME-E01..E03 zero-fallback
  instrumentation. -> ✅

- virtio_net was 🔶 "PCI/capability 枚举, 无 virtqueue". It has a legacy
  split-ring virtqueue (desc/avail/used), vq_setup, 32x2048B RX buffers, TX/RX
  rings and a DHCP DISCOVER->OFFER selftest. -> ✅

- ELF64 .drv loading said 14/14. build.ps1 now compiles all 17 drivers listed
  in manifest.json (fixed on this branch; nine were never built since 055c521
  untracked the .drv binaries). -> 17/17

- FAT32 (DKM side) stays 🔶 but the boundary was wrong. It is read-only
  BPB/FAT/dirent parsing plus a root-directory walk, with no filesystem API
  layer (no open/read/stat) - not "子目录路径待完善". The large-disk read/write
  path lives in the DSK-side FAT32 implementation.

- TASKBOARD 遗留工程债: vector allocator/MSI-X, NVMe high BAR MMIO and
  virtio-net virtqueue RX/TX are done. The remaining FAT32 item is reworded to
  what is actually missing (the FS API layer).

Evidence for the driver/NVMe/virtio rows is the boot log on this branch:
14x "[<drv>] driver ready", and with no NVMe controller / virtio-net device
attached the drivers correctly log a warning and still reach "driver ready"
(designed fallback, both listed in the CLAUDE.md whitelist).
2026-10-05 14:09:19 +08:00
boonxiong2 845a8f0203 chore(git): pin *.sh to LF via .gitattributes
Shell scripts are run by bash (WSL/Linux/CI). With core.autocrlf=true the
working tree gets CRLF, and bash then fails on the stray CR: the packing step
of build.bat died with

    pack_system_image.sh: line 13: $'\r': command not found
    pack_system_image.sh: line 14: set: pipefail\r: invalid option name

core.autocrlf is a per-clone setting and is not shared, so the only reliable
fix is a repository-level attribute. Pin *.sh to LF for every checkout.
2026-10-05 14:05:27 +08:00
boonxiong2 1c99c77b3f fix(build): make the packed image actually bootable
There were three independent reasons a fresh build produced an image that
OVMF would not boot. All three are fixed here; verified by booting the
resulting ISO/deshab-dev.img under QEMU/OVMF through to FirstInit.

1. ESP rejected by OVMF (CODE/linux/pack_system_image.sh)
   The vfat formatter was invoked with an explicit -s 8, forcing 4KiB clusters.
   On the 256MiB ESP that yields exactly 65535 clusters - the FAT32 0xFFF5
   boundary - and OVMF's FatPkg refuses to mount the volume. Symptom: BdsDxe
   logs "failed to load ... Not Found", the ESP shows up as BLKn with no FS in
   the UEFI Shell, and the firmware falls through to the internal shell.
   The sidecar FAT32 image (make_sata_sidecar.sh) mounts fine because it calls
   the formatter without -s. Drop -s here too and let the tool pick geometry.
   Do NOT add -f 1: OVMF mounts nfat=1 and nfat=2 alike, it was not the cause.

2. Limine dropped into a panic (CODE/linux/pack_system_image.sh)
   limine.conf declares the Linux-compat guest modules. build.sh uncomments
   them once Linux has been built, but nothing ever comments them back, so the
   file says "load boot():/boot/linux-initrd.img" while only linux-bzImage
   exists on disk - Limine panics on the missing module and never reaches the
   kernel. Filter the guest module_path lines against SYSTEM/boot/ at pack
   time and write the result to the ESP. Both the root /limine.conf and
   /limine/limine.conf are written, since Limine 10 prefers the latter. The
   tracked source file is left untouched.

3. Nine drivers were never compiled (build.ps1)
   Commit 055c521 untracked the .drv binaries on the grounds that they are
   regenerable, but build.ps1 only ever invoked Build-DkmDriver for 8 of the
   17 drivers listed in manifest.json. timer/acpi/pci/ahci/bootfs/vfs/fat32/
   devfs/ps2kbd had sources under CODE/DKM/ and no build step, so the image
   shipped without them and Limine failed on the first one. Add the missing
   compile steps, grouped by load stage. All 17 now match manifest.json.

Also in this commit (environment/tooling hygiene):
- check_env.sh: stop hardcoding /mnt/d/Code/Deshab (the original author's
  machine); derive the repo root from the script's own location. It was
  reporting a bogus "wsl_mount" failure on every other checkout and sending
  people to install packages that were already present. Also check and
  advertise the image-packing tools (dosfstools/e2fsprogs/fdisk/rsync), which
  were missing from the dependency list even though pack_system_image.sh
  hard-requires them.
- build_initrd.sh: same hardcoded-path fix.
- README.md: relative path instead of the stale absolute one.

Verified: ./build.bat -Variant dev under WSL2/Ubuntu, then QEMU/OVMF boots
through BdsDxe -> Limine -> UTSM -> DKM (17/17) -> DSK -> FirstInit, with the
PS/2 mouse initialising cleanly.
2026-10-05 14:03:39 +08:00
Linehu ee8b607f9a fix: login cursor ghost after double save-bg + integrity GOT immunity (DSK-E70 workaround)
- login: remove duplicate cursor_save_bg after draw_login_card (ghost residue)
- login: hidden visibility on __text_*/__expected_hash -> lea rip, len calc no longer depends on GOT slot
- login: dsk_e70_layout_guard keeps .text out of the DSK write-zero minefield (whitelisted, see STATUS.md)
- patch_login_hash: hash first PT_LOAD filesz (matches loader/runtime range) + e_shstrndx section names
- STATUS.md: register DSK-E70 (unresolved ibuf-tail write-zero, root cause open)
2026-10-05 02:34:15 +08:00
LinehuandGitHub 3aebe962be Merge pull request #2 from Linehu-Studio/build/fix-texture-stamp-guard
build: fix desktop texture regeneration crash on clean tree
2026-10-05 01:44:25 +08:00
boonxiong2 784b774bcb build: fix desktop texture regeneration crash on clean tree
stale-check compared LastWriteTime against a stamp file that does not
exist yet on the first build, so Get-Item threw PathNotFound and aborted
the build before make DSK.

- build.ps1: guard the texSrc/texStamp mtime comparison with
  Test-Path $TexStamp; $needTex is already $true when the stamp is
  absent, so the comparison is only meaningful when both files exist
- .gitignore: ignore IDEA.md local scratch note

Verified: .\build.bat now reaches gen_textures.py and emits
back.rgba / startMenuLogo.rgba / bootlogo.rgba into
SYSTEM/system/deshab64/desktop/textures/.
2026-10-05 01:41:50 +08:00
Linehu a570fe09b5 feat: white cursor with black outline (desktop/login/firstInit) + fix hash patcher param
- outline = empty pixel with any 8-neighbour filled, stays inside cursor save region

- patch_login_hash.ps1: typed byte[] params + ASCII comments, default path fallback (was silently misbinding under some hosts)
2026-10-04 22:43:18 +08:00
Linehu b4d9c8e7ed feat: desktop wallpaper from material pack back.rgba (889x500) instead of system/wallpaper.rgba 2026-10-04 22:21:14 +08:00
Linehu 87f8ce11da feat: all-white mouse cursor across desktop/login/firstInit 2026-10-04 21:43:43 +08:00
Linehu 87d532df01 feat: SAS-R0 boot-time capability attestation - unimplemented feature blocks boot
- attest.c: subsystems report readiness, attest_check() before DSK handoff

- FUCK [attest] require_<name>=1 (default) + not-ready -> lotus panic with feature errcode

- wired: sealed_mem/pckc/sched/drr/fs_fat32_rw/net_wired + placeholders (pkg/brand/dkm/nvme/virtio/wlan/vmx/drr_real_mac)

- negative test: require_pkg=1 -> boot-time PKG-E10 panic (verified); dev/release FUCK whitelist = STATUS.md undone items

- CLAUDE.md whitelist rule updated
2026-10-04 21:34:50 +08:00
LinehuandGitHub 25fbabe368 Merge pull request #1 from Linehu-Studio/fix/del_o_and_fix_build_in_linux
build: untrack generated .o/.d and allow CC/LD override
2026-10-04 20:47:21 +08:00
boonxiong2andGitHub e1ebcd0f89 Merge branch 'main' into fix/del_o_and_fix_build_in_linux 2026-10-04 20:33:01 +08:00
Linehu 055c521ceb chore: gitignore only blocks regenerable binaries - demo video via LFS
- ignore: *.o/*.elf/*.drv/*.img/*.rlib/*.rmeta/*.pdb/*.dbf/*.rgba/target//.build_tmp (all regenerable)

- keep: source assets (png/ttf/webp), vendored payload (SYSTEM/lib dll, SYSTEM/bin exe), demo video (TESTSHOW/*.mp4 via Git LFS), text build logs (.d/.timestamp)

- untrack 290+ build artifacts from index
2026-10-04 20:03:06 +08:00
boonxiong2 3786f2580e build: untrack generated .o/.d and allow CC/LD override 2026-10-04 19:49:19 +08:00
Linehu 5f01904be1 feat: white-tone desktop + login crossfade + BUG-031 FAT chain fix + DESK-E texture panics
- BUG-031: fat32_io.h on-demand FAT sector read (FAT beyond 128KB cache walked OOB, font/wallpaper corrupted past first clusters); host unit test diff=0

- material pack: gen_textures.py wired into build.ps1, startMenuLogo.rgba packaged; missing wallpaper/logo/font now fatal (DESK-E02/E03/E04 red fatal screen)

- login->desktop crossfade 16 steps, boot typewriter screen removed

- IDE exit: Esc detaches and returns to desktop page

- white theme: KS_* light palette, g_wf_light taskbar, hardcoded dark fills replaced

- QEMU verified: labels/clock render, wallpaper + start logo loaded, zero spurious panic
2026-10-04 15:53:04 +08:00
Linehu 174af71b39 feat: exhaustive STUB instrumentation - 241 panic sites across VMM/kernel + whitelist alignment
- VMM cluster: XJ3-E/LIN-E/VMM-E/VMX-E/EPT-E/IPC-E/VVB-E (124 sites)

- kernel cluster: TST-E/MM-E/UTRW-E/LAPIC-E/IDT-E/SAS-E/PRB-E/NETST-E/DKM-E (117 sites)

- whitelist fixes: vmm_init env probes E10-E14 fallback, disk_log read-only block path, DSL-E05 non-FAT32 device 0 probe

- QEMU smoke: wizard -> USER.CONF -> login -> desktop ready, zero spurious panic
2026-10-03 21:26:04 +08:00
Linehu 506d1b18c6 feat: SAS-R0 signature-feature attestation - not-ready means very-early panic
- SAS-E01: scheduler bootstrap failure was "non-fatal" -> panic (O(1)
  scheduler must stand up or nothing runs)
- PCKC-E01: boot-time key-derive roundtrip in utsm_init (get_or_derive
  probe segment, all-zero key or error -> panic; probe slot invalidated)
- DKM-E04..E07: manifest required-driver failures (module missing /
  ELF invalid / symbol scan fail / load fail) -> panic instead of
  "abort stage" silent continue
- QEMU verify: pckc derive roundtrip ok, sealed MAC established,
  selftest OK, boot reaches wizard, zero spurious panics

[STUB] P0/UTSM SAS-R0 attestation | 剩余STUB命中=101(违规=0) | “特色不是招牌,是性命” | 已提交=<this>
2026-10-03 15:49:19 +08:00
Linehu dda0cc9dd0 feat: sealed memory early init + verify - UTSM-E01..E04 very-early panic
- NEW core/sealed.c: utsm_sealed_early_init() runs right after utsm_init:
  empty .sealed section -> UTSM-E01 panic; no root key -> UTSM-E02;
  establishes BLAKE2b(root_key) MAC over [__sealed_start,__sealed_end).
- utsm_sealed_verify(): MAC mismatch -> UTSM-E03; verify-before-init ->
  UTSM-E04. Wired into utsm_selftest (U3+ step).
- .sealed region now non-empty by construction: sealed brand record
  "DESHAB-SEALED-MEMORY-V1-DEAICUP" lives in section(".sealed").
- Before this commit nothing ever referenced __sealed_start/__sealed_end:
  the sealed section was never registered, MACed or verified.
- QEMU verify: [SEAL] region=0x20 bytes, MAC established, selftest OK,
  boot reaches wizard, zero spurious panics.

[STUB] P0/UTSM/core/sealed.c | 剩余STUB命中=101(违规=0) | “封缄即落款,空区即自爆” | 已提交=<this>
2026-10-03 15:40:00 +08:00
Linehu 301006d611 feat: re-instrument per STUB rules - all silent placeholders now panic
- PE-E03 pe_loader.c: unsupported base-reloc type silently skipped -> panic
- PE-E04 pe_shim.c ReadFile: fake TRUE+0-bytes ("pretend EOF") -> panic
- PE-E05 pe_shim.c CreateFileA: no file backend -> panic (no honest-failure excuse)
- PE-E06/E07 x86emu32.c: emu IAT unimplemented API / shim index OOB -> panic
- NETST-E01 net.c: netdev stats all-zero placeholder ("lying zero traffic") -> panic
- apic.c comment: SIPI reserved now points to DKM-E03 skeleton
- pe_dll_manager comments: circular-dep stub call now documented as PE-E01
- virtio_blk.c: capacity declaration marked as instrumentation whitelist
- QEMU verify: wizard -> Save -> verify ok -> login success -> desktop ready,
  zero spurious panics

[STUB] P1/UTSM/pe+net re-instrument sweep | 剩余STUB命中=101 (全部为 panic 坐标注释 /
IDT halt-stub 防御术语 / 白名单) | “未成之物,不留活口”
2026-10-03 12:44:57 +08:00
Linehu cd39caa10c docs: CLAUDE.md add STUB instrumentation rules - grep-verified zero-fallback contract 2026-10-03 12:31:03 +08:00
Linehu 583262f5f0 feat: SKEL skeleton instrumentation - designed-but-unimplemented paths panic
- hypercall.c: 5 Phase 1.3 stubs -> HCALL-E01..E05 panic (no NOSYS return)
- drr_stub.c: snapshot alloc fail -> DRR-E01; new skeletons DRR-E02 root key
  seal, DRR-E03 task kill crypto erase, DRR-E04/E05 segment/system rollback,
  DRR-E06/E07 driver recovery ops dispatch
- sched.c: enable fail -> SCH-E02 panic (no silent demo skip)
- dkm/kernel_api.c: D1 hot-unload DKM-E01, D2 bare code loader DKM-E02,
  SIPI AP wake DKM-E03 skeletons
- virtio_net tx/rx stubs -> VNET-E01/E02; ath9k tx stub -> ATH-E01;
  xhci port reset -> XHC-E01; nvme MSI/MSI-X fail -> NVME-E01..E03 (no
  silent polling downgrade); e1000 MAC fallback -> E1K-E01
- pe_shim unimpl API -> PE-E01; PE ordinal import -> PE-E02
- kernel/main.c: lib sync / vscode install fail -> LNX-E01/E02
- NEW brand/brand.c (E1 boot anim BRAND-E01, E2 time egg BRAND-E02) and
  pkg/pkg.c (pacman skeleton PKG-E01..03), wired into UTSM MAKEFILE
- Deliberate design-internal fallbacks kept and documented (VMX skip,
  bzImage skip, KDE fallback, boot-module fallback, apic->PIC route)
2026-10-03 00:30:54 +08:00
Linehu 38ff3cf93c feat: FS-E strict filesystem mode - ext4 rw driver, FAT32 big-disk fix, forced re-login
- CODE/dsk/ext4.c: minimal full ext4 read/write (GPT probe, feature gate,
  extent depth 0/1 rw, block/inode alloc-free, dir insert, write-verify);
  boot selftest PASS on p2. Unsupported features panic (FS-E2x), zero fallback.
- DSK fat32 write: on-demand FAT entry RMW + chunked free-cluster scan
  (fixes "no free clusters" on 5.3G ESP); rec_len shrink offset (+4) and
  chunk alignment fixes. USER.CONF write-verify ok, firstInit flip ok.
- First-boot: wizard -> persist -> forced login (FS-E06 if skipped/failed)
  -> desktop. login.elf loaded via system/user/use fallback.
- FirstInit network page: Connect now panics NET-E01 (no wlan stack);
  Save (config only) is the only path forward.
- FirstInit/DSK fatal: ohMyLogo lotus fatal screen (NET-E01 / FS-E series).
- Boot screen: Logo.png image removed, "DESHAB P01" text centered only;
  dcp/xj logos regenerated from TEXTURES/.
- run_qemu.bat: main GPT image on SATA ide.0 (AHCI provider must see ext4).
2026-10-02 23:49:05 +08:00
Linehu c4a5295a81 feat: UI strict-error mode - ohMyLogo login intro, typewriter removed, fatal instrumentation
- desktop boot screen: typewriter effect removed, whole screen drawn in one pass
- login: ohMyLogo (DEAICUP lotus, 288px embedded) intro screen before password card
- strict error policy instrumentation (zero degradation): login LOGIN-E01..E05 (integrity/badctx/noconf/nouser/nohash) and desktop DSK-E01 now full-screen fatal with symbol + halt instead of silent skip
- root-cause fixed: missing .build_tmp/mkfat32.ps1 silently left SATA sidecar stale (login.elf 'not found' degradation) - replaced with CODE/linux/make_sata_sidecar.sh (auto adaptive FAT32 rebuild each build)
- recreated lost CODE/login/patch_login_hash.ps1 (.text SHA256 -> .hashseg)
- dev config now full flow: show_logo=1, wizard+login enabled, dev shell off
2026-10-02 21:07:05 +08:00
Linehu 3aa15e7b21 feat: D4 DKM colored log prefixes - every driver has its own temper
- log.c: color context (log_set_color / log_color_enable); ANSI only goes to serial, BOOTLOG.TXT buffer stays clean plain text
- kernel_api.c: dkm_log_set_driver() — driver-name FNV-1a hash into an 8-color bright ANSI palette, deterministic per driver
- load sites (dkm_core builtin + boot_modules external) set color around driver_init and clear after
- FUCK [debug] color_log gate (dev=1, release=0)
- QEMU verified: 1150 colored lines, per-driver stable colors (.build_tmp/qemu_serial_d4color.log)
2026-10-02 19:48:54 +08:00
Linehu 068e0e37c3 docs: README 项目特质章 - explain what makes Deshab Deshab
- new traits section: 疯但好使 / 毛坯神殿非赛博保险柜 / 仪式感是功能(@sealed旋钮+莲花崩溃屏) / 诚实比体面重要 / 错也错得有章法
- refresh stale status refs (UTRW slow path + KAT, phase 1-2 done) and build section (cross-platform Makefile)
2026-10-02 19:37:07 +08:00
Linehu ba16217afe feat: U3 @sealed optional segment marking - phase 2 complete
- UTSM_SEG_F_UNSEALED: plaintext direct-store segments (zero crypto overhead) while keeping capability checks, dirty tracking, intent/commit log and seqlock protocol; default remains sealed
- linker.ld: .sealed output section with __sealed_start/__sealed_end symbols for future static sealed data
- selftest: unsealed segment stores plaintext verifiably + read-back, full SELFTEST PASS (.build_tmp/qemu_serial_u3sealed.log)
- phase 2 (UTSM/UTRW) now complete in ROADMAP_INSANE
2026-10-02 15:30:25 +08:00
Linehu 1e74ee9fab feat: U5 land deterministic chacha20 KAT (RFC 8439 2.4.2)
- test/gen_chacha_kat.py emits KAT from RFC 8439 section 2.4.2 mapped to the impl's 64+64 counter/nonce layout; expected bytes cross-checked against pycryptodome (independent impl) and the official vector: 10f1e7e4d13b5915... byte-exact
- verdict: the 'intermittent chacha20 KAT FAIL' referenced in FUCK comments was a phantom — that test was never merged into this tree; the implementation itself matches RFC byte-for-byte
- selftest now runs KAT + page-MAC determinism checks at selftest=2; full SELFTEST PASS in QEMU (.build_tmp/qemu_serial_u5kat.log)
2026-10-02 15:24:15 +08:00
Linehu 7925c09677 feat: U4 ciphertext page dump tool
- utrw/debug.c: utrw_debug_dump_page(slot,page,offset) — kernel debug-privileged dump of 64B ciphertext + decrypted plaintext hex to serial (PCKC key derive, no capability path)
- selftest demo: dump at offset 128 shows plaintext 'deshab utsm sealed memory selftest' vs unrelated ciphertext; SELFTEST PASS (.build_tmp/qemu_serial_u4dump.log)
2026-10-02 14:40:26 +08:00
Linehu 42fc06439c feat: R3b wire drr_emergency_pool_kb / drr_recovery_log_size from FUCK
- drr_apply_config(pool_kb, log_size) before drr_init; pool_limit clamped to compile-time 64KB static pool (min sub-buffer layout enforced, defaults kept on bad values); recovery log size clamped to remaining pool
- verified in QEMU: pool_kb=32 -> pool_limit=0x8000, log_capacity=0x80, boot continues (.build_tmp/qemu_serial_r3b.log)
2026-10-02 14:34:35 +08:00
Linehu b76e8f1556 feat: U2 UTRW slow path real branches
- slow_path.c: KEY_MISS -> PCKC re-derive (retry OK); EPOCH -> refresh cap epoch via out_cap (retry OK); STALE_CAP permanent; MAC_FAILED/POISONED -> PCKC invalidate + DRR fault report; RETRY passthrough
- status.h: add UTSM_ERR_MAC_FAILED (-11); utrw.h: slow path takes cap/rights/offset/len/reason + out_cap
- selftest: EPOCH refresh + KEY_MISS re-derive + POISONED passthrough coverage, full SELFTEST PASS in QEMU (.build_tmp/qemu_serial_u2slowpath.log)
2026-10-02 14:29:28 +08:00
Linehu 1eaf1aedf8 docs: F3 cross-platform build status (Makefile) 2026-10-02 14:22:24 +08:00
Linehu 23c29f7980 feat: F3 cross-platform root Makefile (Linux/macOS make dev|release|realtest)
- mirrors build.ps1: kernels (UTSM/DSK), user apps, tools, 8 DKM .drv drivers (clang -c + ld.lld -r), config injection from build/configs/<variant>, packing via CODE/linux/pack_system_image.sh
- panic logo regeneration hook (ohMyLogo.png newer -> gen_panic_logo.py)
- Windows still primary via build.ps1; Makefile targets POSIX (pack needs sudo + mkfs)
2026-10-02 14:22:00 +08:00
Linehu 6e44fa5df7 feat: DEAICUP lotus panic screen + F2 fbcon abstraction
- panic screen now draws embedded ohMyLogo.png (384px RGBA, gen_panic_logo.py); background color sampled from image corners so screen bg matches logo bg
- F2: include/utsm/fbcon.h unified framebuffer console (pixel/blend/fill/rgba-image/text with FBCON_HAVE_FONT opt-in); panic.c migrated onto it
- build.ps1 regenerates panic_logo_data.inc when ohMyLogo.png changes
2026-10-01 23:50:04 +08:00
Linehu e4307ff0ec feat: F1/F4/F5 phase-1 skeleton + insane-roadmap docs rework
- docs: ROADMAP_INSANE (five-phase plan), TASKBOARD, STATUS single source of truth, PHILOSOPHY; rewrite README/ARCHITECTURE non-goals; archive ROADMAP phase 0-9; drop contradictory dev-plan doc
- F1: unified lotus panic screen (panic_full: fb draw + regs dump + DRR crash archive); IDT exception path and dkm_api_panic routed through it
- F4: leveled boot selftest (FUCK [boot] selftest=0|1|2), IDT/CS fatal checks + DMA probe
- F5: [dsk] skip_firstinit direct-to-desktop; build/configs dev+release templates now injected
2026-10-01 23:29:49 +08:00
Linehu 1074962546 ohhhhhhhhhhh (exclude linux-extra-rootfs.img build artifact) 2026-10-01 23:13:42 +08:00
LinehuandCursor 737a2cb0db fix: let nested-KVM vmlaunch succeed with Virtual NMIs
Self-test and Linux guest were failing VM-instruction error 7. Share a KVM-style control adjust, request PIN_VIRTUAL_NMIS, and stop intercepting guest #PF. Land isolated XNU/Python/KDE scaffolding off the boot path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 10:48:07 +08:00
Linehu cc0fcf26e3 FU 2026-08-29 18:47:54 +08:00
Linehu 880906edc9 docs: 添加 Apache 2.0 许可证 (Apache-2.0) 2026-08-10 13:54:51 +08:00
Linehu 2a50fa58c7 FUCKKKK 2026-08-09 22:20:01 +08:00
xyou 8717ea8f20 docs: 多智能体推进收尾交接文档 + Bug记录/策划文档状态修正
新增 docs/上下文/260805/交接文档-多智能体推进收尾.md:W2-W6 全程成果、W6 丢失项、Bug 状态核对、下一步优先级、环境坑点

Bug记录.txt: BUG-005/006/007 状态 OPEN->FIXED(代码已修于 a26866e,文档过时未同步)

系统开发策划.md: M2 进度更新(vector allocator/LAPIC EOI 标完成,MSI-X 标 NVMe完成/virtio_net待做,B7 阻塞点更新)
2026-08-05 14:08:11 +08:00