Skip to content

Commit

Permalink
Add Mosa.Tools.Package.Qemu, tidy up NuGet packages descriptions (#1056)
Browse files Browse the repository at this point in the history
* Squashed commit of the following:

commit 4444ed4
Author: Phil <phil@thinkedge.com>
Date:   Thu May 25 17:12:59 2023 -0700

    - Qemu tools

commit c03c37c
Merge: d758893 b60fb06
Author: Phil <phil@thinkedge.com>
Date:   Thu May 25 17:10:04 2023 -0700

    Merge commit 'b60fb0671d4d99fe490200634a1d50c5b547f8f2' into 343-WIP

commit b60fb06
Author: AnErrupTion <anerruption@disroot.org>
Date:   Thu May 11 10:05:44 2023 +0200

    Add Mosa.Tools.Package.Qemu, re-arrange Tools/qemu folder, tidy up NuGet packages descriptions

* - Fixes

* - Fixes

* - Fixes

* - Fixes

* - Fixes
  • Loading branch information
tgiphil committed May 26, 2023
1 parent d758893 commit 142fab6
Show file tree
Hide file tree
Showing 26 changed files with 459 additions and 774 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ jobs:
run: dotnet build Source/Mosa.Linux.sln
- name: Update Package Respository
run: sudo apt-get -y -o Acquire::Check-Valid-Until=false update
- name: Install Qemu
run: sudo apt-get install -y wget qemu qemu-system qemu-system-x86
- name: Install Qemu and Dependencies
run: sudo apt-get install -y qemu qemu-system qemu-system-x86 libsdl2-image-2.0-0 libvirglrenderer1 libpixman-1-0 libepoxy0 libdw1 libpng16-16 zlib1g libjpeg8 libudev1 libusb-1.0-0 liblzo2-2 libgio-cil libglib2.0-0 libzstd1 libncursesw6 libgbm1 libgtk-3-0 libgdk3.0-cil libcairo2 libgdk-pixbuf-2.0-0 libx11-6 libasound2 libpulse0 libsndio7.0 libbz2-1.0 libc6 libgcc-s1
- name: Unit Tests - All Performance Optimizations
run: dotnet bin/Mosa.Utility.UnitTests.dll -oMax -s Emulator.Display=false
- name: Unit Tests - No Optimizations
Expand Down
1 change: 1 addition & 0 deletions Source/Mosa.Demo.CoolWorld.x86/Mosa.Application/Shell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public static IConsoleApp AppFactory(string name)
"credits" => new Credits(),
"shutdown" => new Shutdown(),
"reboot" => new Reboot(),
"test" => new Test(),
_ => null
};
}
Expand Down
24 changes: 24 additions & 0 deletions Source/Mosa.Demo.CoolWorld.x86/Mosa.Application/Test.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) MOSA Project. Licensed under the New BSD License.

using Mosa.Demo.AppSystem;

namespace Mosa.Demo.Application;

/// <summary>
/// Credits
/// </summary>
public class Test : BaseApplication, IConsoleApp
{
public override int Start(string parameters)
{
if (string.IsNullOrEmpty(parameters))
{
Console.WriteLine("missing paramter");
return 1;
}

Console.WriteLine(parameters);

return 0;
}
}
93 changes: 93 additions & 0 deletions Source/Mosa.DeviceDriver/ISA/CMOS.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// Copyright (c) MOSA Project. Licensed under the New BSD License.

using System;
using Mosa.DeviceSystem;

namespace Mosa.DeviceDriver.ISA;

