Commit Graph

376 Commits

Author SHA1 Message Date
daniel 922fafb930 feat: add new docs & tutorials; cleanup Main.cpp 2026-07-08 16:56:05 +02:00
daniel c35660be74 feat: release notes for 0.1.6; archive 0.1.6 iso; bump version to 0.1.7
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 16:36:49 +02:00
daniel ce5f407513 fix: boot failure on VirtualBox legacy-BIOS VMs (AC'97 probed as HDA)
VirtualBox default VMs expose an AC'97 audio controller (8086:2415,
class 04/subclass 01) whose BAR0 is an I/O-space BAR. The IntelHDA
driver matched any Intel multimedia subclass, and ReadBar0 masked the
I/O BAR's port number into a bogus 'physical address' that MapMMIO
panicked on (non-page-aligned), halting boot.

Two fixes:
- IntelHDA now matches only subclass 0x03 (HD Audio); AC'97 (0x01) is
  a different programming model and is not claimed.
- ReadBar0 returns 0 (no usable MMIO BAR) for I/O-space BARs instead
  of handing a port number to MapMMIO.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 16:33:54 +02:00
daniel 24e5973c4b feat: release notes for 0.1.5; archive 0.1.5 iso; bump version to 0.1.6
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 16:07:54 +02:00
daniel 37c51f31fc 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 <noreply@anthropic.com>
2026-07-08 16:07:27 +02:00
daniel 16e6482bb0 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 <noreply@anthropic.com>
2026-07-08 15:15:47 +02:00
daniel d7bc6c5c91 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 <noreply@anthropic.com>
2026-07-08 15:09:22 +02:00
daniel 80fb44bee9 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 <noreply@anthropic.com>
2026-07-08 12:25:39 +02:00
daniel c2cbb47e8f 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 <noreply@anthropic.com>
2026-07-08 12:16:55 +02:00
daniel 1496ddba87 fix: A2DP reconnect fix 2026-07-08 11:57:52 +02:00
daniel 1fd63d8d1f 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 <noreply@anthropic.com>
2026-07-08 10:57:48 +02:00
daniel c03abeb2a1 feat: update montaukos.org site footer text 2026-07-08 10:27:55 +02:00
daniel 2ace2509be feat: add header dependency tracking for programs 2026-07-08 10:24:21 +02:00
daniel 3a446bad00 cleanup: rename shared libraries to remove 'lib' prefix 2026-07-08 10:12:32 +02:00
daniel 75ef340359 cleanup: remove test programs/libraries 2026-07-08 10:06:07 +02:00
daniel a39bc77ea5 fix: fix desktop app loading cap 2026-07-08 10:00:45 +02:00
daniel d9d32deb3e feat: reliable Bluetooth pairing, reconnection, and A2DP setup
Four fixes, each a root cause verified on hardware (AX211 + Bose QC Ultra):

1. Link Key Request Reply TRUNCATED: the pending-command queue's params
   buffer was 16 bytes; the reply is 22 (addr 6 + key 16).  The controller
   got 10 key bytes -> every stored-key reconnection failed authentication
   (status 5) since 2026-06-03 (c119a70).  Fresh pairings never touch this
   path, which kept the bug perfectly disguised as a headset quirk.

2. Secure Connections host support (0x0C7A) now enabled: bonds are minted
   as P-256 (Type=7), interoperable with BlueZ's, and SC-bonded peers can
   actually authenticate us.

3. Never write the BD_ADDR override (0xFC31) with the factory address:
   it desyncs the firmware's crypto address from the on-air one and ALL
   SSP pairing fails with status 5.  (The spoofing feature itself was
   already known-cosmetic: the baseband answers pages on the factory
   address regardless.)  import-bluez-bond.sh now removes the override.

4. A2DP channel setup: wait for Encryption Change before dialing L2CAP
   (post-SSP sinks ignore unencrypted CONN_REQ), and LISTEN 2.5s first --
   on reconnection the sink dials AVDTP itself and ignores our dials while
   doing so.  Ends the historical connRsp=FFFF retry-then-give-up failures.

