I am an embedded systems developer and as a little tryout of LLM-assisted development I have started my own OS.
Because I was familiar with the FreeRTOS SMP Kernel, I've created a port for the x86_64 platform.
I have only used LwIP, ELMs FATFS and FreeRTOS as 3rd party components. All other components are written from scratch.
There is virtio-net, rtl8169, e1000, etc. support, vfat and exfat drivers, Intel GPU 2D, Framebuffer, Audio (AC97), We have full /dev and /proc filesystems, termio and other POSIX APIs which should help to get some open software compiled for it.
I wanted to publish screenshots, but they are too big.
The crazy thing about it is: I was steering it a lot, but the whole OS was done in 2 days.
Here is a bootlog:
Code: Select all
[ 0.000000] === SpaceOS booting ===
[ 0.000000] [gdt] installing runtime GDT (kernel/user CS+DS, TSS)...
[ 0.000000] [tss] installing TSS + IST1/2/3 (#DF / NMI / #MC)...
[ 0.000000] [idt] installing 256 vectors (IST-routed for #DF/NMI/#MC)...
[ 0.000000] [gdt+tss+idt] done.
[ 0.000000] [mb2] info struct @ phys 0x0106a8f0
[ 0.000000] [boot] bootloader=GRUB 2.06-13+deb12u1
[ 0.000000] [boot] cmdline="console=ttyS0 quiet ramdisk=8M net=dhcp root=sda rootfstype=fatfs rootmnt=/sd"
[ 0.000000] [boot] kernel load base = 0x0000000000100000
[ 0.000000] [boot] basic mem: lower=639 KiB upper=1047384 KiB
[ 0.000000] [boot] memory map (8 entries):
[ 0.000000] [00] 0x0000000000000000 +0x000000000009fc00 available
[ 0.000000] [01] 0x000000000009fc00 +0x0000000000000400 reserved
[ 0.000000] [02] 0x00000000000f0000 +0x0000000000010000 reserved
[ 0.000000] [03] 0x0000000000100000 +0x000000003fed6000 available
[ 0.000000] [04] 0x000000003ffd6000 +0x000000000002a000 reserved
[ 0.000000] [05] 0x00000000b0000000 +0x0000000010000000 reserved
[ 0.000000] [06] 0x00000000fed1c000 +0x0000000000004000 reserved
[ 0.000000] [07] 0x00000000fffc0000 +0x0000000000040000 reserved
[ 0.000000] [boot] total available RAM: 1023 MiB
[ 0.000000] [boot] framebuffer: 1024x768 32 bpp pitch=4096 @ 0x00000000fd000000 (type=1)
[ 0.000000] [boot] ACPI 1.0 RSDP @ 0x000000000106b270
[ 0.000000] [cpu] vendor=GenuineIntel family=0x6 model=0x3c stepping=1
[ 0.000000] [cpu] brand: Intel Core Processor (Haswell, no TSX, IBRS)
[ 0.000000] [cpu] under hypervisor: TCGTCGTCGTCG
[ 0.000000] [cpu] addr bits: phys=40 virt=48
[ 0.000000] [cpu] simd: SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2
[ 0.000000] [cpu] sec/perf: NX SMEP RDRAND x2APIC RDTSCP XSAVE CMPXCHG16B FSGSBASE
[ 0.000000] [pmm] initialising physical-frame allocator...
[ 0.000000] [pmm] bitmap: 131072 bytes @ phys 0x000000000106c000 covering 1048576 frames
[ 0.000000] [pmm] frames: 262005 total, 258372 free, 3633 used (1009 MiB free)
[ 0.000000] [pmm] alloc test: a=0x0000000000e70000 b=0x0000000000e71000
[ 0.000000] [pmm] freed a, realloc'd: c=0x0000000000e70000 (==a? yes)
[ 0.000000] [vmm] building runtime page tables (W^X, direct-map, PAT)...
[ 0.000000] [vmm] PML4 @ phys 0x0000000000e70000, CR3=0x0000000000e70000
[ 0.000000] [vmm] kernel: text [0xffffffff80105000..0xffffffff80164000) RX
[ 0.000000] [vmm] rodata [0xffffffff80164000..0xffffffff80175000) R
[ 0.000000] [vmm] data+bss [0xffffffff80175000..0xffffffff80e6f1c0) RW NX
[ 0.000000] [vmm] direct map base = 0xffff800000000000 (covers all RAM in mmap)
[ 0.000000] [vmm] kmap (MMIO): next=0xffffe00000000000 end=0xffffe10000000000
[ 0.000000] [pmm] bitmap: 131072 bytes @ phys 0x000000000106c000 covering 1048576 frames
[ 0.000000] [pmm] frames: 262005 total, 258360 free, 3645 used (1009 MiB free)
[ 0.000000] [vmm] direct-map RW smoke ok @ phys 0x0000000000e7c000
[ 0.000000] [kheap] initialising slab allocator...
[ 0.000000] [kheap] smoke alloc: 16=0xffff800000e7c020 256=0xffff800000e7d100 2k=0xffff800000e7e800 8k=0xffff800000e7f020
[ 0.000000] [kheap] live=4 alloc_bytes=14608 free_bytes=0
[ 0.000000] [kheap] class 16: 1 slab(s), 253 free obj(s)
[ 0.000000] [kheap] class 256: 1 slab(s), 14 free obj(s)
[ 0.000000] [kheap] class 2048: 1 slab(s), 0 free obj(s)
[ 0.000000] [kheap] live=0 alloc_bytes=14608 free_bytes=14608
[ 0.000000] [kheap] class 16: 1 slab(s), 254 free obj(s)
[ 0.000000] [kheap] class 256: 1 slab(s), 15 free obj(s)
[ 0.000000] [kheap] class 2048: 1 slab(s), 1 free obj(s)
[ 0.000000] [kheap] dma_alloc_coherent WB: va=0xffff800000e7f000 pa=0x0000000000e7f000
[ 0.000000] [mm] kernel_mm initialised (user VMA window 0x0000000100000000..0x0000700000000000)
[ 0.000000] [krandom] seeded (RDRAND)
[ 0.000000] [fpu] enabling SSE/AVX + sizing XSAVE area...
[ 0.000000] [fpu] XSAVE enabled, XCR0=0x0000000000000007, save area=832 bytes
[ 0.000000] [fpu] state: x87 SSE AVX
[ 0.000000] [acpi] parsing tables...
[ 0.000000] [acpi] LAPIC base = 0x00000000fee00000, 8259-compatible=1
[ 0.000000] [acpi] 4 CPU APIC entries (4 present):
[ 0.000000] cpu acpi_id=0 apic_id=0 enabled
[ 0.000000] cpu acpi_id=1 apic_id=1 enabled
[ 0.000000] cpu acpi_id=2 apic_id=2 enabled
[ 0.000000] cpu acpi_id=3 apic_id=3 enabled
[ 0.000000] [acpi] 1 I/O APIC(s):
[ 0.000000] id=0 base=0x00000000fec00000 gsi_base=0
[ 0.000000] [acpi] 5 IRQ source override(s):
[ 0.000000] ISA IRQ 0 -> GSI 2, active-high, edge
[ 0.000000] ISA IRQ 5 -> GSI 5, active-high, level
[ 0.000000] ISA IRQ 9 -> GSI 9, active-high, level
[ 0.000000] ISA IRQ 10 -> GSI 10, active-high, level
[ 0.000000] ISA IRQ 11 -> GSI 11, active-high, level
[ 0.000000] [acpi] 1 PCIe ECAM segment(s):
[ 0.000000] seg 0: base=0x00000000b0000000 buses 0..255
[ 0.000000] [acpi] HPET id=0 base=0x00000000fed00000 min_tick=0
[ 0.000000] [apic] masking 8259 PIC + bringing up LAPIC + I/O APIC...
[ 0.000000] [8259] remapped to 0x20..0x2f and fully masked
[ 0.000000] [lapic] BSP id=0, MMIO @ 0xffffe00000000000 (phys 0x00000000fee00000), enabled, TPR=0, SVR=0x1ff, LVT timer masked, ESR cleared
[ 0.000000] [ioapic] id=0 @ 0xffffe00000001000 (phys 0x00000000fec00000) gsi=0..23 (24 entries) all masked
[ 0.000000] [irq] alloc vector 0x30 for uart-com1
[ 0.000000] [serial] COM1 now IRQ-driven (vector wired via I/O APIC)
[ 0.000000] [fb] display0: 1024x768@32bpp pitch=4096 VA=0xffffe00000002000 phys=0x00000000fd000000 (WC)
[ 0.000000] [fbcon] title + status bar wired to display0 (1024x768)
[ 0.000000] [per_cpu] BSP installed: cpu_id=0 apic_id=0 GS_BASE=0xffffffff805b6a40
[ 0.000000] [syscall] LSTAR=0xffffffff8010708c STAR=0x0010000800000000 FMASK=0x44700 (SCE on)
[ 0.000029] [hpet] enabled @ phys 0x00000000fed00000; period=10000000 fs (~100 MHz)
[ 0.044983] [smp] MADT: 4 enabled CPU(s); SPACEOS_CORES cap = 4
[ 0.093444] [smp] starting APIC 1 as logical cpu 1 (stack top 0xffff800000e87020)
[ 0.146734] [smp] -> INIT
[ 0.169954] [smp] -> wait 10ms
[ 0.207000] [smp] -> SIPI #1 vec=0x08
[ 0.241854] [smp] -> SIPI #2
[ 0.241939] [syscall] LSTAR=0xffffffff8010708c STAR=0x0010000800000000 FMASK=0x44700 (SCE on)
[ 0.269135] [smp] -> polling booted_flag
[ 0.318090] [smp] AP 1 online: apic_id=1 (this_cpu()->cpu_id=1)
[ 0.405738] [smp] starting APIC 2 as logical cpu 2 (stack top 0xffff800000e8c020)
[ 0.461967] [smp] -> INIT
[ 0.486156] [smp] -> wait 10ms
[ 0.524722] [smp] -> SIPI #1 vec=0x08
[ 0.562393] [syscall] LSTAR=0xffffffff8010708c STAR=0x0010000800000000 FMASK=0x44700 (SCE on)
[ 0.562552] [smp] -> SIPI #2
[ 0.617322] [smp] AP 2 online: apic_id=2 (this_cpu()->cpu_id=2)
[ 0.647888] [smp] -> polling booted_flag
[ 0.749432] [smp] starting APIC 3 as logical cpu 3 (stack top 0xffff800000e91020)
[ 0.812611] [smp] -> INIT
[ 0.839716] [smp] -> wait 10ms
[ 0.881557] [smp] -> SIPI #1 vec=0x08
[ 0.922364] [syscall] LSTAR=0xffffffff8010708c STAR=0x0010000800000000 FMASK=0x44700 (SCE on)
[ 0.922517] [smp] -> SIPI #2
[ 0.979861] [smp] AP 3 online: apic_id=3 (this_cpu()->cpu_id=3)
[ 1.012548] [smp] -> polling booted_flag
[ 1.120447] [smp] bringup complete: 4 CPU(s) online
[ 1.169518] === Foundation complete. Starting FreeRTOS scheduler. ===
[ 1.231074] [pktpool] 4096 entries x 2336 bytes = 9 MiB at va=0xffff80000108c000 pa=0x108c000
[ 1.309664] [pci] enumerating PCIe...
[ 1.374254] [pci] segment 0: ECAM phys 0x00000000b0000000 -> kmap 0xffffe00000304000 (buses 0..255, 256 MiB window)
[ 1.377334] [netdev] eth0 registered: MAC=52:54:00:00:00:01 MTU=1500 features=0x00000002
[ 1.377643] [irq] alloc vector 0x31 for e1000
[ 1.377798] [pci-msi] e1000 -> vector 0x31 (addr64=1) on dev pci 0000:00:04.0
[ 1.378227] [e1000] eth0: initial link UP (status=0x00080283, 1000 Mb/s)
[ 1.378348] [e1000] pci 0000:00:04.0: bound, MAC=52:54:00:00:00:01 MMIO=0xffffe00010304000 vector=0x31 RX/TX rings=512 netdev=eth0
[ 1.378429] [dev] bound pci 0000:00:04.0 -> e1000
[ 1.379059] [virtio-net] pci 0000:00:05.0: caps mapped (common=0xffffe0001032d000 notify=0xffffe00010327000 mul=4 isr=0xffffe0001032c000 dev_cfg=0xffffe0001032a000)
[ 1.379351] [virtio-net] pci 0000:00:05.0: MAC=52:54:00:00:00:03 features=0x100010020 (offered 0x10130ff8024)
[ 1.379546] [irq] alloc vector 0x32 for vnet-rx
[ 1.379613] [pci-msix] pci 0000:00:05.0 slot 0 -> vector 0x32 (vnet-rx)
[ 1.379656] [irq] alloc vector 0x33 for vnet-tx
[ 1.379714] [pci-msix] pci 0000:00:05.0 slot 1 -> vector 0x33 (vnet-tx)
[ 1.379810] [pci-msix] pci 0000:00:05.0: 2/10 vectors enabled (BAR1 tbl_off=0x0)
[ 1.380493] [netdev] eth1 registered: MAC=52:54:00:00:00:03 MTU=1500 features=0x00000000
[ 1.381078] [virtio-net] pci 0000:00:05.0: bound, MSI-X rx=0x32 tx=0x33 netdev=eth1 queues: rx=256 tx=256
[ 1.381137] [dev] bound pci 0000:00:05.0 -> virtio-net
[ 1.381355] [dev] 12 device(s) registered:
[ 1.381417] pci 0000:00:1f.3 [8086:2930] class=0c.05.00 (serial-bus) (unbound)
[ 1.381481] pci 0000:00:1f.2 [8086:2922] class=01.06.01 (storage) (unbound)
[ 1.381523] pci 0000:00:1f.0 [8086:2918] class=06.01.00 (bridge) (unbound)
[ 1.381583] pci 0000:00:08.0 [1af4:1005] class=00.ff.00 (unclassified) (unbound)
[ 1.381642] pci 0000:00:07.0 [8086:2668] class=04.03.00 (multimedia) (unbound)
[ 1.381688] pci 0000:00:06.0 [1b36:000d] class=0c.03.30 (serial-bus) (unbound)
[ 1.381745] pci 0000:00:05.0 [1af4:1000] class=02.00.00 (network) -> virtio-net
[ 1.381780] pci 0000:00:04.0 [8086:10d3] class=02.00.00 (network) -> e1000
[ 1.381858] pci 0000:00:03.0 [1b36:0010] class=01.08.02 (storage) (unbound)
[ 1.381907] pci 0000:00:02.0 [8086:2922] class=01.06.01 (storage) (unbound)
[ 1.381987] pci 0000:00:01.0 [1234:1111] class=03.00.00 (display) (unbound)
[ 1.382032] pci 0000:00:00.0 [8086:29c0] class=06.00.00 (bridge) (unbound)
[ 1.382735] [init] starting scheduler...
[ 1.383302] [port] IDT vectors installed: yield 0xFD -> 0xffffffff80107155, tick 0xF0 -> 0xffffffff8010725d, yield-IPI 0xFB -> 0xffffffff801071c0
[ 1.383438] [port] probe int 0xFC: tick_count 0 -> 1 (handler RAN)
[ 1.393517] [lapic] timer: bus ~1005 MHz, divide-16 -> 62868700 Hz, tick @ 1000 Hz (reload=62868)
[ 1.393521] [lapic] timer: bus ~1005 MHz, divide-16 -> 62825000 Hz, tick @ 1000 Hz (reload=62825)
[ 1.393522] [lapic] timer: bus ~1008 MHz, divide-16 -> 63031200 Hz, tick @ 1000 Hz (reload=63031)
[ 1.393561] [lapic] timer: bus ~1004 MHz, divide-16 -> 62750000 Hz, tick @ 1000 Hz (reload=62750)
[ 1.393716] [lapic] post-arm LVT=0x000200f0 CUR(t=0)=55868 CUR(t=100us)=47493 [decrementing]
[ 1.393722] [lapic] post-arm LVT=0x000200f0 CUR(t=0)=58781 CUR(t=100us)=50344 [decrementing]
[ 1.393742] [port] AP 2 entering SMP scheduler (idle TCB=0xffffffff8017a190)
[ 1.393749] [port] AP 1 entering SMP scheduler (idle TCB=0xffffffff8017a0a0)
[ 1.393724] [lapic] post-arm LVT=0x000200f0 CUR(t=0)=58200 CUR(t=100us)=49575 [decrementing]
[ 1.393762] [lapic] post-arm LVT=0x000200f0 CUR(t=0)=56500 CUR(t=100us)=50188 [decrementing]
[ 1.393782] [port] AP 3 entering SMP scheduler (idle TCB=0xffffffff8017a280)
[ 1.394040] [heartbeat] #0 uptime=0.001 s
[ 1.394715] [ahci] pci 0000:00:1f.2: VS=0x00010000 CAP=0xc0141f05 CAP2=0x00000000 NCS=32 S64A=1
[ 1.395098] [ahci] pci 0000:00:1f.2: ports implemented = 0x0000003f
[ 1.395138] [irq] alloc vector 0x34 for ahci
[ 1.395311] [pci-msi] ahci -> vector 0x34 (addr64=1) on dev pci 0000:00:1f.2
[ 1.781862] [ahci] port 2: non-SATA signature 0xeb140101 — skipping
[ 1.978088] [ahci] pci 0000:00:1f.2: bound, 0 port(s) with disks, vector=0x34
[ 1.978147] [dev] bound pci 0000:00:1f.2 -> ahci
[ 1.978299] [ahci] pci 0000:00:02.0: VS=0x00010000 CAP=0xc0141f05 CAP2=0x00000000 NCS=32 S64A=1
[ 1.978347] [ahci] pci 0000:00:02.0: ports implemented = 0x0000003f
[ 1.978376] [irq] alloc vector 0x35 for ahci
[ 1.978406] [pci-msi] ahci -> vector 0x35 (addr64=1) on dev pci 0000:00:02.0
[ 2.235911] [blkdev] sda registered: 131072 sectors x 512 B = 64 MiB model='QEMU HARDDISK'
[ 2.235950] [ahci] port 0: SATA disk, 131072 sectors x 512 B = 64 MiB, model='QEMU HARDDISK'
[ 2.236385] [blkdev] sda1 registered: 131009 sectors x 512 B = 63 MiB model='QEMU HARDDISK pt1'
[ 2.236417] [part] sda1 = sda+63 (type=0x06, 131009 sectors)
[ 2.549994] [ahci] pci 0000:00:02.0: bound, 1 port(s) with disks, vector=0x35
[ 2.550037] [dev] bound pci 0000:00:02.0 -> ahci
[ 2.550283] [nvme] pci 0000:00:03.0: VS=1.4.0 CAP=0x004008200f0107ff DSTRD=0 MQES=2047 TO=7500ms
[ 2.550730] [dev] pci 0000:00:03.0: INTx pin A -> GSI 11 (PCI_INTERRUPT_LINE=0x0b, swizzle would say 19)
[ 2.550763] [irq] alloc vector 0x36 for nvme
[ 2.550814] [dev] pci 0000:00:03.0: bound to vector 0x36 via INTx pin A -> GSI 11
[ 2.552943] [blkdev] nvme0n1 registered: 131072 sectors x 512 B = 64 MiB model='QEMU NVMe Ctrl'
[ 2.552990] [nvme] pci 0000:00:03.0: bound nvme0n1 — 'QEMU NVMe Ctrl' SN='spaceos-nvme0' FW='10.2.2' 131072 sectors x 512 B = 64 MiB, vec=0x36
[ 2.553289] [dev] bound pci 0000:00:03.0 -> nvme
[ 2.553660] [fbdev] /dev/fb0 -> display0 (1024x768@32bpp)
[ 2.554094] [rtc] 2026-04-28 14:17:59 (CMOS)
[ 2.554244] [initd] starting target=default (12 service(s) registered)
[ 2.554323] [initd] starting watchdog...
[ 2.554950] [watchdog] 4 per-CPU ticker(s) + monitor up
[ 2.554995] [initd] start watchdog -> running
[ 2.555025] [initd] starting tty...
[ 2.555197] [tty] /dev/tty0 registered
[ 2.555256] [tty] /dev/ttyS0 registered
[ 2.555281] [tty] /dev/tty0 (fbcon+UART) + /dev/ttyS0 (UART) wired; tty0 = default
[ 2.555307] [initd] start tty -> done (one-shot)
[ 2.555329] [initd] starting ramdisk...
[ 2.583038] [blkdev] ram0 registered: 16384 sectors x 512 B = 8 MiB model='SpaceOS RAM disk'
[ 2.583078] [initd] start ramdisk -> done (one-shot)
[ 2.583132] [initd] starting devfs...
[ 2.583445] [vfs] mounted /dev on ram0 (fs=devfs, slot=0)
[ 2.583476] [initd] start devfs -> done (one-shot)
[ 2.583485] [initd] starting procfs...
[ 2.583528] [vfs] mounted /proc on ram0 (fs=procfs, slot=1)
[ 2.583543] [initd] start p
rocfs -> done (one-shot)
[ 2.583552] [initd] starting rootfs...
[ 2.586673] [vfs] mounted /sd on sda (fs=fatfs, slot=2)
[ 2.586709] [rootfs] mount=== posixtest start ===ed sda on /sd (fs=fatfs)
[ 2.586738] [initd] start rootfs -> done (one-shot)
[ 2.586847] [initd] starting etc-init...
[ 2.588708] [etc] /sd/etc up-to-date
[
2.589658] [etc] hostname="spaceos"
[ 2.589675] [initd] start etc-init -> done (one-shot)
[ 2.589685] [initd] starting lwip...
[ 2.590702] [lwip] tcpip[posixtest] threads + mutex + join_thread up; attaching netifs
[ 2.590895] [lwip] boot policy: net=dhcp (DHCP on every netif)
[ 2.592721] [lwip] eth1: mdns hostname spaceos.local + _http._tcp on :80
[ 2.592748] [lwip]
eth1: 0.0.0.0 — waiting for DHCP
[ 2.593465] [lwip] eth1: DHCP started
[ 2.593676] [lwip] eth0: mdns hostname spaceos-1.local + _http._tcp on :80
If anyone is interested, I can publish it.