SchOS/tools
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz d7352c0db0 storage: AHCI, GPT/MBR partitions, and a disk a PC can boot
q35 stopped with "no root filesystem" because its disk is SATA, like
every PC since 2008, and SchOS only had IDE. And SchFS could only sit
on a whole raw device, so nothing could boot from a disk that also
carried an ESP.

- include/blkdev.h, kernel/dev/blkdev.c: a registry of block devices
  found at probe time, numbered from 4. A disk's GPT (or MBR) is read
  when it registers, and each partition becomes a device whose block 0
  is the partition's first sector. SchFS needs no format change to live
  in a partition; a Linux SchFS driver will see the same bytes on
  /dev/sdX2. SchFS has its own GPT type:
  47138FA9-B79C-47A6-9F7D-AC1F7F572D5E.
- AHCI driver, written from the AHCI 1.3.1 spec: BIOS handoff,
  COMRESET when the link is down, IDENTIFY, 48-bit DMA read/write,
  FLUSH. Completion is polled, so the root disk does not depend on
  interrupt routing.
- USB sticks also register as usb0, so their partitions are found.
- The root probe tries registered devices between USB and IDE,
  SchFS-typed partitions first.
- make disk / tools/posix/mkdisk.sh: a GPT image with a 64 MB ESP and
  a SchFS partition, ready to dd to a stick or a disk.

Tested in QEMU q35: the old two-disk setup roots on sata1; disk.img as
the only SATA disk roots on sata0p2; disk.img as a USB stick (firmware
boots from it) roots on usb0p2. Writes survive sync in each case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HH7xukt4aaiGj1nQEAoQf1
2026-10-22 10:57:41 +02:00
..
posix storage: AHCI, GPT/MBR partitions, and a disk a PC can boot 2026-10-22 10:57:41 +02:00
python licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
windows net: a network *class*, so the stack stops knowing what an e1000 is 2026-08-15 16:42:34 +02:00
kmemtest.c kmem: a slab allocator, and what the fixed tables actually cost 2026-09-22 09:32:06 +02:00
ksyms.pl licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
mkfs.c Fix two bugs the Fedora move exposed 2026-08-09 19:29:21 +02:00
mkschfs.c licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
pr.pl Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
qrtest.c Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
schfs_fsck.c licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
schfs_objtest.c schfs: the allocation map can be given back, so unmount stops leaking it 2026-09-12 17:49:57 +02:00
schfs_test.c schfs: the commit barrier, reflink, and attributes with an index over them 2026-08-15 16:02:02 +02:00
ttftest.c font: the console draws outlines now, and a byte could not have held Ą 2026-09-20 00:35:34 +02:00
vectors.pl Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00