Skip to content

Commit

Permalink
Removed legacy x86 Kernel (#1131)
Browse files Browse the repository at this point in the history
* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel

* - Removed legacy x86 Kernel
  • Loading branch information
tgiphil committed Aug 29, 2023
1 parent 6afbdc7 commit 924de3d
Show file tree
Hide file tree
Showing 87 changed files with 86 additions and 8,935 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ jobs:
run: nuget pack Source\Mosa.Packages\Mosa.DeviceSystem.nuspec -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Create Package - Mosa.Runtime
run: nuget pack Source\Mosa.Packages\Mosa.Runtime.nuspec -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Create Package - Mosa.Platform.x86
run: nuget pack Source\Mosa.Packages\Mosa.Platform.x86.nuspec -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Create Package - Mosa.Kernel.x86
run: nuget pack Source\Mosa.Packages\Mosa.Kernel.x86.nuspec -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Create Package - Mosa.Platform.x64
run: nuget pack Source\Mosa.Packages\Mosa.Platform.x64.nuspec -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Create Package - Mosa.Platform.x86
run: nuget pack Source\Mosa.Packages\Mosa.Platform.x86.nuspec -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Store Nuget Packages Artifact
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -108,12 +106,10 @@ jobs:
run: dotnet nuget push bin\nupkg\Mosa.DeviceSystem.${{ env.BUILD_VERSION }}.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish Package - Mosa.Runtime
run: dotnet nuget push bin\nupkg\Mosa.Runtime.${{ env.BUILD_VERSION }}.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish Package - Mosa.Platform.x86
run: dotnet nuget push bin\nupkg\Mosa.Platform.x86.${{ env.BUILD_VERSION }}.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish Package - Mosa.Kernel.x86
run: dotnet nuget push bin\nupkg\Mosa.Kernel.x86.${{ env.BUILD_VERSION }}.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish Package - Mosa.Platform.x64
run: dotnet nuget push bin\nupkg\Mosa.Platform.x64.${{ env.BUILD_VERSION }}.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish Package - Mosa.Platform.x86
run: dotnet nuget push bin\nupkg\Mosa.Platform.x86.${{ env.BUILD_VERSION }}.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json

linux-build:
name: Linux Build
Expand Down Expand Up @@ -306,7 +302,7 @@ jobs:
with:
name: windows-build-artifact
path: bin
- name: Demo Test - BareMetal CoolWorld
- name: Demo Test - BareMetal HelloWorld
run: bin\Mosa.Tool.Launcher.Console.exe bin\Mosa.BareMetal.HelloWorld.x86.dll -o${{ matrix.optimization }} -check -test
- name: Demo Test - BareMetal GraphicalWorld
run: bin\Mosa.Tool.Launcher.Console.exe bin\Mosa.BareMetal.GraphicalWorld.x86.dll -o${{ matrix.optimization }} -check -test -vmware-svga -include bin\Include
Expand Down Expand Up @@ -338,7 +334,7 @@ jobs:
run: sudo apt-get -y -o Acquire::Check-Valid-Until=false update
- name: Install Qemu and Dependencies
run: sudo apt-get -y -o Acquire::Retries=5 install qemu-system-x86
- name: Demo Test - BareMetal CoolWorld
- name: Demo Test - BareMetal HelloWorld
run: dotnet bin/Mosa.Tool.Launcher.Console.dll bin/Mosa.BareMetal.HelloWorld.x86.dll -o${{ matrix.optimization }} -check -test
- name: Demo Test - BareMetal GraphicalWorld
run: dotnet bin/Mosa.Tool.Launcher.Console.dll bin/Mosa.BareMetal.GraphicalWorld.x86.dll -o${{ matrix.optimization }} -check -test -vmware-svga -include bin/Include
Expand Down Expand Up @@ -368,7 +364,7 @@ jobs:
# path: bin
# #- name: Install Qemu
# # run: brew install qemu
# - name: Demo Test - BareMetal CoolWorld
# - name: Demo Test - BareMetal HelloWorld
# run: dotnet bin/Mosa.Tool.Launcher.Console.dll bin/Mosa.BareMetal.HelloWorld.x86.dll -o${{ matrix.optimization }} -check -test
# - name: Demo Test - BareMetal GraphicalWorld
# run: dotnet bin/Mosa.Tool.Launcher.Console.dll bin/Mosa.BareMetal.GraphicalWorld.x86.dll -o${{ matrix.optimization }} -check -test
3 changes: 3 additions & 0 deletions Demos/Run-BareBones.TestWorld.x86.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd %~dp0
cd ..\bin
Mosa.Tool.Launcher -autostart -oMax -output-asm -output-debug -output-hash Mosa.BareBones.TestWorld.x86.dll
2 changes: 1 addition & 1 deletion Demos/Run-Demo.TestWorld.x86.sh → Demos/Run-BareBones.TestWorld.x86.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd ../bin
./Mosa.Tool.Launcher.Console -autostart -oMax -output-asm -output-debug -output-hash Mosa.Demo.TestWorld.x86.dll
./Mosa.Tool.Launcher.Console -autostart -oMax -output-asm -output-debug -output-hash Mosa.BareBones.TestWorld.x86.dll
3 changes: 0 additions & 3 deletions Demos/Run-Demo.TestWorld.x86.bat

This file was deleted.

2 changes: 1 addition & 1 deletion Source/Docs/command-line-arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Command Line Arguments

The command line arguments serve as shortcuts to the common set of :doc:`settings-options` used by the MOSA tools.

.. tip:: Specific settings may also be specified on the command line using the ``-setting`` argument (or using the shorthand version ``-s`` ). For example to set the ``Compiler.OutputFile`` setting with ``Mosa.HelloWorld.x86.bin``, pass the following two arguments ``-setting Compiler.OutputFile=Mosa.HelloWorld.x86.bin`` on the command line.
.. tip:: Specific settings may also be specified on the command line using the ``-setting`` argument (or using the shorthand version ``-s`` ). For example to set the ``Compiler.OutputFile`` setting with ``Mosa.BareMetal.HelloWorld.x86.bin``, pass the following two arguments ``-setting Compiler.OutputFile=Mosa.BareMetal.HelloWorld.x86.bin`` on the command line.

Below are the command line arguments available:

Expand Down
27 changes: 9 additions & 18 deletions Source/Docs/demos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,21 @@ MOSA includes three demos applications to demostrate various capabilities of the

.. tip:: You can start any demo by launching its respective script in the Demos folder.

HelloWorld
==========

The **HelloWorld** demo is the classic rendition of `"Hello, World!" <https://en.wikipedia.org/wiki/%22Hello,_World!%22_program>`__, except it does not actually display those words. Instead it displays basic information hardware information, such as the BIOS information, the CMOS time, and the Multiboot memory map.

.. image:: images/mosa-demo-helloworld.png

TestWorld
GraphicalWorld
=========

The **TestWorld** demo performs version simple, basic tests to validate the compiler, runtime, and kernel functionality.
The **GraphicalWorld** demo uses, as its name would suggest, the GPU and some other features offered by MOSA to make a nice, graphical demo.

.. image:: images/mosa-demo-testworld.png
.. image:: images/mosa-demo-graphicalworld.png

CoolWorld
=========
HelloWorld
==========

The **CoolWorld** demo utilitizes the MOSA device drivers system to enumerate hardware devices and instantiate drivers, such as for the IDE controller, disk devices, and FAT file system.
The **HelloWorld** demo is the classic rendition of `"Hello, World!" <https://en.wikipedia.org/wiki/%22Hello,_World!%22_program>`__, except it does not actually display those words. Instead it implements a basic shell with a few basic commands, like boot information, memory usage, and device information.

.. image:: images/mosa-demo-coolworld.png
.. image:: images/mosa-demo-helloworld.png

SVGAWorld
TestWorld
=========

The **SVGAWorld** demo uses the VMware SVGA II driver for graphics, and uses multiple other features (similar to the ones used by **CoolWorld**) offered by MOSA to make a nice demo.

.. image:: images/mosa-demo-svgaworld.webp
The **TestWorld** demo is a barebones demo meant to show how you can create a barebones kernel using MOSA.
4 changes: 2 additions & 2 deletions Source/Docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ You can then create a new project based on one of the templates you've just inst

.. code-block:: bash
dotnet new mosastrx86 -o MyMosaKernel
dotnet new mosakrnl -o MyMosaKernel
cd MyMosaKernel
.. tip:: ``mosastrx86`` is a template for a 32-bit x86 kernel. It is currently the only template, although more are to come in the future.
.. tip:: ``mosakrnl`` is a template for a cross-architecture kernel.

You may now want to build your newly created kernel using the following command:

Expand Down
Binary file modified Source/Docs/images/mosa-demo-helloworld.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 13 additions & 19 deletions Source/Docs/mosa-project-structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ MOSA Project Structure
MOSA has a lot of projects, which can seem daunting at first. This page will exclusively cover all the types of projects that MOSA has, and explain what they are for.

********************************
Mosa.Demo.* and Mosa.BareMetal.*
Mosa.BareMetal.*
********************************

Those are demo projects, for **Mosa.Kernel**.* and **Mosa.Kernel.BareMetal**.* projects respectively.
Those are the demo projects using the **Mosa.Kernel.BareMetal** kernel.

***************
Mosa.Compiler.*
Expand All @@ -20,45 +20,39 @@ Those projects make the MOSA compiler. You can learn more about it :doc:`here<co
Mosa.DeviceDriver
*****************

This project hosts all the drivers MOSA offers. They're not required to run a demo, nor are they required if you want to make your own drivers.
This project hosts all the drivers MOSA offers, whether they're ISA, PCI, USB, etc...

*****************
Mosa.DeviceSystem
*****************

This project contains all kinds of miscelleanous classes and utilities, useful to device drivers and other stuff. It can almost be fully used outside MOSA (it does contain a few classes related to MOSA, like ``ConstrainedPointer``) and can serve as a great utilities project. For example, it contains classes for generating a VDI header or VHD footer, MBR generation and some PCI utilities. But it contains much more!

It's also not required to run a demo, however it is a dependecy of **Mosa.DeviceDriver**.
It is a dependecy of **Mosa.DeviceDriver**.

***************
Mosa.FileSystem
***************

This project is the MOSA implementation for the file system. It currently only supports FAT32, but it aims to support more in the future.

*************
Mosa.Kernel.*
*************

Those projects are the MOSA kernel implementations for various platforms. They're not strictly required to create an OS with MOSA though, if you want to implement it yourself.

*********************
Mosa.Kernel.BareMetal
*********************

This project is part of the :doc:`BareMetal<baremetal>` experiment, and aims to unify platform-agnostic code into one project, for other projects to use. It provides a **Platform** class, in which specific BareMetal kernel implementations can implement those functions via **plugs**.
This project is the mainline, platform-agnostic implementation of the MOSA kernel.

***********************
Mosa.Kernel.BareMetal.*
***********************

Those projects implement the internal, unimplemented functions of **Mosa.Kernel.BareMetal** as **plugs**.
Those projects implement the internal, platform-specific functions of **Mosa.Kernel.BareMetal** as **plugs**.

***********
Mosa.Korlib
***********

This project is the MOSA implementation of the .NET standard library. While it is currently missing a lot of features, it is highly portable and can be used in any project. You can also use your own implementation if you want to.
This project is the MOSA implementation of the .NET standard library. While it is currently missing a lot of features, it is highly portable and can be used in any project requiring a custom core library.

***************
Mosa.Platform.*
Expand All @@ -70,27 +64,27 @@ Those projects host the code generation stages of their respective platform for
Mosa.Plug.Korlib
****************

While the MOSA implementation of the .NET standard library is portable, it does need some functions implemented by the compiler in order to fully benefit from its potential. This is where this project comes in. It replaces those internal, unimplemented functions with **plugs**. It has a couple of dependencies on other projects, including **Mosa.Runtime** for example. However, it does **not** have dependencies on projects which are built on a specific platform (like **Mosa.Kernel.x86** for example).
While the MOSA implementation of the .NET standard library is portable, it does need some functions implemented by the compiler in order to fully benefit from its potential. This is where this project comes in. It replaces those internal, unimplemented functions with **plugs**. It has a couple of dependencies on other projects, including **Mosa.Runtime** for example. However, it does **not** have dependencies on projects which are built on a specific platform (like **Mosa.Kernel.BareMetal.x86** for example).

******************
Mosa.Plug.Korlib.*
******************

Those platform-specific projects are identical to the one above, except they do use platform-specific dependencies like **Mosa.Kernel.x86** in the case of **Mosa.Plug.Korlib.x86**. Those are used if the **plug** must be implemented via a platform-specific standard or device.
Those platform-specific projects are identical to the one above, except they do use platform-specific dependencies like **Mosa.Runtime.x86** in the case of **Mosa.Plug.Korlib.x86**. Those are used if the **plug** must be implemented via platform-specific instructions for example.

************
Mosa.Runtime
************

This project provides the boot function and process for the kernel, which the compiler integrates in the final binary. It is therefore strictly required, even if you don't use any of the other projects in your OS.
This project provides the boot function and process for the kernel, which the compiler integrates in the final binary.

However, it also provides classes like Pointer or GC.

**************
Mosa.Runtime.*
**************

Those projects help in providing additional functions for using native instructions of the specific platform. For the platform you're using, that project is not strictly required to create an OS with MOSA.
Those projects help in providing additional functions for using native instructions of the specific platform.

***********
Mosa.Tool.*
Expand All @@ -108,7 +102,7 @@ Those projects provide common code for other projects to use, such as the tools.
Mosa.UnitTests.*
****************

Those projects host the unit tests, which are triggered in pull requests and main repository commits, but can also :doc:`be triggered manually<unit-tests>`.
Those projects host the unit tests, which are automatically triggered in pull requests and main repository commits, but can also :doc:`be triggered manually<unit-tests>`.

****************
Mosa.Workspace.*
Expand All @@ -120,4 +114,4 @@ Those projects are simple playgrounds, which are there to be able to test stuff,
Other projects
**************

If some projects are not mentioned here, it's probably because they're miscelleanous and/or do not fit in any of the categories cited above.
If some projects are not mentioned here, it's probably because they're miscellaneous and/or do not fit in any of the categories cited above.
10 changes: 5 additions & 5 deletions Source/Docs/tool-compiler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ The compiler is invoked via Command Line:

.. code-block:: console
Mosa.Tool.Compiler -o Mosa.Demo.HelloWorld.x86.bin Mosa.Demo.HelloWorld.x86.dll
Mosa.Tool.Compiler -o Mosa.BareMetal.HelloWorld.x86.bin Mosa.BareMetal.HelloWorld.x86.dll
Output:

.. code-block:: console
MOSA Compiler, Version 2.0.0.0.
Copyright 2020 by the MOSA Project. Licensed under the New BSD License.
MOSA Compiler, Version 2.4.0.0.
Copyright 2023 by the MOSA Project. Licensed under the New BSD License.
Parsing options...
> Output file: Mosa.Demo.HelloWorld.x86.bin
> Input file(s): Mosa.Demo.HelloWorld.x86.dll
> Output file: Mosa.BareMetal.HelloWorld.x86.bin
> Input file(s): Mosa.BareMetal.HelloWorld.x86.dll
> Platform: x86
Compiling ...
Expand Down
6 changes: 3 additions & 3 deletions Source/Docs/tool-debugger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Under the hood, **MOSA Debugger** utilitizes the QEMU virtual machine emulator a
Usage
------

The **MOSA Debugger** can be launched by executing ``Mosa.Tool.Debugger``.
The **MOSA Debugger** can be launched by executing ``Mosa.Tool.Debugger``.

In addition, the tool can be launched from the command line with arguments:

.. code-block:: text
Mosa.Tool.Debugger Mosa.Demo.HelloWorld.x86.dll
Mosa.Tool.Debugger Mosa.BareMetal.HelloWorld.x86.dll
Command Line Options
--------------------

See the :doc:`command line arguments<command-line-arguments>` for a list of available options.
See the :doc:`command line arguments<command-line-arguments>` for a list of available options.
2 changes: 1 addition & 1 deletion Source/Docs/tool-explorer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In addition, the tool can be launched from the command line with arguments:

.. code-block:: text
Mosa.Tool.Explorer Mosa.Demo.HelloWorld.x86.dll -filter System.String::get_Length
Mosa.Tool.Explorer Mosa.BareMetal.HelloWorld.x86.dll -filter System.String::get_Length
Command Line Options
--------------------
Expand Down
6 changes: 3 additions & 3 deletions Source/Docs/tool-launcher-console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The **MOSA Launcher Console** is a console application that automates the entire
Usage
-----

A quick example that compiles `Mosa.Demo.TestWorld.x86.dll` demo with `-oMax` (all optimization enabled) and launches it using `QEMU`:
A quick example that compiles `Mosa.BareMetal.HelloWorld.x86.dll` demo with `-oMax` (all optimization enabled) and launches it using `QEMU`:

.. code-block:: text
Mosa.Tool.Launcher.Console -oMax Mosa.Demo.TestWorld.x86.dll
Mosa.Tool.Launcher.Console -oMax Mosa.BareMetal.HelloWorld.x86.dll
.. code-block:: text
Expand All @@ -26,7 +26,7 @@ A quick example that compiles `Mosa.Demo.TestWorld.x86.dll` demo with `-oMax` (a
Compiling: 4.66 secs: Compile Completed
Generating Image: img
Launching Application: ..\Tools\QEMU\qemu-system-i386.exe
Arguments: -L "..\Tools\QEMU" -cpu qemu32,+sse4.1 -serial null -hda "C:\Users\phil\AppData\Local\Temp\MOSA\Mosa.Demo.TestWorld.x86.img"
Arguments: -L "..\Tools\QEMU" -cpu qemu32,+sse4.1 -serial null -hda "C:\Users\phil\AppData\Local\Temp\MOSA\Mosa.BareMetal.HelloWorld.x86.img"
Command Line Options
--------------------
Expand Down
2 changes: 1 addition & 1 deletion Source/Docs/tool-launcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In addition, the tool can be launched from the command line with arguments:

.. code-block:: text
Mosa.Tool.Launcher Mosa.Demo.HelloWorld.x86.dll
Mosa.Tool.Launcher Mosa.BareMetal.HelloWorld.x86.dll
Command Line Options
Expand Down
6 changes: 0 additions & 6 deletions Source/Mosa.Demo.TestWorld.x86/Asm/Return10.asm

This file was deleted.

Binary file removed Source/Mosa.Demo.TestWorld.x86/Asm/Return10.o
Binary file not shown.

0 comments on commit 924de3d

Please sign in to comment.