feat: add new docs & tutorials; cleanup Main.cpp

This commit is contained in:
2026-07-08 16:56:05 +02:00
parent c35660be74
commit 922fafb930
16 changed files with 603 additions and 33 deletions
-13
View File
@@ -186,12 +186,6 @@ extern "C" void kmain() {
Fs::InitializeBootFilesystems(boot.modules);
// EXPERIMENT (wip/bt-deferred-init): the Bluetooth firmware bring-up is
// NOT run here -- the idle loop picks it up via ServiceDeferredInit()
// after boot, with CPU reservation, the IRQ-safe trace ring, and the
// bulk-pipelined download. Earlier deferral attempts (2026-07-05) made
// the AX211 stop answering after the first FC05; this run captures a
// ring trace of exactly what the event pipe delivers in deferred mode.
Hal::LoadTSS();
montauk::abi::InitializeSyscalls();
@@ -202,13 +196,6 @@ extern "C" void kmain() {
// Boot Application Processors (all subsystems ready, APs can schedule)
Smp::BootAPs(boot.smp);
// The Bluetooth firmware bring-up is deferred to the idle loop
// (ServiceDeferredInit from IdleOnce) so its download never stalls boot.
// Requires the HCI multi-packet event reassembly in Hci.cpp: without it,
// the next command races the tail of a multi-packet response and wedges
// the AX211 bootloader -- which only ever worked before because boot-time
// flanterm rendering accidentally paced the commands.
// Flush any stale PS/2 mouse bytes that accumulated during boot
// (edge-triggered IRQs can be lost while spinlocks disable interrupts)
Drivers::PS2::Mouse::FlushState();
+34
View File
@@ -373,6 +373,40 @@ License: Unsplash License (https://unsplash.com/license)
does not include the right to compile images from Unsplash to replicate a
similar or competing service.
================================================================================
15. Flanterm (text renderer for kernel debug log)
================================================================================
Compiled into the MontaukOS kernel (see kernel/src/Libraries/flanterm).
The files are taken unmodified from the flanterm project.
Copyright (C) 2022-2026 Mintsuki and contributors.
Upstream: https://github.com/Mintsuki/Flanterm
(formerly https://codeberg.org/Mintsuki/Flanterm)
License: BSD-2-Clause license (https://raw.githubusercontent.com/Mintsuki/Flanterm/refs/heads/trunk/LICENSE)
Copyright (C) 2022-2026 Mintsuki and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================================================
For licensing inquiries regarding MontaukOS itself, contact: daniel@nexlink.cloud
@@ -0,0 +1,131 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS User's Manual">
<title>Connectivity - MontaukOS Tutorials</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
.doc-list {
list-style: none;
padding: 0;
}
.doc-list li {
margin: 0.75em 0;
}
.doc-list a {
font-weight: 600;
}
.doc-list p {
margin: 0.25em 0 0 1.5em;
color: #555;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">User's Manual</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h2>Connecting to a network (and to the Internet) on MontaukOS</h2>
</div>
<hr>
<p>This tutorial explains how to connect to your local network on MontaukOS.</p>
<hr><br>
<p>
MontaukOS includes drivers for Intel Ethernet adapters, including virtualized adapters found on QEMU and VirtualBox, and adapters used on a wide variety of desktops and laptops. Wireless networking via Wi-Fi is currently not supported.<br><br>
For most Ethernet configurations, MontaukOS should automatically connect to your local network and obtain an IP address via the DHCP protocol. You can review your network connection using the Network configuration applet:
<ol>
<li>Open the applications menu and click on the 'Settings' entry.</li>
<li>Double-click the 'Network' applet from within the Settings virtual folder.</li>
</ol>
<blockquote>
<img src="images/networkapplet-overview.png" alt="">
<p>The Network applet displayed on a QEMU/KVM virtual machine (MontaukOS 0.1.5)</p>
</blockquote>
If you need to manually configure your connection - such as by setting up a static IP - you can use the "Configure" tab.
Configuration options include the IP address, subnet mask, gateway IP, and DNS server.
<blockquote>
<img src="images/networkapplet-configure.png" alt=""><br><br>
</blockquote>
The 'DHCP' button on the toolbar invokes the DHCP client manually, in the background. MontaukOS otherwise runs the DHCP client automatically once every system startup.<br><br>
If the Network applet reports that there is no network adapter present, it is very likely that MontaukOS does not have network drivers for your device. For further troubleshooting, you can use the Devices (<code>devexplorer</code>) app to review
devices detected by the system, or use the Kernel Log tool to inspect relevant kernel log lines.
</p>
<ol>
</ol><br>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+13 -6
View File
@@ -89,19 +89,26 @@
<div class="main">
<div class="center">
<h1>User's Manual</h1>
<h1>User's Tutorials</h1>
</div>
<hr>
<p>
This volume is the manual for MontaukOS end users, covering installation, configuration,
and everyday use of the operating system and its applications.
This volume contains tutorials for users covering everyday use of the MontaukOS system.
</p>
<p>
No pages yet.
</p>
<h2>Getting started</h2>
<ul>
<li><a href="initialsetup.html">Initial setup (account creation, time zone)</a></li>
<li><a href="connectivity.html">Connecting to a network (and the Internet)</a></li>
</ul>
<h2>Programming</h2>
<ul>
<li><a href="tutorial-programming.html">Writing and running a "Hello, World" program in Lua</a></li>
<li><a href="tutorial-programming-c.html">Writing and running a "Hello, World" program in C</a></li>
</ul>
<hr>
@@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS User's Manual">
<title>Initial Setup - MontaukOS Tutorials</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
.doc-list {
list-style: none;
padding: 0;
}
.doc-list li {
margin: 0.75em 0;
}
.doc-list a {
font-weight: 600;
}
.doc-list p {
margin: 0.25em 0 0 1.5em;
color: #555;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">User's Manual</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h2>Initial Setup on MontaukOS</h2>
</div>
<hr>
<p>This tutorial explains how to create your first account and set your time zone on MontaukOS.</p>
<hr>
<p>
<h3>Account creation and login</h3>
When you successfully boot MontaukOS for the first time, you should see the 'MontaukOS Setup' window, as depicted below.
<br><br><img width=700 src="images/initialsetup.png" alt=""><br>
<ol>
<li>It is recommended to select a new username for your account rather than keeping the default username 'admin'.</li>
<li>Select a display name for your account.</li>
<li>Choose a password for your account, and enter it in both the 'Password' and 'Confirm Password' fields.</li>
<li>Click 'Create Account'.</li>
<li>First-time setup is complete. Keep the 'Desktop' session selected and use the credentials you just created to log in to the system.</li>
</ol>
<h3>Time zone selection</h3>
<ol>
<li>Click on the application menu icon located at the top-left corner of the desktop, and click the 'Settings' entry.</li>
<li>Double-click the 'Time Zone' icon within the virtual 'Settings' folder.</li>
<li>The default time zone is Oslo, Norway. To adjust your time zone, scroll along the left pane (countries) and select your country or region. Then, select the city closest to your location on the right pane.</li>
<li>Click 'Apply'.</li>
</ol>
<blockquote>
<img src="images/timezone.png" alt="">
</blockquote>
</p>
<ol>
</ol><br>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
@@ -0,0 +1,143 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS User's Manual">
<title>C Hello World - MontaukOS Tutorials</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
.doc-list {
list-style: none;
padding: 0;
}
.doc-list li {
margin: 0.75em 0;
}
.doc-list a {
font-weight: 600;
}
.doc-list p {
margin: 0.25em 0 0 1.5em;
color: #555;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">User's Manual</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h2>Writing and running a "Hello, World" program in C</h2>
</div>
<hr>
<p>This tutorial explains how to create and run a simple program in the C programming language (using the tcc C compiler) on MontaukOS.</p>
<hr><ol>
<li>Open the Text Editor by navigating to the 'Applications' section in the app menu.</li>
<blockquote><strong>Did you know?</strong> The MontaukOS Text Editor provides syntax highlighting for C and Lua files.</blockquote>
<li>Type:
<blockquote><pre>
#include &lt;stdio.h&gt;
int main(void) {
printf("Hello, World!\n");
return 0;
}
</pre></blockquote>
into the Text Editor window. This code outputs the string "Hello, World!" along with a line break to the Terminal.</li><br>
<blockquote>
<img src="images/texteditor-c.png" alt="">
</blockquote>
<li>Click the Save (floppy disk) button on the top panel. Choose a directory to save your code in - for example, your Home folder - give the source file a name ending in <i>.c</i>, and click 'Save'.</li>
<br><li>Open the Terminal app by navigating to the 'Applications' section in the app menu. You should see something like this appear on your screen:
<blockquote><pre>
MontaukOS
Copyright (c) 2025-2026 Montauk Operating System Project
Logged in as admin
Type 'help' for available commands.
0:/users/admin>
</pre>
</blockquote>
</li>
<li>If you saved your program's source file somewhere other than your Home directory, switch to the directory in which you saved your program using the <i>cd</i> command. For example, <code>cd Documents</code>.</li>
<br><li>Type '<code>tcc </code>' followed by your program's name, and then press enter. For example, '<code>tcc hello.c</code>'.</li>
<br><li>Run your program by typing its name without the '.c' extension, before pressing enter - for example, "hello".</li>
<br><li>You should see "Hello, World!" displayed in the Terminal window. Congratulations!</li>
<br>
<img src="images/terminal-c.png" alt="">
</ol><br>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
@@ -0,0 +1,139 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MontaukOS User's Manual">
<title>Lua Hello World - MontaukOS Tutorials</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Open Sans', Arial, sans-serif;
max-width: 960px;
margin: 0 auto;
padding: 1em;
line-height: 1.5;
display: flex;
gap: 2em;
}
p { margin: 0 0 0.5em; }
h2 { margin: 0.5em 0; }
.sidebar {
width: 160px;
flex-shrink: 0;
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin: 0.5em 0;
}
.sidebar a {
color: #0066CC;
text-decoration: none;
font-weight: 600;
}
.sidebar a:hover {
color: #004499;
text-decoration: underline;
}
.sidebar hr {
border: none;
border-top: 1px solid #999;
margin: 0.75em 0;
}
.main {
flex: 1;
min-width: 0;
}
a { color: #0000EE; }
a:visited { color: #0066CC; }
hr { border-style: solid; border-width: 1px 0 0 0; border-color: #999; }
.box {
border: 1px solid #999;
padding: 0.5em;
margin: 0.5em 0;
}
.doc-list {
list-style: none;
padding: 0;
}
.doc-list li {
margin: 0.75em 0;
}
.doc-list a {
font-weight: 600;
}
.doc-list p {
margin: 0.25em 0 0 1.5em;
color: #555;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="sidebar">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../index.html">Documentation</a></li>
</ul>
<hr>
<ul>
<li><a href="index.html" class="current">User's Manual</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h2>Writing and running a "Hello, World" program in Lua</h2>
</div>
<hr>
<p>This tutorial explains how to create and run a simple program in the Lua programming language on MontaukOS.</p>
<hr><ol>
<li>Open the Text Editor by navigating to the 'Applications' section in the app menu.</li>
<blockquote><strong>Did you know?</strong> The MontaukOS Text Editor provides syntax highlighting for C and Lua files.</blockquote>
<li>Type:
<blockquote><code>print("Hello, World!")</code></blockquote>
into the Text Editor window. This code outputs the string "Hello, World!" to the Terminal.</li><br>
<blockquote>
<img src="images/texteditor-lua.png" alt="">
</blockquote>
<li>Click the Save (floppy disk) button on the top panel. Choose a directory to save your code in - for example, your Home folder - give the program a name ending in <i>.lua</i>, and click 'Save'.</li>
<br><li>Open the Terminal app by navigating to the 'Applications' section in the app menu. You should see something like this appear on your screen:
<blockquote><pre>
MontaukOS
Copyright (c) 2025-2026 Montauk Operating System Project
Logged in as admin
Type 'help' for available commands.
0:/users/admin>
</pre>
</blockquote>
</li>
<li>If you saved your program somewhere other than your Home directory, switch to the directory in which you saved your program using the <i>cd</i> command. For example, <code>cd Documents</code>.</li>
<br><li>Type '<code>lua </code>' followed by your program's name, and then press enter. For example, '<code>lua hello.lua</code>'.</li>
<br><li>You should see "Hello, World!" displayed in the Terminal window. Congratulations!</li>
<br>
<img src="images/terminal-lua.png" alt="">
</ol>
<hr>
<h3>Beware!</h3>
<p>The Lua implementation on MontaukOS currently has known issues. For example, floating point calculations do not work.</p>
<hr>
<div class="center">
<a href="../index.html">Back to Documentation Index</a>
</div>
</div>
</body>
</html>
+9 -14
View File
@@ -145,42 +145,37 @@
<div class="sidebar">
<ul>
<li><a href="#about">About</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#applications">Applications</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li><a href="docs/index.html">Documentation</a></li>
<li><a href="https://git.montaukos.org/daniel/MontaukOS">Git</a></li>
</ul>
</div>
<div class="main">
<div class="center">
<h1>MontaukOS</h1>
<p>Modern and unique bare metal operating system</p>
</div>
<hr>
<h2 id="about">About</h2>
<p>
MontaukOS is a novel multi-user operating system that runs on bare metal.
It features its own preemptive multitasking kernel and modern userspace with its own desktop environment,
MontaukOS is a multi-user, multitasking operating system that runs on bare metal.
It features its own kernel and modern userspace with its own desktop environment,
targeting both emulators and real hardware.
</p>
<br>
<p>
MontaukOS is <strong>not</strong> Linux, nor is it Unix-like. Rather, it uses its own custom Montauk kernel with its own architecture and design.
</p>
<hr>
<h2 id="features">Features</h2>
<ul style="margin: 0 0 0.5em;">
<li>Real hardware support: Intel GPU, e100e Ethernet, HDA audio, Bluetooth</li>
<li>Storage: AHCI/NVMe SSDs, GPT partitions, ext2 and FAT32 filesystems</li>
<li>ACPI support including support for shutdown and partial support for S3 sleep</li>
<li>Hardware support: Intel GPU driver, Intel Ethernet adapters, HDA audio, Bluetooth connectivity and audio</li>
<li>AHCI/NVMe SSDs, GPT partitions, ext2 and FAT32 filesystems</li>
<li>ACPI support including support for thermal management, shutdown, and partial support for S3 sleep</li>
<li>USB and PS/2 input device support</li>
<li>Desktop environment with 12+ applications</li>
</ul>
<h2 id="applications">Applications</h2>
<h2 id="applications">Featured applications</h2>
<br>
<div class="app-grid">
<div class="app-item">
@@ -248,8 +243,8 @@ const slideshowItems = [
},
{
src: 'images/mtk_procmgr_devexplorer.png',
alt: 'MontaukOS screenshot showing Process Manager and Developer Explorer',
caption: 'Process Manager and Developer Explorer open on the MontaukOS desktop.'
alt: 'MontaukOS screenshot showing Process Manager and Device Explorer',
caption: 'Process Manager and Device Explorer open on the MontaukOS desktop.'
}
];