Skip to content

⬆️ Port Aura to Cosmos gen3 - #280

Merged
valentinbreiz merged 4 commits into
masterfrom
feature/gen3
Oct 2, 2026
Merged

valentinbreiz merged 4 commits into
masterfrom
feature/gen3

Conversation

@valentinbreiz

Copy link
Copy Markdown
Member

Summary

A fresh port of Aura from Cosmos gen2 (IL2CPU) to Cosmos gen3 (NativeAOT). It starts from master and targets the current Cosmos main. It supersedes #279, which targeted the older 3.0.77 API.

  • One Cosmos.Sdk project (SRC/Aura_OS) booted by Limine; Aura_Boot and Aura_Plugs are removed
  • The Cosmos version is pinned once, in global.json; Directory.Build.props derives the package versions from it
  • UI resources (fonts, icons, theme) are embedded in the kernel, since the gen3 ISO carries only the ELF
  • FAT volumes mount at /0, /1, … with Unix paths
  • FTP uses Cosmos.Network.Ftp and runs on a background thread, so the terminal stays usable
  • Lua uses Cosmos.Executable.Lua instead of the bundled UniLua
  • GEN3-GAPS.md lists the gen3 gaps found during the port, as material for upstream issues
  • CI builds the ISO on demand (workflow_dispatch) against a pinned Cosmos commit

Building

The Cosmos packages Aura needs are not on nuget.org yet (3.0.89 lacks the TCP and exception-handling fixes), so the build uses a local feed:

  1. Clone CosmosOS/Cosmos next to this repo (../Cosmos) and run make setup.
  2. Set Cosmos.Sdk in global.json to the date-stamped version it produced.
  3. cd SRC/Aura_OS && dotnet build → bin/Debug/net10.0/linux-x64/cosmos/Aura_OS.iso. Build from SRC/Aura_OS: the ISO path is relative to the working directory.

Once Cosmos 3.0.90+ is on nuget.org, only global.json and NuGet.Config need to change.

Known issues

  • FTP needs a Cosmos GC fix that is not upstream yet. Without it, the first garbage collection while the FTP thread sleeps corrupts its wait monitor (#GP). See gc-conservative in GEN3-GAPS.md.
  • While FTP runs, the UI gets less CPU time, because the UI loop is the scheduler's idle thread (idle-thread).
  • The update check and the package manager fail gracefully: the backend redirects to HTTPS and gen3 has no TLS.
  • beep is removed: gen3 has no PC speaker.
  • The PS/2 drivers never resynchronise, which matters on real hardware (ps2-sync). A fix is ready but not upstream yet.

Test plan

Booted the ISO headless in QEMU (q35, e1000e, AHCI FAT disk):

  • Desktop, Start menu, Terminal, Settings, SystemInfo, MemoryInfo, Cube, GameBoy (Tetris)
  • systeminfo, lspci, DHCP, ipconfig, ping, dns, HTTP, wget (300 KB download, MD5 verified)
  • FAT auto-mount, vol, mkdir/cd/cat/cp/rm/tree, echo redirection
  • Lua scripts, including the cosmos.crypto library
  • setup install → ACPI reboot → login screen → desktop
  • FTP: 65/65 transfers, on a kernel with the GC fix
  • The committed tree builds from a clean checkout (0 errors) and boots to the desktop
  • Run the CI workflow

Move Aura from Cosmos gen2 (IL2CPU) to the gen3 NativeAOT kernel API.

- Single Cosmos.Sdk project booted by Limine; Aura_Boot and Aura_Plugs are gone
- Cosmos version pinned once in global.json, local package feed in NuGet.Config
- UI resources embedded in the kernel instead of copied to the ISO
- FAT volumes mounted at /0, /1... with Unix paths
- FTP server from Cosmos.Network.Ftp, served on a background thread
- Lua from Cosmos.Executable.Lua instead of the bundled UniLua
- No-op GC.WaitForPendingFinalizers plug for the missing runtime export
Manual-only job: builds the Cosmos package feed from a pinned CosmosOS/Cosmos commit, then the Aura ISO.
@valentinbreiz
valentinbreiz merged commit afaf365 into master Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant