Commit Graph
309 Commits
Author SHA1 Message Date
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 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 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 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
danielandClaude Fable 5 e1a5364824 fix: eliminate desktop stall when deleting large files
Deleting a big file froze the desktop for seconds: ext2 FreeBlock did 4
synchronous disk I/Os per data block (bitmap + BGDT read/write), and the
file manager deleted single files inline on the desktop main thread.

- Ext2: batch block frees per block group; keep the bitmap resident,
  clear bits in memory, flush bitmap + BGDT once per group transition.
  Also covers the truncate-on-overwrite path.
- Ext2: refuse to mount volumes with block size > 4096; temp buffers
  throughout the driver are single 4 KiB pages, so larger blocks would
  overflow them (our mkfs always uses 4K).
- Files: route single-file deletes past 4 MiB to the background worker
  + progress dialog; refuse (instead of stalling inline) when another
  file operation already owns the worker.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-09 23:20:19 +02:00
daniel 674b505f97 feat: add floating-point support to format functions in libc 2026-07-09 11:54:59 +02:00
daniel c3d157e880 feat: add warning in DOOM for missing wad 2026-07-09 11:43:21 +02:00
daniel 5e58875e07 feat: fix ramdisk file copies being incorrectly marked as directories, update man pages 2026-07-09 11:19:06 +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 fe2cac7475 legal: CA bundle and Intel Bluetooth firmware notices
- THIRD-PARTY-NOTICES.txt gains sections for the Mozilla CA certificate
  bundle (0:/os/certs/ca-certificates.crt; Mozilla CA Certificate
  Program root store as packaged by Debian/Ubuntu ca-certificates,
  MPL-2.0) and the Intel Bluetooth firmware blobs
  (0:/os/firmware/intel/ibt-1040-0041.*, from linux-firmware, Intel
  redistributable firmware license).
- MPL-2.0 full text and Intel's firmware license (with its required
  copyright notice and disclaimer) ship at 0:/os/licenses/.
- Both added to the license's third-party list and man legal.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-08 15:15:47 +02:00
danielandClaude Fable 5 965c57b7a0 legal: TCC and Lua license declarations
- THIRD-PARTY-NOTICES.txt gains sections for the Tiny C Compiler
  (0.9.28rc, LGPL-2.1, modified for MontaukOS; source in
  programs/src/tcc/) and Lua (5.4.8, MIT, Lua.org PUC-Rio).
- LGPL-2.1 full text ships at 0:/os/licenses/LGPL-2.1.txt (copied from
  the vendored TCC COPYING); Lua's MIT text is reproduced in the
  notices file.