Plus: queued security replies now log delivery + controller status.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 19:46:02 +02:00
daniel 13a841d0f2 feat: auth-failure bond recovery + BlueZ bond import for dual-boot BT
- On Authentication Failure (Auth Complete status!=0 -- previously swallowed
  silently -- or disconnect reason 0x05), drop the stale local link key so
  the next connect falls back to fresh SSP pairing instead of failing
  identically forever (BlueZ behavior).  Log the link-key exchange.

- scripts/import-bluez-bond.sh: copy a BlueZ link key into the MontaukOS
  key store on the installed root.  Root cause: the AX211 BD_ADDR override
  (0xFC31) is cosmetic -- the baseband answers pages on the FACTORY address,
  so peers see Linux and MontaukOS as ONE device with ONE key slot, and each
  OS's pairing clobbers the other's key.  Sharing identity + key ends the
  fight: both OSes reconnect (incl. autoconnect) without re-pairing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 13:44:47 +02:00
daniel 5314af3718 feat: fully async Intel BT firmware bring-up + HCI multi-packet event reassembly
The BT firmware download now runs from the idle loop after boot (zero boot
stall), completing the async goal.  What made every earlier deferral attempt
fail was a months-latent HCI-layer bug, not the deferred environment:

  WaitCommandComplete returned after the FIRST USB packet of an event, but
  events larger than the 64-byte interrupt max-packet (like the AX211's
  96-byte FC05 TLV version response) span several packets.  Sending the next
  command while the tail of the previous response was still in flight wedges
  the AX211 bootloader into permanently ignoring commands.  Boot-time flanterm
  rendering added milliseconds between commands and accidentally paced the
  protocol past the race -- which is why the synchronous bring-up always
  worked and every log-suppressed (deferred) bring-up went mute at FC05 #2,
  regardless of scheduling/MSI/xHCI fixes.

  Fix: reassemble multi-packet Command Complete/Status events in the
  transfer callback; the mailbox is marked ready only when the declared
  event length has fully arrived.  This inherently paces command flow and,
  as a bonus, the TLV version read now sees the full response (sbe_type
  present -> ECDSA/RSA selection is no longer a guess).

