Commit Graph
140 Commits
Author SHA1 Message Date
daniel 0f81276efc feat: add inherited sessions and desktop session teardown 2026-08-14 10:33:20 +02:00
daniel 821543238d feat: add keyboard layout support 2026-08-13 17:57:44 +02:00
daniel 7f2d4b693f feat: add crash stack snapshots and context menu annotations 2026-08-12 18:30:08 +02:00
daniel 3ef98a9fd5 fix: inherit process environment and untrack libc objects 2026-08-11 13:08:40 +02:00
daniel 0a91131cb0 feat: add ssh server (sshd) 2026-08-11 12:53:36 +02:00
daniel 9b23d99082 feat: overhaul userspace heap and virtual memory 2026-08-10 12:25:27 +02:00
daniel 1c498ffa6a feat: implement utime libc function, SYS_UTIME syscall, filesystem support (ext2 only) 2026-08-09 11:16:59 +02:00
daniel 771c3a5a98 fix: align POSIX stdio and argument handling, clarify Intel iwlwifi licensing 2026-08-09 10:42:09 +02:00
danielandClaude Opus 5 e8407afcdb feat: libc - add SYS_GETCHAR_NB and a non-blocking stdin readiness probe
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NQRTGoYgnZQsh7uCh6Jsxm
2026-08-08 14:42:38 +02:00
danielandClaude Opus 5 fe10216f8b feat: libc - add strndup, scandir, alphasort, usleep, ftruncate, M_PI constants
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Ae69wJS7sueQMUwNxV3nX
2026-08-07 21:26:25 +02:00
danielandClaude Opus 5 53a9965e7c feat: libc - add pread/pwrite
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Ae69wJS7sueQMUwNxV3nX
2026-08-07 20:28:12 +02:00
daniel cc1d80442e refactor: split out game engine experiment and demo game 2026-08-07 13:24:46 +02:00
daniel 0e1601be74 feat: desktop - use MTK menu for desktop right-click menu 2026-08-07 10:55:38 +02:00
daniel 9eb21eb3e3 feat: wi-fi - expand support and fix issues, add GUI components 2026-08-07 10:36:53 +02:00
daniel bbe1df62fd feat: wi-fi - join WPA2/WPA3-PSK networks and carry traffic like ethernet 2026-08-06 19:44:35 +02:00
daniel a01e63c717 feat: intel wi-fi (AX211) driver with network scanning 2026-08-06 08:36:10 +02:00
daniel edc3452d61 feat: real stat metadata across all filesystems, plus mkdir and rmdir 2026-08-04 13:03:08 +02:00
daniel b1c55073c7 fix: kernel concurrency, interrupt context, and user VA safety 2026-08-01 15:43:38 +02:00
daniel 18122136dd fix: improve Bluetooth reliability 2026-07-31 18:42:48 +02:00
daniel a965e67c93 fix: prevent IPC slot reuse during object teardown 2026-07-30 17:46:38 +01:00
daniel 471903bafb feat: expand Intel GPU display management 2026-07-30 17:12:08 +01:00
daniel 86de3400a9 feat: audio - add concurrent mixing, output switching, and device-aware UI 2026-07-29 20:03:35 +01:00
daniel d99dab45e5 feat: add NTP; fix networking bugs/regressions 2026-07-29 16:32:18 +01:00
daniel a288dee7df refactor: network - harden TCP/IP and unify HTTP clients 2026-07-29 15:35:17 +01:00
daniel 75ae7ede56 refactor: unify desktop apps and Settings under item catalog 2026-07-29 13:59:46 +01:00
daniel de7edaf623 feat: vfs - add stat syscall 2026-07-21 14:23:06 +02:00
daniel 3ac25b7abd feat: raised max windows to 32 2026-07-18 10:34:46 +02:00
daniel 796ed46d12 fix: fix Font Preview crash if opened manually 2026-07-18 10:21:22 +02:00
daniel 16d7321484 fix: fix MTK elements' border radiuses 2026-07-18 10:10:56 +02:00
danielandClaude Opus 4.8 95e3ca3272 feat(mtk): anti-alias rounded-rect frames (buttons, fields, panels)
Route draw_rounded_frame through a new fill_round_rect_aa that fills the
straight interior solid and 4x4-supersamples only the four corner arcs,
so button/text-field/panel/list-frame corners are smooth instead of
pixelated, at negligible cost.

