forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
202 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Collections.Specialized; | ||
using System.IO; | ||
using Cosmos.Build.Common; | ||
using Cosmos.Debug.Common; | ||
using Cosmos.Debug.VSDebugEngine.Host; | ||
|
||
namespace Cosmos.TestRunner.Core | ||
{ | ||
partial class Engine | ||
{ | ||
private void RunIsoInBochs(string iso) | ||
{ | ||
var xBochsConfig = Path.Combine(mBaseWorkingDirectory, "Kernel.bochsrc"); | ||
var xParams = new NameValueCollection(); | ||
|
||
xParams.Add(BuildProperties.EnableBochsDebugString, "false"); | ||
xParams.Add("ISOFile", iso); | ||
xParams.Add(BuildProperties.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial"); | ||
|
||
var xDebugConnector = new DebugConnectorPipeServer("Cosmos\\Serial"); | ||
|
||
xDebugConnector.CmdChannel += ChannelPacketReceived; | ||
xDebugConnector.CmdStarted += () => | ||
{ | ||
DoLog("DC: Started"); | ||
xDebugConnector.SendCmd(Vs2Ds.BatchEnd); | ||
}; | ||
xDebugConnector.CmdText += s => DoLog("Text from kernel: " + s); | ||
xDebugConnector.CmdMessageBox += s => DoLog("MessageBox from kernel: " + s); | ||
|
||
var xBochs = new Bochs(xParams, false, new FileInfo(xBochsConfig)); | ||
xBochs.Start(); | ||
try | ||
{ | ||
Console.WriteLine("Bochs started"); | ||
Console.ReadLine(); | ||
} | ||
catch | ||
{ | ||
xBochs.Stop(); | ||
} | ||
} | ||
|
||
private void ChannelPacketReceived(byte arg1, byte arg2, byte[] arg3) | ||
{ | ||
Console.WriteLine("ChannelPacket received. Channel = {0}, command = {1}", arg1, arg2); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ public static string LaunchApplication(string app, string args, bool waitForExit | |
return string.Empty; | ||
} | ||
} | ||
} | ||
} |