Skip to content

Commit e61c769

Browse files
seedpi867-cmdclaude
andcommitted
Cycle 38 — FAT32+GGUF probe kernel: SD init, MBR read, FAT32 walk, GGUF magic check
QEMU PASS: ALIVE WDOG_STOP SD_START CMD0_OK then ERR_CMD8_TIMEOUT (expected, no SDHOST emulation). On-metal: prints full SD init sequence + FAT32 directory walk + GGUF magic verify. Requires model.gguf copied to /boot/firmware/ before tryboot. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e524201 commit e61c769

5 files changed

Lines changed: 1433 additions & 35 deletions

File tree

seed-os/11-fat32/Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
CROSS ?= aarch64-linux-gnu-
2+
AS := $(CROSS)as
3+
LD := $(CROSS)ld
4+
OBJCOPY := $(CROSS)objcopy
5+
OBJDUMP := $(CROSS)objdump
6+
7+
.PHONY: all clean dump run
8+
9+
all: fat32_kernel.img
10+
11+
fat32_kernel.o: fat32_kernel.S
12+
$(AS) -o $@ $<
13+
14+
fat32_kernel.elf: fat32_kernel.o linker.ld
15+
$(LD) -T linker.ld -o $@ fat32_kernel.o
16+
17+
fat32_kernel.img: fat32_kernel.elf
18+
$(OBJCOPY) -O binary $< $@
19+
20+
dump: fat32_kernel.elf
21+
$(OBJDUMP) -d $<
22+
23+
# QEMU: SDHOST not emulated; expect ALIVE+WDOG_STOP+SD_START then ERR_ACMD41_TIMEOUT.
24+
run: fat32_kernel.img
25+
@timeout --preserve-status 10 qemu-system-aarch64 -M raspi3ap \
26+
-kernel fat32_kernel.img -nographic -serial mon:stdio -monitor none \
27+
-no-reboot -d guest_errors,unimp -D qemu_fat32.log \
28+
> qemu_fat32.out 2>&1; \
29+
rc=$$?; \
30+
echo "--- stdout ---"; cat qemu_fat32.out; \
31+
echo "--- guest_errors ---"; \
32+
[ -s qemu_fat32.log ] && cat qemu_fat32.log || echo "(empty)"; \
33+
echo "exit: $$rc"
34+
35+
clean:
36+
rm -f *.o *.elf *.img qemu_fat32.log qemu_fat32.out

0 commit comments

Comments
 (0)