/// <summary>
/// CMOS Device Driver
/// </summary>
//[ISADeviceDriver(AutoLoad = true, BasePort = 0x0070, PortRange = 2, Platforms = PlatformArchitecture.X86)]
public class CMOS : BaseDeviceDriver, IDateTime
{
/// <summary>
/// The command port
/// </summary>
protected BaseIOPortReadWrite commandPort;

/// <summary>
/// The data port
/// </summary>
protected BaseIOPortReadWrite dataPort;

public override void Initialize()
{
Device.Name = "CMOS";

commandPort = Device.Resources.GetIOPortReadWrite(0, 0);
dataPort = Device.Resources.GetIOPortReadWrite(0, 4);
}

public override void Probe() => Device.Status = DeviceStatus.Available;

public override void Start()
{
Device.Status = DeviceStatus.Online;
}

/// <summary>
/// Called when an interrupt is received.
/// </summary>
/// <returns></returns>
public override bool OnInterrupt() => true;

public DateTime GetDateTime()
{
var bcd = (Read(0x0B) & 0x04) == 0x00;

var century = BCDToBinary(bcd, Read(0x32));
var second = BCDToBinary(bcd, Read(0));
var minute = BCDToBinary(bcd, Read(2));
var hour = BCDToBinary(bcd, Read(4));
var year = BCDToBinary(bcd, Read(9));
var month = BCDToBinary(bcd, Read(8));
var day = BCDToBinary(bcd, Read(7));

if (century is 19 or 21)
{
return new DateTime(century * 100 + year, month, day, hour, minute, second);
}
else
{
return new DateTime(2000 + year, month, day, hour, minute, second);
}
}

/// <summary>
/// Reads the specified address.
/// </summary>
/// <param name="address">The address.</param>
/// <returns></returns>
protected byte Read(byte address)
{
lock (_lock)
{
commandPort.Write8(address);
return dataPort.Read8();
}
}

private static byte BCDToBinary(bool bcd, byte value)
{
if (bcd)
return BCDToBinary(value);
else
return value;
}

private static byte BCDToBinary(byte bcd)
{
return (byte)(bcd / 16 * 10 + (bcd & 0xF));
}
}
2 changes: 1 addition & 1 deletion Source/Mosa.DeviceSystem/IAudioDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IAudioDevice
/// <summary>
/// Plays a sound from a constrained pointer.
/// </summary>
/// <param name="Data"></param>
/// <param name="data"></param>
void Play(ConstrainedPointer data);

/// <summary>
Expand Down
8 changes: 2 additions & 6 deletions Source/Mosa.DeviceSystem/IPCIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ public interface IPCIController
/// <returns></returns>
byte ReadConfig8(PCIDevice pciDevice, byte register);

