Commit Graph
73 Commits
Author SHA1 Message Date
daniel 724029cacb feat: add userspace system logging, rename klog to syslog, rename relevant syscalls and API functions 2026-08-14 18:37:27 +02:00
daniel 821543238d feat: add keyboard layout support 2026-08-13 17:57:44 +02:00
daniel 0a91131cb0 feat: add ssh server (sshd) 2026-08-11 12:53:36 +02:00
daniel 990d184bd0 feat: pdfviewer - expand PDF rendering support 2026-08-10 15:03:54 +02:00
danielandClaude Opus 5 27c13b8dc2 refactor: move DOOM out to the mtkports ports tree
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Ae69wJS7sueQMUwNxV3nX
2026-08-07 20:10:52 +02:00
daniel cc1d80442e refactor: split out game engine experiment and demo game 2026-08-07 13:24:46 +02:00
daniel 75d92d560c refactor: libc - share printf, split the float path, fix relink deps 2026-08-04 17:29:24 +02:00
daniel 471903bafb feat: expand Intel GPU display management 2026-07-30 17:12:08 +01:00
daniel d99dab45e5 feat: add NTP; fix networking bugs/regressions 2026-07-29 16:32:18 +01:00
daniel 75ae7ede56 refactor: unify desktop apps and Settings under item catalog 2026-07-29 13:59:46 +01: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 5db2bd4c7c feat: TLS runtime - PT_TLS loading and per-thread FS base
MontaukOS binaries could not use thread-local storage: the ELF loader
ignored PT_TLS and no FS base was ever programmed, so any %fs access
(initial-exec/local-exec TLS, e.g. libbfd's _Thread_local error state)
page faulted at address 0. This is the kernel prerequisite for
cc1plus/libstdc++ in the GCC port.

ELF loader: parse PT_TLS and build the main thread's TLS block above
the loaded image (x86-64 variant II ABI: block below the thread
pointer, TP = base + align_up(memsz, align), .tdata copied from the
template, .tbss zeroed, ABI self-pointer stored at [TP]). The
template description is kept on the process for thread spawns.

Scheduler: fsBase per thread, loaded into IA32_FS_BASE at every
dispatch site through a per-CPU cache - TLS-free processes cost one
MSR write per CPU ever, and userspace cannot desync the cache since
CR4.FSGSBASE stays off. SYS_THREAD_SPAWN gives each new thread its
own TLS block copied from the template (allocated from the process
heap; reclaimed at process teardown).

Ships tls-test.elf in the SDK (built by the devkit target): checks
.tdata values, .tbss zeroing, and the %fs:0 self-pointer, exiting
nonzero on failure. Boot-smoke verified; existing TLS-free programs
are unaffected.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 18:48:25 +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 fe040f8fea feat: ship native dev tools and target sysroot at 0:/usr
The devkit target in programs/GNUmakefile stages the native binutils
(as, ld, ar, nm, objcopy, objdump, readelf, ranlib, strip, size,
strings, addr2line, c++filt, elfedit as *.elf) into the image at
0:/usr/bin, plus a target-side sysroot: libc headers, montauk/ and
Api/ SDK headers and the freestanding C++ set at 0:/usr/include, and
libc.a + crt1/crti/crtn objects (with empty libm/libstdc++ stand-ins)
at 0:/usr/lib. ld's ldscripts ship under 0:/usr/x86_64-montauk.

The /usr prefix matches the binutils configure prefix, and the kernel
already resolves driveless absolute paths against the cwd drive, so
compiled-in /usr/lib search paths work natively on drive 0.

The shell resolves commands from 0:/usr/bin (after 0:/os) and tab
completion lists it. When toolchain/native/ has not been built, the
devkit step skips cleanly and the image builds as before.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-14 20:53:57 +02:00
danielandClaude Fable 5 648f7111c0 feat: build userspace programs with the x86_64-montauk toolchain
Switch all program and library Makefiles from host g++ (or the
bare-metal x86_64-elf compiler) to x86_64-montauk-g++/gcc and drop the
flags the target now owns: -nostdinc + kernel freestanding -isystem
paths, -m64/-march, -fno-PIC, -mno-red-zone, -mcmodel=small, -static,
-Wl,-m,elf_x86_64, -z max-page-size, --build-id=none. Deliberate
policy flags stay (-ffreestanding, per-app SSE, -nostdlib + link.ld).

Program builds now require the montauk toolchain and fail with a
pointer to build-montauk-toolchain.sh; lib/ and libs/ keep the host
fallback since the toolchain script bootstraps libc through it.
Userspace is also now pinned to the cross GCC instead of drifting
with the distro compiler.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-14 10:19:35 +02:00
danielandClaude Fable 5 bd7ad4f5d6 feat: default login-screen wallpaper
Ship a default wallpaper (blossoms by Nikhil Kumar, Unsplash License) in
a new 0:/os/wallpapers/ directory for OS-provided imagery, staged from
programs/data/wallpapers/. login.elf falls back to
0:/os/wallpapers/default.jpg when the desktop config names no wallpaper
or the configured file cannot be opened. Attribution added to
THIRD-PARTY-NOTICES.txt and man legal.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-08 16:07:27 +02:00
danielandClaude Fable 5 841cfc9a54 legal: font license texts on the ISO; permissive source-available MontaukOS license
- Ship each bundled font's license at 0:/os/licenses/: OFL-1.1 copies for
  JetBrains Mono, Noto Serif, and Roboto, and AGPLv3 + font-embedding
  exception for C059 (URW Base 35).
- THIRD-PARTY-NOTICES.txt gains sections for all four font families and
  now describes MontaukOS as source-available.
- license.txt rewritten as the MontaukOS Software License: use, study,
  modify, and redistribute freely with attribution; selling or bundling
  into commercial products still requires permission. Replaces the
  previous no-copy/no-modify/no-redistribute EULA.
- The MontaukOS license itself now also ships on the ISO
  (0:/os/licenses/LICENSE.txt, sourced from the website copy).
- man legal updated: license pointer + full third-party component list.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-08 12:25:39 +02:00
danielandClaude Fable 5 fbf9eec7f3 legal: bundle third-party licenses on the ISO; stop shipping doom1.wad
- New 0:/os/licenses/ directory on the ISO with GPL-3.0.txt (Flat Remix
  icon theme), GPL-2.0.txt (doomgeneric DOOM engine), and NOTICES.txt
  (mirrors montaukos.org/THIRD-PARTY-NOTICES.txt).
- THIRD-PARTY-NOTICES.txt gains a Flat Remix section (GPLv3, attribution,
  modification and corresponding-source statements; the shipped SVGs are
  the source form).
- man legal now lists third-party components and points at 0:/os/licenses/.
- doom1.wad removed from the repo and the build: the shareware WAD is
  proprietary id Software content. doom.elf (GPLv2) still ships; users
  must supply their own WAD.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-08 12:16:55 +02:00
daniel 9eccdd9334 cleanup: remove test programs/libraries 2026-07-08 10:06:07 +02:00
danielandClaude Opus 4.8 a513e2708d feat: add Character Map (charmap) MTK app
A standalone Window Server app for browsing curated sets of characters
and copying them to the clipboard for pasting into other apps.

- Four sets (Latin, Punctuation, Currency, Symbols) shown as a responsive,
  scrollable tile grid with category tabs, a live preview/detail footer,
  and a Copy button.
- Click a tile (or use arrow keys + Enter/Space) to select and copy; a
  transient toast confirms the copy. Mouse wheel scrolls; Tab cycles sets.
- Styled with the MTK theme (accent, surfaces, rounded tiles) to match the
  other Montauk apps, modeled on the calculator app.

The character set is deliberately the single-byte Windows-1252 range the
system font can render (the glyph cache only holds codepoints 0-255).
Copying writes the raw byte, so glyphs render identically here and in every
other single-byte-text Montauk app (copying UTF-8 would render as mojibake).

Registered in programs/GNUmakefile and scripts/install_apps.sh alongside
calculator; menu category "Applications", icon accessories-character-map.svg.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 18:07:23 +02:00
daniel 6a5eafb4fc feat: add Power GUI app (powermgr) 2026-07-05 11:34:27 +02:00
daniel 2897859c61 feat: auto-generate and verify TCC C API syscall numbers 2026-06-21 12:32:22 +02:00
daniel d93e111783 feat: add proclist command, fix TLS bug, link libc for system programs 2026-06-19 12:03:12 +02:00
daniel 0f16785c9f feat: Intel BT firmware download, A2dp & Bluetooth audio progress 2026-06-03 18:05:17 +02:00
daniel efadda8008 fix: delete redundant 0:/common directory, remove dead 0:/home fallback in Music and Video apps 2026-05-28 20:41:16 +02:00
daniel 89ee6464ac fix: move 0:/etc/ => 0:/os/certs/ 2026-05-28 20:30:00 +02:00
daniel 28aadd3195 feat: add 2048 game 2026-05-19 21:34:28 +02:00
daniel 8b8c8cee95 feat: audio mixer, Audio app, fix Installer crash 2026-05-19 07:48:09 +02:00
daniel dcdbcac1e0 feat: screenshot app improvement, WIndow Server supports full-screen overlay, Disks app UI improvements 2026-05-10 10:45:05 +02:00
daniel af48ab0e1e feat: kernel network statistics reporting, new Network configuration applet 2026-05-03 10:45:33 +02:00
daniel 14971e6f02 feat: architectural improvements for Apps and System Configuration virtual folders in Files 2026-04-30 16:51:08 +02:00
daniel 3636546a6e feat: add time zone configuration applet to System Configuration 2026-04-24 16:37:17 +02:00
daniel 29034b792f feat: allow applets to be shared modules 2026-04-24 14:50:08 +02:00
daniel de96c1ca57 feat: add warning popup if existing desktop process is present 2026-04-22 21:53:58 +02:00
daniel 8c9ba7d0be feat: add message box dialogs 2026-04-22 18:44:25 +02:00
daniel c3a5a1c739 feat: make dialogs a shared library 2026-04-08 19:37:50 +02:00
daniel ec186d076d feat: use PIC code model for shared libraries, fix shared library bugs 2026-04-08 17:07:55 +02:00
daniel 9e04e51daa feat: add process crash popups 2026-04-07 20:15:56 +02:00
daniel 4666e36dba wip: extend shared library support, window demo 2026-04-05 21:38:05 +02:00
daniel f1b49b3c4e wip: shared library support 2026-04-05 15:14:07 +02:00
daniel 90ad9f038d feat: add common dialogs, i.e. open/save dialog 2026-04-01 23:45:28 +02:00
daniel 072199df6b feat: support for IPP printing + test page 2026-04-01 21:15:27 +02:00
daniel 55d7c1ab0e feat: new calculator UI, video app icon, Super + Space search window 2026-03-28 23:31:43 +01:00
daniel 5049d6529d feat: video player 2026-03-28 17:26:25 +01:00
daniel 085425fee4 feat: convert procmgr and mandelbrot to Window Server apps 2026-03-28 10:54:31 +01:00
daniel 57f0424ca4 feat: make terminal and klog Window Server apps 2026-03-28 09:51:32 +01:00