Consolidate the checkbox's private AA fill/blend helpers onto the shared
aa_blend_px / fill_round_rect_aa primitives.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-17 20:55:35 +02:00
danielandClaude Opus 4.8 0377be4524 feat: redesign installer on MTK toolkit with component selection
Rewrite the Installer app on the Montauk Toolkit (Canvas + gui/mtk
widgets, theme, hover states, scrollbar) replacing the hand-rolled px_*
renderer and bespoke TrueType usage.

Add a new "Software" step: an expandable checkbox tree for optional
components (Montauk SDK with gcc/g++, binutils, tcc, lua sub-items;
Games; Office; Internet apps; Printing; experimental httpd and SDR).
Unchecked components' paths are excluded from the install copy, with a
longest-path ownership rule so e.g. sdk/tcc installs even when the rest
of the SDK is deselected. The update flow refreshes only the components
the target already has.

Add tri-state checkbox and disclosure-arrow widgets to the MTK toolkit
(anti-aliased, supersampled).

Merge tcc and lua into 0:/sdk (0:/sdk/tcc, 0:/sdk/lua) and drop 0:/lib:
update tcc config.h, lua luaconf.h, both Makefiles, the devkit clean
scope, man pages and montaukos.org notices.

Make printing optional: init skips printd when 0:/os/printd.elf is
absent.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-17 20:52:19 +02:00
daniel 8e6b619b02 feat: port gcc to MontaukOS 2026-07-17 15:47:45 +02:00
danielandClaude Fable 5 1c851a3627 fix: real argv[0] via SYS_GETEXECPATH - GCC driver finds its backends
The GCC driver relocates its install prefix from argv[0]. crt1
hardcoded argv[0] as "prog", so make_relative_prefix cwd-joined it
and computed exec prefixes relative to the current directory
(0:/users/admin/../libexec/gcc/...), and because the computed
gcc_exec_prefix is non-NULL the standard /sdk prefixes were never
searched. cc1plus was unreachable from anywhere except (by accident
of the path arithmetic) 0:/sdk/bin. sdk-diag proved the kernel and
libc layers all worked; only the driver's self-relocation was lost.

New SYS_GETEXECPATH (151) returns the absolute path the process was
spawned from (Process::name); crt1 uses it for argv[0] with a "prog"
fallback. With a real argv[0], make_relative_prefix computes
0:/sdk/bin/../libexec/gcc/ from any cwd. Native GCC relinked against
the new crt1; sdk-diag ships in the SDK as a permanent probe; the
montauk.h TCC mirror gains the wrapper (checker enforced it).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-17 10:43:59 +02:00
danielandClaude Fable 5 f234c67a2b feat: native GCC - cc1, cc1plus and the gcc driver run on MontaukOS
Cross-build GCC 14.2.0 with --host=x86_64-montauk: the driver, cc1,
cc1plus and collect2 now link as static Montauk ET_EXEC binaries
against the hosted libstdc++, and ship in the SDK. Together with the
native binutils, TCC and the target sysroot, MontaukOS carries a
complete self-contained C and C++ toolchain at 0:/sdk.

libc: anonymous mmap/munmap over SYS_ALLOC (GCC's page allocator
wants mmap; SYS_ALLOC memory is page-aligned by construction),
getpagesize, minimal sysconf, MB_CUR_MAX, isascii/toascii, POSIX id
typedefs (ino_t, dev_t, nlink_t, ...), struct stat fields switched to
proper POSIX types (st_size is a signed off_t now), and a
conventional _STDIO_H guard marker so GMP's FILE detection works.

Build recipe and the five host-build gotchas (bundled config.subs,
gettext removal, stdio guard sniffing, endianness cache preset,
sysroot sdk symlink) are documented in toolchain/README.md. The
devkit stages the driver as gcc.elf/g++.elf/cpp.elf, the backends in
the libexec layout the driver expects, a copy of ld where collect2
searches, and a 0:/tmp scratch dir. Ramdisk: 1604 files, 368 MB.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 23:51:30 +02:00
danielandClaude Fable 5 03d1a1bc2f feat: hosted libstdc++ for x86_64-montauk - full C++ on MontaukOS
The cross toolchain now builds real hosted C++: std::string, vector,
unique_ptr, iostreams and exceptions all work in a plain
x86_64-montauk-g++ invocation with no special flags. This is the
library that native cc1plus will link against for the GCC self-host.