Also: per-slot EP0 completion tracking in the xHCI (a waiting ControlTransfer
can no longer be released early by another device's EP0 completion).

Verified on the AX211: instant boot, background download, real BD_ADDR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 12:31:30 +02:00
daniel 37f5ff892c feat: fast Intel BT firmware download (bulk-pipelined payload, no timeout burns)
Two fixes, verified on the AX211 (8087:0033), ibt-1040-0041.sfi, 720 KB:

1. TryHeader waited 1500+2000 ms for secure-send results after the CSS and
   key/signature sends, but on success this controller stays SILENT until
   the end of the whole download (traced) -- both timeouts always burned in
   full.  A rejection arrives within milliseconds, so 250 ms windows lose
   nothing and save ~3 s per cold boot.

2. The payload now goes over the bulk OUT endpoint with up to 7 fragments
   in flight (the btusb bootloader path for 0xFC09), replacing ~2900
   synchronous 3-stage EP0 control transfers.  Headers stay on EP0; the
   ACL TX DMA ring is reused (no ACL header, no NOCP credit accounting).
   DrainBulkTx() ensures all bytes reach the controller before waiting for
   the download-complete result.

Also in this branch since main: IRQ-safe BT-TRACE ring (KernelLogStream in
TransferCallback deadlocked on the terminal Mutex from MSI context), xHCI
interrupt-IN ZLP length fix, always-re-arm of the BT event pipe,
InPollContext same-core owner check, TLV version read retry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 11:52:21 +02:00
daniel 4cae45f7d1 merge main (charmap) into BT wip branch
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 11:37:11 +02:00
daniel f7ec6c69d3 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 <noreply@anthropic.com>
2026-07-06 21:26:29 +02:00
daniel 4301f39a9e 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 <noreply@anthropic.com>
2026-07-06 21:24:27 +02:00
daniel 8eadf19e97 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 <noreply@anthropic.com>
2026-07-06 21:21:51 +02:00
daniel 55867c841a 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 <noreply@anthropic.com>
2026-07-06 21:18:44 +02:00
daniel f8327c6b8c 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 <noreply@anthropic.com>
2026-07-06 21:13:30 +02:00
daniel 743eca2051 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 <noreply@anthropic.com>
2026-07-06 21:07:19 +02:00
daniel fdf586305b 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 <noreply@anthropic.com>
2026-07-06 21:01:51 +02:00
daniel 95beb8ae1a 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 <noreply@anthropic.com>
2026-07-06 20:54:37 +02:00
daniel c6a4e8d008 wip: BT firmware debugging 2026-07-06 18:17:06 +02:00
daniel 02a0cf66ad 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 <noreply@anthropic.com>
2026-07-06 18:07:23 +02:00
daniel f437601b76 wip: async BT firmware download attempt — DO NOT MERGE, breaks AX211 bring-up
Deferring the Intel BT firmware download off the boot path made the AX211
bootloader stop answering after the first FC05; even the final synchronous
revert freezes boot, so one of the 'neutral' fixes kept in this diff breaks
the bring-up on its own (candidates: BT-TRACE logging inside TransferCallback,
unconditional interrupt-IN re-queue after error completions on a halted EP,
xHCI interrupt-IN ZLP len fix interacting with HID, InPollContext owner
check).  Full history + next experiments in memory notes, 2026-07-05/06.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:46:06 +02:00
daniel fcf8ae1e0b feat: add Power GUI app (powermgr) 2026-07-05 11:34:27 +02:00
daniel 35e5aba23f feat: HWP scaling, C1E, closed-loop thermal governor for Intel CPUs 2026-07-05 10:51:11 +02:00
daniel 46c56b057b fix: RTL-SDR bug fixes and accuracy improvements 2026-07-03 10:36:41 +02:00
daniel 5363ca5265 feat: add RTL-SDR, R820t drivers, radio APIs, and sdr demo tool 2026-06-22 11:49:16 +02:00
daniel c8d8ed6ebe cleanup: Bluetooth/A2DP code cleanup 2026-06-21 15:01:37 +02:00
daniel 4c8e1c3591 cleanup: purge unused sysinfo icon field from DesktopState 2026-06-21 14:33:50 +02:00
daniel 576ea2b84d fix: remove inaccurate virtual path (virtual://apps) 2026-06-21 14:29:27 +02:00
daniel 4596f8d708 feat: release notes for 0.1.4; archive 0.1.4 iso; bump version to 0.1.5 2026-06-21 12:46:48 +02:00
daniel 4cda83aa58 feat: auto-generate and verify TCC C API syscall numbers 2026-06-21 12:32:22 +02:00
daniel e0db67cb79 feat: add btbonds command 2026-06-21 11:16:12 +02:00
daniel c92993a16a cleanup: rename Graphics:Cursor => Graphics::Framebuffer 2026-06-21 10:42:27 +02:00
daniel 772eaee9f4 feat: introduce bootloader-agnostic Boot Contract, add btlist command to list connected Bluetooth devices 2026-06-20 21:25:24 +02:00
daniel de871ac402 fix: lock crash report ring buffer (SMP race) and guard crashpad crash loop 2026-06-19 19:36:21 +02:00
daniel 820b908b80 fix: convention fix, performance improvement in kcp::cstringstream 2026-06-19 18:37:19 +02:00
daniel d68dd6979d cleanup: remove early kernel-mode PanelBar functionality 2026-06-19 18:29:37 +02:00
daniel f2aaa39ca6 feat: add proclist command, fix TLS bug, link libc for system programs 2026-06-19 12:03:12 +02:00
daniel ac25a4edd5 feat: add support for console sessions to crashpad and crash handling in kernel 2026-06-18 12:56:29 +02:00
daniel e3c551b9f6 fix: fix off-by-one in tabcompletion module 2026-06-18 12:21:19 +02:00