Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
62cb11e
Flesh out Cortex PID-0 syscalls and stabilize embedder vsync (#1)
squirelboy360 May 29, 2026
c1f6e58
Fix P9 cave diagnostics in engine_patch (#2)
squirelboy360 May 29, 2026
c6ff8e9
Fix P9 cave, libm syscalls, vfs_stat, and README (#3)
SudoGhostUser May 30, 2026
f61fc06
Fix p9 cave (#4)
sqrldev-404 Jun 5, 2026
c755879
Fix shell render crash: register UI task queue via merged task runner
squirelboy360 Jun 5, 2026
fc7b7e4
fix(engine_patch): write PostLoad bypasses at file offsets, not vaddrs
squirelboy360 Jun 6, 2026
9da2d16
feat(engine_patch): clamp anomalous GetInstructionsAt offset
squirelboy360 Jun 6, 2026
e687c44
feat: switch OSCortex from AOT to JIT mode (the correct configuration)
squirelboy360 Jun 6, 2026
e93b312
fix(mm): don't unmap library regions on madvise(MADV_DONTNEED)
squirelboy360 Jun 6, 2026
e788fe6
fix(mm,pthread): madvise only unmaps demand-pageable anon; derive clo…
squirelboy360 Jun 6, 2026
9d64ea3
fix(process): thread teardown must not unmap shared/main-stack regions
squirelboy360 Jun 6, 2026
ad83009
fix(pthread): pthread_join must return 0, not the joined thread's exi…
squirelboy360 Jun 6, 2026
9ffa63b
feat(embedder): render! use engine-default task runners + internal vsync
squirelboy360 Jun 6, 2026
4429b9e
chore: working state — OSCortex renders Flutter UI on bare metal
squirelboy360 Jun 6, 2026
a71b565
fix(sched,sync): fair round-robin (no hardcoded pids), cond-yield, On…
squirelboy360 Jun 6, 2026
f17c6cb
wip(embedder,vm): single-threaded Dart GC via --dart-flags; render pr…
squirelboy360 Jun 6, 2026
98e5c49
feat: OSCortex Flutter shell UI renders end-to-end (smp=1)
squirelboy360 Jun 6, 2026
40fe03d
fix(smp): gate user-thread execution to the BSP — multi-core no longe…
squirelboy360 Jun 6, 2026
7884a48
fix(ps2): resync mouse packet accumulator on ACK/resend bytes
squirelboy360 Jun 6, 2026
f281ed8
fix(embedder): pump platform task runner — platform channels now deliver
squirelboy360 Jun 6, 2026
3225d6e
chore: stop tracking build/runtime artifacts (initramfs.tar, vdisk.img)
squirelboy360 Jun 6, 2026
4322224
wip(multi-app): launched apps open + render their own UI (one crash l…
squirelboy360 Jun 6, 2026
a4e83f6
wip(multi-app): drop AOT load from launch — app engine now loads at 0…
squirelboy360 Jun 6, 2026
02df08b
feat(sched): foreground-exclusive scheduling — launched apps render f…
squirelboy360 Jun 6, 2026
a3de164
feat(ui): scroll wheel, Settings UI, boot spinner, adaptive frame pump
squirelboy360 Jun 7, 2026
46a18d7
docs: native engine port plan + committed direction
squirelboy360 Jun 7, 2026
1ecb688
docs(arch): document target native architecture (post-port)
squirelboy360 Jun 7, 2026
779e077
docs(port): Phase 0 done (baseline engine builds) + Phase 1 port-surf…
squirelboy360 Jun 7, 2026
b28c54e
engine-port: reproducible engine-build flow for contributors
squirelboy360 Jun 7, 2026
4788570
engine-port: Phase 1 done — 'oscortex' GN target configures
squirelboy360 Jun 7, 2026
24960d9
chore: remove remnants from the public repo (no scratch, no dead AOT)
squirelboy360 Jun 7, 2026
0aa99a0
engine-port: Phase 2a — OSCortex FML backend compiles into the engine
squirelboy360 Jun 7, 2026
65cc4fa
docs(port): Phase 3 AOT de-risked (one-tree gen_snapshot) + defer Dar…
squirelboy360 Jun 7, 2026
7bf219f
engine-port: Phase 2 DONE — OSCortex-backend engine links from source
squirelboy360 Jun 7, 2026
04293a1
engine-port: artifact distribution — fetch (download) vs publish (bui…
squirelboy360 Jun 7, 2026
472438b
engine-port: one-command R2 setup (wrangler) for artifact hosting
squirelboy360 Jun 7, 2026
4652974
engine-port: host artifacts on GCS (public bucket), pipeline verified
squirelboy360 Jun 7, 2026
936014a
engine-port: host artifacts on GitHub Releases (free, zero egress)
squirelboy360 Jun 7, 2026
a107ec6
engine-port: Phase 3 — release/AOT engine built + published + fetch v…
squirelboy360 Jun 7, 2026
c56299e
engine-port: AOT snapshot COMPILES — the old dead-end is gone
squirelboy360 Jun 7, 2026
45b0243
engine-port: Phase 3 COMPLETE — shell renders from AOT on OSCortex
squirelboy360 Jun 7, 2026
5aeff4c
fix(ps2): disable IntelliMouse 4-byte mode — it broke pointer input
squirelboy360 Jun 7, 2026
e79015d
engine-port: remove input diagnostics (no remnants) + app-AOT script
squirelboy360 Jun 8, 2026
293317e
embedder: load each app's own AOT libapp.so on launch
squirelboy360 Jun 8, 2026
a79aad2
kernel: remove COND_PENDING_SIGNALS resurrection (fix cond livelock)
squirelboy360 Jun 8, 2026
a521524
embedder: pass dlopen paths without trailing NUL
squirelboy360 Jun 8, 2026
4c56a19
kernel: default serial log level to Error (warmup fix)
squirelboy360 Jun 8, 2026
091575f
kernel: capture user GPRs eagerly at syscall entry (fix register leak)
squirelboy360 Jun 8, 2026
360790c
embedder: schedule a frame immediately on input (snappier reaction)
squirelboy360 Jun 8, 2026
6c09822
compositor: cut per-frame full-screen passes ~5x (65ms->5ms blit)
squirelboy360 Jun 8, 2026
71dceae
sched: gate shell baton/input shortcuts on foreground-exclusive group
squirelboy360 Jun 8, 2026
df28e0d
embedder: bind the Flutter platform-channel contract
squirelboy360 Jun 8, 2026
d668b44
os: provide real platform capabilities behind the Flutter contract
squirelboy360 Jun 8, 2026
237a3d7
embedder: fix hover-freeze — de-dupe cursor syscall + disable semantics
squirelboy360 Jun 9, 2026
f7f5ada
fix(shell): use activeThumbColor (analyze) + pure-black background
squirelboy360 Jun 9, 2026
5d0e750
aarch64: full Flutter shell (render + virtio-input) + arm64 release p…
squirelboy360 Jun 10, 2026
3191527
release: make the aarch64 kernel artifact render-capable
squirelboy360 Jun 10, 2026
a2d6750
release: arch-label both artifacts + fix .sha256 to verify standalone
squirelboy360 Jun 10, 2026
a27a61d
aarch64: Limine UEFI boot path on the render kernel (origin/main base)
squirelboy360 Jun 10, 2026
7c1d751
aarch64/limine: force EL1h (SPSel=1) at entry — UEFI ISO now renders …
squirelboy360 Jun 10, 2026
bd96e7e
aarch64: mask IRQs across the EL0-return asm — fixes the residual ~25…
squirelboy360 Jun 11, 2026
454bd63
aarch64: fix crash#2 (cond_timedwait timeout → misaligned PC) + ship …
squirelboy360 Jun 11, 2026
7e1a019
aarch64: 16-byte-align thread + process entry SP — fixes real-hardwar…
squirelboy360 Jun 11, 2026
e9fd481
aarch64: drive the scheduler/vsync tick off the VIRTUAL timer (CNTV/P…
squirelboy360 Jun 11, 2026
85ac8df
Merge remote-tracking branch 'origin/main' into develop
claude Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 72 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,33 +82,66 @@ jobs:
- name: Build bootable ISO (x86_64)
run: cargo xtask iso

- name: Build kernel (aarch64)
- name: Build kernel (aarch64, render-capable)
# aarch64 boots via QEMU `-kernel` (no Limine/ISO on -M virt), so the
# release artifact is the raw kernel ELF. This is platform-scope parity
# with the x86 ISO above: the automated build embeds whatever is committed
# under initramfs/ (the full render-capable Flutter runtime — engine .so,
# AOT shell snapshot, ICU, assets — is gitignored and staged separately by
# scripts/build-aarch64-shell.sh, exactly like the x86 full-shell ISO).
# release artifact is the raw kernel ELF. Unlike the x86 ISO (still
# platform-scope), the aarch64 kernel is RENDER-CAPABLE: we fetch the
# prebuilt Flutter shell runtime (engine .so + AOT shell snapshot + ICU +
# fonts/assets + embedder /init + libc + seed) from the `oscortex-engine-1`
# release and stage it into initramfs/ before building, so kernel/build.rs
# embeds it. The runtime is gitignored (large, prebuilt), hence the fetch.
# NOTE: refresh `oscortex-arm64-shell-runtime.tar.gz` on that release when
# the shell Dart/app or engine changes — it is a prebuilt snapshot.
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
# Fetch + verify the render runtime bundle.
gh release download oscortex-engine-1 --repo "$GITHUB_REPOSITORY" \
-p 'oscortex-arm64-shell-runtime.tar.gz' \
-p 'oscortex-arm64-shell-runtime.tar.gz.sha256' -O /tmp/rt.tar.gz \
--clobber || gh release download oscortex-engine-1 --repo "$GITHUB_REPOSITORY" \
-p 'oscortex-arm64-shell-runtime.tar.gz' -O /tmp/rt.tar.gz --clobber
if [ -f oscortex-arm64-shell-runtime.tar.gz.sha256 ]; then
exp=$(awk '{print $1}' oscortex-arm64-shell-runtime.tar.gz.sha256)
got=$(sha256sum /tmp/rt.tar.gz | awk '{print $1}')
[ "$exp" = "$got" ] || { echo "runtime sha256 mismatch"; exit 1; }
fi
# Stage into initramfs/ (kernel/build.rs embeds it).
mkdir -p initramfs
tar -xzf /tmp/rt.tar.gz -C initramfs
ls -lh initramfs/init initramfs/system/lib/libflutter_engine.so \
initramfs/system/flutter/libapp.so
# Build the render-capable kernel (embeds the staged runtime).
touch kernel/src/fs/initramfs.rs
cargo build --release --target aarch64-unknown-none -p oscortex-kernel \
--no-default-features --features arch-aarch64 \
-Z build-std=core,compiler_builtins,alloc \
-Z build-std-features=compiler-builtins-mem
# Also build the UEFI/Limine bootable ISO (the same render runtime is
# already staged in initramfs/). This is what boots in UTM / VMs / bare
# metal — a real ISO, not just the raw -kernel ELF. build-iso-aarch64.sh
# builds a higher-half limine-boot kernel and packages it with
# BOOTAA64.EFI; LIMINE_DIR was exported by the limine install step.
LIMINE_DIR="$HOME/limine" bash scripts/build-iso-aarch64.sh
ls -lh oscortex-aarch64.iso

- name: Stage release assets
run: |
set -euo pipefail
mkdir -p dist
# x86_64 bootable ISO
cp oscortex.iso "dist/oscortex-${{ steps.ver.outputs.tag }}.iso"
sha256sum "dist/oscortex-${{ steps.ver.outputs.tag }}.iso" \
> "dist/oscortex-${{ steps.ver.outputs.tag }}.iso.sha256"
# aarch64 kernel ELF
cp target/aarch64-unknown-none/release/kernel \
"dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.kernel"
sha256sum "dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.kernel" \
> "dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.kernel.sha256"
tag="${{ steps.ver.outputs.tag }}"
# Arch-labelled names. Each arch ships a bootable ISO (UEFI) AND, for
# aarch64, the raw -kernel ELF for QEMU `-M virt -kernel` users.
cp oscortex.iso "dist/oscortex-x86_64-${tag}.iso"
cp oscortex-aarch64.iso "dist/oscortex-aarch64-${tag}.iso"
cp target/aarch64-unknown-none/release/kernel "dist/oscortex-aarch64-${tag}.kernel"
# Checksums computed from inside dist/ so each .sha256 lists a bare
# filename and `sha256sum -c` works after downloading just the pair.
( cd dist
sha256sum "oscortex-x86_64-${tag}.iso" > "oscortex-x86_64-${tag}.iso.sha256"
sha256sum "oscortex-aarch64-${tag}.iso" > "oscortex-aarch64-${tag}.iso.sha256"
sha256sum "oscortex-aarch64-${tag}.kernel" > "oscortex-aarch64-${tag}.kernel.sha256" )
ls -lh dist

- name: Publish GitHub Release
Expand All @@ -122,22 +155,33 @@ jobs:
body: |
Automated production release built from `main`.

Both architectures ship a **bootable UEFI ISO** — flash it or attach it
in UTM / a VM / bare metal. aarch64 additionally ships the raw `-kernel`
ELF for `qemu-system-aarch64 -M virt -kernel` users.

**Artifacts:**
- `oscortex-<tag>.iso` — x86_64 bootable kernel ISO (Limine BIOS + UEFI),
built via `cargo xtask iso`.
- `oscortex-aarch64-<tag>.kernel` — aarch64 kernel ELF; boot with
`qemu-system-aarch64 -M virt -cpu cortex-a72 -kernel <file> -device ramfb`.

Both are **platform-scope** builds. The full render-capable Flutter shell
(engine `.so` + AOT app snapshot + ICU + assets) is gitignored and staged
separately — x86 via `scripts/build-iso.sh`, aarch64 via
`scripts/build-aarch64-shell.sh` (which pulls the engine + `gen_snapshot`
from the `oscortex-engine-1` release). Wiring that runtime into the
automated release is a tracked follow-up.
- `oscortex-x86_64-<tag>.iso` — x86_64 bootable kernel ISO (Limine BIOS +
UEFI), built via `cargo xtask iso`.
- `oscortex-aarch64-<tag>.iso` — **render-capable** aarch64 UEFI ISO
(Limine → higher-half kernel), embedding the full Flutter shell runtime
(engine + AOT shell snapshot + ICU + fonts/assets). This is the image to
boot in **UTM / VMs / bare metal**. In UTM use a single CPU core
(OSCortex runs a cooperative single-core scheduler).
- `oscortex-aarch64-<tag>.kernel` — the same render-capable kernel as a raw
ELF for direct QEMU boot:
```
qemu-system-aarch64 -M virt -cpu cortex-a72 -smp 1 -m 2G \
-kernel oscortex-aarch64-<tag>.kernel -device ramfb \
-device virtio-tablet-device -device virtio-keyboard-device
```
Wait ~60–90s (TCG warm-up) for the shell to paint; the virtio-tablet
gives mouse hover/click.

Verify with the attached `.sha256` files.
files: |
dist/oscortex-${{ steps.ver.outputs.tag }}.iso
dist/oscortex-${{ steps.ver.outputs.tag }}.iso.sha256
dist/oscortex-x86_64-${{ steps.ver.outputs.tag }}.iso
dist/oscortex-x86_64-${{ steps.ver.outputs.tag }}.iso.sha256
dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.iso
dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.iso.sha256
dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.kernel
dist/oscortex-aarch64-${{ steps.ver.outputs.tag }}.kernel.sha256
Binary file added iso_root_aarch64/EFI/BOOT/BOOTAA64.EFI
Binary file not shown.
9 changes: 9 additions & 0 deletions iso_root_aarch64/EFI/BOOT/limine.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OSCortex aarch64 boot configuration (Limine UEFI)
timeout: 0
serial: yes
verbose: yes

/OSCortex AI-First Kernel
protocol: limine
path: boot():/boot/kernel
kaslr: no
Binary file added iso_root_aarch64/boot/kernel
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions iso_root_aarch64/boot/limine/limine.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OSCortex aarch64 boot configuration (Limine UEFI)
timeout: 0
serial: yes
verbose: yes

/OSCortex AI-First Kernel
protocol: limine
path: boot():/boot/kernel
kaslr: no
9 changes: 9 additions & 0 deletions iso_root_aarch64/limine.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OSCortex aarch64 boot configuration (Limine UEFI)
timeout: 0
serial: yes
verbose: yes

/OSCortex AI-First Kernel
protocol: limine
path: boot():/boot/kernel
kaslr: no
4 changes: 4 additions & 0 deletions kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ default = ["arch-x86_64"]
arch-x86_64 = []
arch-aarch64 = []
arch-riscv64 = []
# Boot the aarch64 kernel via the Limine UEFI protocol (higher-half, MMU/HHDM/
# framebuffer set up by the bootloader) instead of the bare `-kernel`/DTB path.
# Selects the higher-half linker script + the Limine entry trampoline.
limine-boot = []
ai-cortex = []
driver-wasm = []
self-healing = []
9 changes: 9 additions & 0 deletions kernel/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ fn main() {
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
let out = std::env::var("OUT_DIR").unwrap();

// The aarch64 port has TWO mutually-exclusive boot layouts:
// * `-kernel`/DTB boot → physical link @ 0x40080000, entry `_start`, MMU off
// (aarch64.ld, the default).
// * Limine UEFI boot → higher-half link @ -2 GiB, entry the Limine
// trampoline, MMU/HHDM/framebuffer already set up by the bootloader
// (aarch64-limine.ld), selected by the `limine-boot` feature.
let limine_boot = std::env::var("CARGO_FEATURE_LIMINE_BOOT").is_ok();
let ld = match arch.as_str() {
"aarch64" if limine_boot => "aarch64-limine.ld",
"aarch64" => "aarch64.ld",
"riscv64" => "riscv64.ld",
_ => "x86_64.ld", // default / x86_64
Expand All @@ -15,6 +23,7 @@ fn main() {
println!("cargo:rerun-if-changed=linker/{ld}");
println!("cargo:rerun-if-changed=linker/x86_64.ld");
println!("cargo:rerun-if-changed=linker/aarch64.ld");
println!("cargo:rerun-if-changed=linker/aarch64-limine.ld");
println!("cargo:rerun-if-changed=linker/riscv64.ld");
println!("cargo:rerun-if-changed=build.rs");

Expand Down
72 changes: 72 additions & 0 deletions kernel/linker/aarch64-limine.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/* OSCortex aarch64 linker script — Limine higher-half kernel (UEFI boot).
*
* Unlike the bare `-kernel` path (aarch64.ld, linked to physical 0x40080000 with
* the MMU off and entry `_start`), the Limine boot protocol hands the kernel a
* machine that already has the MMU on, a higher-half mapping of the kernel, an
* HHDM direct-map of physical RAM, and a framebuffer. Limine loads each PT_LOAD
* segment at its higher-half virtual link address and jumps to the ELF entry
* point at EL1.
*
* We therefore link this variant to the conventional Limine higher-half base
* (-2 GiB) and set the entry to the aarch64 Limine entry trampoline, mirroring
* the x86_64 Limine kernel layout. The Limine request statics are discovered by
* the bootloader by scanning the loaded image for their magic numbers.
*/
OUTPUT_FORMAT("elf64-littleaarch64")
OUTPUT_ARCH(aarch64)
ENTRY(_limine_aarch64_entry)

PHDRS {
text PT_LOAD FLAGS(5); /* R-X */
rodata PT_LOAD FLAGS(4); /* R-- */
data PT_LOAD FLAGS(6); /* RW- */
}

SECTIONS {
. = 0xFFFFFFFF80000000;

.text : ALIGN(4096) {
__text_start = .;
KEEP(*(.text.limine_entry)) /* entry trampoline first */
*(.text .text.*)
__text_end = .;
} :text

. = ALIGN(4096);

.rodata : ALIGN(4096) {
__rodata_start = .;
*(.rodata .rodata.*)
__rodata_end = .;
} :rodata

/* Limine requests (scanned by the bootloader for their magic numbers). */
.limine_reqs : {
KEEP(*(.limine_requests*))
KEEP(*(.limine_requests_start*))
KEEP(*(.limine_requests_end*))
} :rodata

. = ALIGN(4096);

.data : ALIGN(4096) {
__data_start = .;
*(.data .data.*)
*(.got .got.*)
__data_end = .;
} :data

. = ALIGN(4096);
.bss (NOLOAD) : ALIGN(4096) {
__bss_start = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(16);
__bss_end = .;
} :data

. = ALIGN(4096);
__kernel_end = .;

/DISCARD/ : { *(.eh_frame) *(.eh_frame_hdr) *(.note .note.*) *(.comment) }
}
Loading
Loading