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).
This commit is contained in:
Linehu
2026-10-02 23:49:05 +08:00
parent c4a5295a81
commit 38ff3cf93c
28 changed files with 2816 additions and 1458 deletions
+34
View File
@@ -1,6 +1,8 @@
#include <utsm/utsm.h>
#include <utsm/pckc.h>
#include <utsm/crypto.h>
#include <utsm/dma.h>
#include <utsm/dkm.h>
#include <utsm/log.h>
#include <utsm/segment.h>
#include <utsm/arena.h>
@@ -190,6 +192,38 @@ int utsm_selftest_run(void) {
log_info("[UTSM] selftest unsealed segment ok (plain storage)");
}
/* ==== D3: 按名导出表(kapi)——按名取服务并调用 ==== */
{
const dkm_kernel_api *api = dkm_get_kernel_api();
if (!api->kapi || api->kapi->magic != DKM_KAPI_MAGIC) {
log_error("[UTSM] selftest kapi table missing");
return UTSM_ERR_INVALID;
}
void *fn = 0;
if (api->kapi->lookup("log.info", &fn) != 0) {
log_error("[UTSM] selftest kapi lookup log.info failed");
return UTSM_ERR_INVALID;
}
void (*klog)(const char *) = (void (*)(const char *))fn;
klog("[UTSM] selftest kapi: log.info via export table");
if (api->kapi->lookup("dma.alloc_pages", &fn) != 0) {
log_error("[UTSM] selftest kapi lookup dma failed");
return UTSM_ERR_INVALID;
}
int (*kalloc)(u64, u64, u64, dkm_dma_buffer *) = (int (*)(u64, u64, u64, dkm_dma_buffer *))fn;
dkm_dma_buffer kbuf;
if (kalloc(1, 4096, 0xFFFFFFFFULL, &kbuf) != 0 || !kbuf.virt) {
log_error("[UTSM] selftest kapi dma alloc failed");
return UTSM_ERR_INVALID;
}
if (api->kapi->lookup("no.such.service", &fn) == 0) {
log_error("[UTSM] selftest kapi negative lookup failed");
return UTSM_ERR_INVALID;
}
log_hex64("[UTSM] selftest kapi entries=", api->kapi->count);
log_info("[UTSM] selftest kapi ok");
}
/* ==== SCHED-1: O(1) runqueue 语义(合成 TCB,协作式,无 tick) ==== */
/* ==== SCHED-1 + SCHED-2: runqueue / block-wake(tick 竞态保护) ==== */
{
+9 -3
View File
@@ -4,9 +4,10 @@ test/utsm_selftest.o: test\utsm_selftest.c include\utsm\utsm.h \
include\utsm\segment.h include\utsm\dirty.h include\utsm\utrw.h \
include\utsm\vmm.h include\utsm\linux_loader.h include\utsm\ipc_shm.h \
..\utsm-ipc\ipc_proto.h include\utsm\hypercall.h include\utsm\pckc.h \
include\utsm\crypto.h include\utsm\log.h include\utsm\arena.h \
include\utsm\drr.h include\utsm\sched_ext.h include\utsm\sched.h \
test\chacha_kat.inc
include\utsm\crypto.h include\utsm\dma.h include\utsm\dkm.h \
include\utsm\block.h include\utsm\net.h include\utsm\paging.h \
include\utsm\log.h include\utsm\arena.h include\utsm\drr.h \
include\utsm\sched_ext.h include\utsm\sched.h test\chacha_kat.inc
include\utsm\utsm.h:
include\utsm\types.h:
include\utsm\status.h:
@@ -24,6 +25,11 @@ include\utsm\ipc_shm.h:
include\utsm\hypercall.h:
include\utsm\pckc.h:
include\utsm\crypto.h:
include\utsm\dma.h:
include\utsm\dkm.h:
include\utsm\block.h:
include\utsm\net.h:
include\utsm\paging.h:
include\utsm\log.h:
include\utsm\arena.h:
include\utsm\drr.h:
Binary file not shown.