crt1 now runs .preinit_array/.init_array before main and hooks
.fini_array through atexit (main returns via exit(), so destructors
run on both exit paths). Global constructors and libgcc's eh_frame
registration both ride this. GCC is reconfigured with
--enable-initfini-array (modern arrays instead of .ctors),
--with-newlib (satisfies libstdc++'s crossconfig for unknown hosts),
--disable-wchar_t and --disable-libstdcxx-pch; the montauk gcc patch
grows a hunk keeping os/generic ctype under --with-newlib (the
Montauk libc is not newlib).

libc additions harvested by the libstdc++ build: mbtowc/wctomb,
strxfrm, strtok/strtok_r, a real vfscanf/fscanf/scanf (character-
driven with widths and l/ll; also unblocks gprof later), fgetpos/
fsetpos/setbuf/fpos_t, modf plus the C99 float math variants
(acosf..tanhf, hypot/hypotf as wrappers), FP_* classification macros,
the full POSIX errno vocabulary, complete DT_* dirent types, and
mbstate_t.

The SDK ships the real libstdc++.a (was an empty stand-in), the C++
headers at 0:/sdk/include/c++, and cxx-test.elf (global ctor, string,
vector+sort, unique_ptr, throw/catch; exits 0 on 5/5). Ramdisk sits
at 1571 files, within the 2048 table.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 23:06:50 +02:00
danielandClaude Fable 5 75184e0651 feat: process exit codes, posix_spawn, 4 KiB command lines
Groundwork for the GCC driver: a compiler driver must spawn cc1/as/ld
and know whether each stage succeeded.

Kernel: the scheduler keeps an exit-code ledger (pid -> code; pids are
monotonic so entries never alias), published during teardown right
before waiters wake. SYS_EXIT records main()'s return value, SYS_KILL
records 256+SIGKILL, and the exception handler records 256+signal
mapped from the fault vector (#PF/#GP -> SIGSEGV, #DE/FP -> SIGFPE,
#UD -> SIGILL). SYS_WAITPID now returns the code: 0..255 for a normal
exit, 256+signal for a violent death. Process args grow from 256
bytes to 4 KiB (cc1 invocations do not fit in 256), with crt1 now
parsing up to 255 argv entries from a static buffer.

libc: new spawn.h with posix_spawn/posix_spawnp over SYS_SPAWN -
libiberty's pex layer has a posix_spawn backend, so GCC's driver works
without fork. argv is joined into the kernel args string (spaces in
arguments rejected; no kernel quoting), envp is not transferred, and
non-empty file actions fail loudly with ENOTSUP until the kernel can
redirect stdio on spawn. waitpid() now decodes real POSIX status and
the sys/wait.h macros distinguish exited from signaled children.

Shell: prints [exit code N] after nonzero exits and [terminated by
signal N] for killed or crashed children.

Verified on the OS: cat on a missing file reports exit code 1; a
window-close (clean exit 0) stays silent as it should.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 16:59:17 +02:00
danielandClaude Fable 5 54c0584b85 refactor: move the native devkit from 0:/usr to 0:/sdk (Montauk SDK)
0:/usr was a Unix transplant in an otherwise Montauk-native layout.
The SDK now lives at 0:/sdk/{bin,include,lib} (+ ldscripts under
0:/sdk/x86_64-montauk): Montauk-flavored, and a clean unit for a
future per-component installer tickbox. Native binutils is rebuilt
with --prefix=/sdk so ld's compiled-in search paths follow; future
ports configure with --prefix=/sdk.

Also add pathconf() with _PC_* names to the libc: now that realpath
exists, libiberty's lrealpath.c compiles its pathconf fallback path
unconditionally.

Shell command resolution and tab completion updated to 0:/sdk/bin.
Boot-verified in QEMU: setup, login, desktop on the new image with
zero usr/ remnants in the ramdisk.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-15 09:11:05 +02:00
danielandClaude Fable 5 bd9158fdcc feat: POSIX libc surface, native binutils (as/ld/ar run on MontaukOS)
Grow the Montauk libc enough to cross-build binutils 2.43.1 with
--host=x86_64-montauk. gas, ld, ar, nm, objcopy, objdump, readelf,
ranlib, strip and friends now link as native ET_EXEC Montauk binaries
(staged stripped in toolchain/native/, not yet shipped in the image).

New libc surface: full Linux errno and signal sets, O_* flags with
real O_EXCL/O_APPEND semantics, unlink/rmdir/dup/dup2/getpid/_exit,
kill (SYS_KILL), fcntl, fileno/fdopen, putc/getchar/rewind,
ctime/asctime, strtoll/strtoull/atoll, bsearch, mkstemp/mktemp,
realpath (lexical, drive-prefix aware), mbstowcs/mblen, chmod/fchmod/
umask/utime no-ops (VFS has no modes or settable times), full struct
stat with fake inodes, sscanf field widths (bounded conversions),
SCN*/PRI* completions, wait/waitpid over SYS_WAITPID, and new headers
sys/wait.h, sys/param.h, utime.h, wchar.h, memory.h.

fork/exec/pipe are declared but fail with ENOSYS: binutils never
spawns, and real process plumbing is the posix_spawn milestone, which
needs kernel support (exit status reporting, fd redirection).

TCC's montauk_compat.h shims (unlink, chmod, execvp, realpath, fdopen,
strtoll, strtoull) are retired in favor of the libc versions.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-14 10:55:39 +02:00
danielandClaude Fable 5 778f897f1a feat: x86_64-montauk userspace cross toolchain
Add build-montauk-toolchain.sh: builds an OS-aware cross GCC/binutils
(same versions and prefix as the bare-metal x86_64-elf toolchain) whose
x86_64-montauk target links static ET_EXEC binaries against the Montauk
libc sysroot with no special flags: 4 KiB max page size for the kernel
ELF loader, -mno-red-zone by default, crt1/crti/crtn + -lc from the
sysroot, __montauk__ defined. Target patches are checked into
toolchain/patches/, the GCC target header into toolchain/files/.

sys/types.h now includes <stdint.h> so hosted code (libgcov and
friends) sees intptr_t via the stdio include chain.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-14 10:19:35 +02:00
danielandClaude Fable 5 182520a585 feat: vblank IRQ and double-buffered page flip for Intel GPU
Add tear-free scanout to the Intel GPU driver: a second kernel-allocated
scanout buffer, DSPASURF flips latched at vblank, and a vblank interrupt
delivered over MSI (Gen 11+ master/display/pipe IRQ chain) with a
monotonic vblank counter and WaitVblank().

Expose it as SYS_FBFLIP (150): index selects the front buffer, -1
queries support, flags bit0 waits for the flip to latch. fb_map() now
maps buffer 1 right after buffer 0 when flipping is available, and
gui::Framebuffer draws to the off-screen buffer and flips with vsync,
falling back to the direct copy when unsupported.

Scanout is restored to buffer 0 when the flip-owning process exits and
on panic, so the terminal and panic box never land on the invisible
buffer.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-13 21:53:06 +02:00
daniel 857122c07c cleanup: rename shared libraries to remove 'lib' prefix 2026-07-08 10:12:32 +02:00
daniel ab8c24844e fix: fix desktop app loading cap 2026-07-08 10:00:45 +02:00
daniel 70702a21b0 feat: HWP scaling, C1E, closed-loop thermal governor for Intel CPUs 2026-07-05 10:51:11 +02:00
daniel 108538f60c feat: add RTL-SDR, R820t drivers, radio APIs, and sdr demo tool 2026-06-22 11:49:16 +02:00
daniel 18eb48e5df cleanup: purge unused sysinfo icon field from DesktopState 2026-06-21 14:33:50 +02:00
daniel 2897859c61 feat: auto-generate and verify TCC C API syscall numbers 2026-06-21 12:32:22 +02:00
daniel 41502ad35f fix: fix Terminal zoom inconsistency 2026-06-17 18:18:46 +02:00
daniel 43d43ac9ea cleanup: namespace Montauk (capital M) => montauk::abi 2026-06-16 09:09:16 +02:00
daniel b6ac5ac994 feat: allow MAC spoofing in Bluetooth stack, show paired devices in Bluetooth app 2026-06-16 08:49:06 +02:00
daniel 427876afa7 feat: filesystem and Files app support for >64 file entries, 64-bit sizes, async ops, GUI toolkit improvements to devexplorer app 2026-06-07 09:33:46 +02:00