/// <summary>
/// Writes to configuration space
/// </summary>
/// <param name="bus">The bus.</param>
/// <param name="slot">The slot.</param>
/// <param name="function">The function.</param>
/// <summary>Writes to configuration space</summary>
/// <param name="pciDevice"></param>
/// <param name="register">The register.</param>
/// <param name="value">The value.</param>
void WriteConfig32(PCIDevice pciDevice, byte register, uint value);
Expand Down
12 changes: 4 additions & 8 deletions Source/Mosa.DeviceSystem/IPixelPaletteGraphicsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ namespace Mosa.DeviceSystem;
/// </summary>
public interface IPixelPaletteGraphicsDevice
{
/// <summary>
/// Writes the pixel.
/// </summary>
/// <param name="colorIndex">Index of the color.</param>
/// <summary>Writes the pixel.</summary>
/// <param name="color"></param>
/// <param name="x">The x.</param>
/// <param name="y">The y.</param>
void WritePixel(Color color, uint x, uint y);
Expand All @@ -25,10 +23,8 @@ public interface IPixelPaletteGraphicsDevice
/// <returns></returns>
Color ReadPixel(uint x, uint y);

/// <summary>
/// Clears device with the specified color index.
/// </summary>
/// <param name="colorIndex">Index of the color.</param>
/// <summary>Clears device with the specified color index.</summary>
/// <param name="color"></param>
void Clear(Color color);

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Source/Mosa.Linux.sln
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packages", "Packages", "{52
Mosa.Packages\Mosa.Platform.x86.nuspec = Mosa.Packages\Mosa.Platform.x86.nuspec
Mosa.Packages\Mosa.Runtime.nuspec = Mosa.Packages\Mosa.Runtime.nuspec
Mosa.Packages\Mosa.Tools.Package.nuspec = Mosa.Packages\Mosa.Tools.Package.nuspec
Mosa.Packages\Mosa.Tools.Package.Qemu.nuspec = Mosa.Packages\Mosa.Tools.Package.Qemu.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{624E8284-4F0A-4C3F-B5F2-271105E48ECF}"
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.DeviceSystem.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Device And File System</summary>
<description>MOSA Device And File System</description>
<releaseNotes></releaseNotes>
<summary>MOSA device drivers framework and file system</summary>
<description>This package contains the MOSA device drivers framework along with the VFS (Virtual File System) and the file systems implementations.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<dependencies>
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Kernel.x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Kernel for x64</summary>
<description>MOSA Kernel for x64</description>
<releaseNotes></releaseNotes>
<summary>MOSA x64 kernel</summary>
<description>This package contains the MOSA x64 kernel.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<dependencies>
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Kernel.x86.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Kernel for x86</summary>
<description>MOSA Kernel for x86</description>
<releaseNotes></releaseNotes>
<summary>MOSA x86 kernel</summary>
<description>This package contains the MOSA x86 kernel.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<dependencies>
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Korlib.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Corlib</summary>
<description>MOSA implementation of corlib</description>
<releaseNotes></releaseNotes>
<summary>MOSA core library</summary>
<description>This package contains the MOSA implementation of the .NET core library.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler corlib</tags>
</metadata>
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Platform.x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Platform Libraries x64</summary>
<description>MOSA platform libraries for x64</description>
<releaseNotes></releaseNotes>
<summary>MOSA x64 platform libraries</summary>
<description>This package contains the necessary platform libraries for using the MOSA x64 kernel and runtime on x64.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<dependencies>
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Platform.x86.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Platform Libraries x86</summary>
<description>MOSA platform libraries for x86</description>
<releaseNotes></releaseNotes>
<summary>MOSA x86 platform libraries</summary>
<description>This package contains the necessary platform libraries for using the MOSA x86 kernel and runtime on x86.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<dependencies>
Expand Down
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Runtime.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Runtime Library</summary>
<description>MOSA Runtime Library</description>
<releaseNotes></releaseNotes>
<summary>MOSA runtime library</summary>
<description>This package contains the base MOSA runtime library.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<dependencies>
Expand Down
57 changes: 57 additions & 0 deletions Source/Mosa.Packages/Mosa.Tools.Package.Qemu.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Mosa.Tools.Package.Qemu</id>
<version>$version$</version>
<title>Mosa.Tools.Package.Qemu</title>
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA tools with QEMU (Windows/Linux)</summary>
<description>This package contains all the tools for MOSA along with QEMU binaries for Windows.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<contentFiles>
<files include="**/*.*" buildAction="None" copyToOutput="true" />
</contentFiles>
</metadata>
<files>
<file src="..\Art\Mosa Icon.png" target="images" />
<file src="..\..\Tools\qemu\**\*.*" target="contentFiles/any/net7.0/Tools/qemu" />
<file src="..\..\bin\runtimes\**\*.*" target="contentFiles/any/net7.0/Tools/runtimes" />
<file src="..\..\bin\Avalonia*.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Compiler.Common.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Compiler.Framework.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Compiler.MosaTypeSystem.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Compiler.MosaTypeSystem.CLR.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Platform.ARMv8A32.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Platform.x86.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Platform.x64.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Tool.Explorer.*" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Tool.Debugger.*" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Tool.Launcher.*" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Tool.Compiler.*" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.BootImage.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.Configuration.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.DebugEngine.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.FileSystem.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.Launcher.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.RSP.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Mosa.Utility.Disassembler.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\dnlib.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Reko.Arch.Arm.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Reko.Arch.X86.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Reko.Core.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Reko.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\PriorityQueue.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\WinFormsUI.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\System.Reactive.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\SkiaSharp.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\HarfBuzzSharp.dll" target="contentFiles/any/net7.0/Tools" />
<file src="..\..\bin\Tmds.DBus.dll" target="contentFiles/any/net7.0/Tools" />
</files>
</package>
7 changes: 3 additions & 4 deletions Source/Mosa.Packages/Mosa.Tools.Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<authors>MOSA Project</authors>
<owners>MOSA Project</owners>
<license type="expression">BSD-3-Clause-Clear</license>
<projectUrl>http://www.mosa-project.org</projectUrl>
<projectUrl>https://www.mosa-project.org</projectUrl>
<icon>images/Mosa Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>MOSA Tools Package</summary>
<description>MOSA Tools Package</description>
<releaseNotes></releaseNotes>
<summary>MOSA Tools</summary>
<description>This package contains all the tools for MOSA.</description>
<copyright>Copyright © MOSA Project 2023</copyright>
<tags>MOSA Compiler</tags>
<contentFiles>
Expand Down
4 changes: 2 additions & 2 deletions Source/Mosa.Templates/Mosa.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>2.3</PackageVersion>
<PackageVersion>2.4</PackageVersion>
<PackageId>Mosa.Templates</PackageId>
<Title>MOSA Templates</Title>
<Author>MOSA-Project</Author>
Expand All @@ -26,4 +26,4 @@
<Compile Remove="**\*" />
</ItemGroup>

</Project>
</Project>

0 comments on commit 142fab6

Please sign in to comment.