- Both components added to the license's third-party list and man legal.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-08 15:09:22 +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
danielandClaude Fable 5 99997dd822 fix: display Bluetooth MAC addresses in conventional MSB-first order
bdAddr bytes are stored LSB-first (HCI wire order) throughout the stack,
but the bluetooth app and btbonds tool formatted them LSB-first too, so
every MAC displayed byte-reversed. Print addr[5] down to addr[0] instead.
Display-only change; wire-order parsing and syscalls untouched.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-08 10:57:48 +02:00
daniel 78494cb072 feat: add header dependency tracking for programs 2026-07-08 10:24:21 +02:00
daniel 857122c07c cleanup: rename shared libraries to remove 'lib' prefix 2026-07-08 10:12:32 +02:00
daniel 9eccdd9334 cleanup: remove test programs/libraries 2026-07-08 10:06:07 +02:00
daniel ab8c24844e fix: fix desktop app loading cap 2026-07-08 10:00:45 +02:00
danielandClaude Opus 4.8 45feef596f feat: enlarge and vertically center charmap footer text
Bump the selected character's name (16->19) and metadata (14->15) sizes, and
lay them out as a two-line block vertically centered on the preview glyph box
instead of top-aligned.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:26:29 +02:00
danielandClaude Opus 4.8 69100df8ac fix: grey out the charmap Copy button while showing "Copied"
Render the button in its disabled state during the post-copy confirmation
window, matching the Bluetooth app's greyed-out "Scanning..." button.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:24:27 +02:00
danielandClaude Opus 4.8 4c5c0fc96f fix: confirm copy via the button label instead of status text
Instead of a separate "Copied to clipboard" line beside the Copy button, flip
the button's own label to "Copied" for ~1.6s after a copy, then back to "Copy".
Simpler and keeps the footer uncluttered.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:21:51 +02:00
danielandClaude Opus 4.8 d1bca65cc7 fix: native Copy button and copy confirmation in charmap
The hand-rolled Copy button (bold, custom-shaded accent fill) and the floating
accent "toast" pill both looked out of place. Replace the button with the
canonical mtk::draw_button (BUTTON_PRIMARY), matching the Refresh button in
Devices and buttons elsewhere. Replace the floating pill with a plain
"Copied to clipboard" status line in the footer, right-aligned beside the Copy
button, that fades after ~1.6s — no overlay drawn over the character grid.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:18:44 +02:00
danielandClaude Opus 4.8 72e6e870b0 fix: make charmap scrollbar hug the panel edge
The scrollbar was placed inside the padded tile grid, leaving a gap above it
(below the tabs) and beside it (before the window edge). Give the scrollbar
its own viewport spanning the full panel between the tabs and footer, flush to
the right window edge, like the Devices/Music apps. The tile grid keeps its
margins and simply reserves the scrollbar width plus a gap on its right.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:13:30 +02:00
danielandClaude Opus 4.8 96cf44785f feat: use the shared mtk scrollbar in charmap
Replace charmap's hand-drawn scrollbar with the mtk scrollbar widgets
(scrollbar_track_rect / scrollbar_thumb_rect / draw_scrollbar), matching the
Devices and Music apps: standard 12px track colored SCROLLBAR_BG/FG with a
draggable thumb. Adds thumb drag, track-click-to-jump, and hover highlight
(mirroring devexplorer's handling); the tile grid reserves an SB_GUTTER on the
right sized from mtk::SCROLLBAR_W. The bar auto-hides when the set fits.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:07:19 +02:00
danielandClaude Opus 4.8 75fefa92d8 feat: use the shared mtk tab bar for charmap's top tabs
Replace charmap's bespoke tab drawing/hit-testing with mtk::draw_tab_bar /
mtk::hit_tab_bar so the top tabs match the canonical MontaukOS style used by
the Desktop Settings panel: a surface-colored bar with a bottom border, the
active tab cut out in window_bg with a 3px accent underline, active label in
accent and inactive labels in text_subtle. Tab height is now 36 (theme.tab_h).
Drops the custom hover tint (the canonical style has none).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 21:01:51 +02:00
danielandClaude Opus 4.8 0d67c5b8f7 feat: remove charmap in-window header, float the copy toast
The top header bar duplicated the window-manager title bar. Drop it: tabs
now sit at the top of the content area (window shrinks by the header's
height). The "Copied" confirmation moves from the header to a floating
accent toast anchored to the lower-right of the grid, drawn last.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 20:54:37 +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 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 d05672f637 fix: remove inaccurate virtual path (virtual://apps) 2026-06-21 14:29:27 +02:00
daniel 2897859c61 feat: auto-generate and verify TCC C API syscall numbers 2026-06-21 12:32:22 +02:00
daniel 06cee7bc32 feat: add btbonds command 2026-06-21 11:16:12 +02:00
daniel 3f26b8cdb4 feat: introduce bootloader-agnostic Boot Contract, add btlist command to list connected Bluetooth devices 2026-06-20 21:25:24 +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 bbb6fcf0ee feat: add support for console sessions to crashpad and crash handling in kernel 2026-06-18 12:56:29 +02:00
daniel 233dbd3fdb fix: fix off-by-one in tabcompletion module 2026-06-18 12:21:19 +02:00
daniel a8d706a0d9 cleanup: const and type hygeine in tabcompletion module 2026-06-18 12:20:25 +02:00
daniel 3f91e85a3f fix: fix underflow in tabcompletion module 2026-06-18 12:12:51 +02:00
daniel cb1eb908aa feat: complete command completion in shell 2026-06-18 07:56:00 +02:00
daniel 2b8534f2b3 fix: terminal/klog build fix 2026-06-17 18:24:46 +02:00
daniel 41502ad35f fix: fix Terminal zoom inconsistency 2026-06-17 18:18:46 +02:00
daniel 8a838af5da fix: fix Terminal scrolling issue at zoom 2026-06-17 18:10:07 +02:00
daniel 75411e953f feat: add Console Session mode 2026-06-17 18:00:47 +02:00
daniel 36b03f070d feat: add cwd file matching to shell tab completion 2026-06-17 07:58:41 +02:00
daniel 6d6a41e366 feat: add support for shell builtins to command completion 2026-06-16 18:41:56 +02:00
daniel dea5d1ca59 fix: ensure tab completion is not reliant on single-digit volume number 2026-06-16 14:54:49 +02:00