mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
Qemu
This commit is contained in:
parent
f3dbded749
commit
a28e982d9f
7 changed files with 182 additions and 150 deletions
|
|
@ -54,15 +54,15 @@ namespace Cosmos.TestRunner.Core
|
|||
case RunTargetEnum.Bochs:
|
||||
RunTask("RunISO", () => RunIsoInBochs(xIsoFile, xHarddiskPath, workingDirectory));
|
||||
break;
|
||||
case RunTargetEnum.Qemu:
|
||||
RunTask("RunISO", () => RunIsoInQemu(xIsoFile, xHarddiskPath, workingDirectory));
|
||||
break;
|
||||
case RunTargetEnum.VMware:
|
||||
RunTask("RunISO", () => RunIsoInVMware(xIsoFile, xHarddiskPath));
|
||||
break;
|
||||
case RunTargetEnum.HyperV:
|
||||
RunTask("RunISO", () => RunIsoInHyperV(xIsoFile, xHarddiskPath));
|
||||
break;
|
||||
case RunTargetEnum.Qemu:
|
||||
RunTask("RunISO", () => RunIsoInQemu(xIsoFile, xHarddiskPath, workingDirectory));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException("RunTarget " + configuration.RunTarget + " not implemented!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ namespace Cosmos.Debug.Hosts
|
|||
_harddiskFile = aHarddisk;
|
||||
}
|
||||
|
||||
if (aParams.ContainsKey(BuildPropertyNames.IsoFileString))
|
||||
if (aParams.ContainsKey("ISOFile"))
|
||||
{
|
||||
_isoFile = aParams[BuildPropertyNames.IsoFileString];
|
||||
_isoFile = aParams["IOSFile"];
|
||||
}
|
||||
|
||||
_debugPortString = "Cosmos\\Serial";
|
||||
|
|
|
|||
|
|
@ -557,12 +557,6 @@ namespace Cosmos.VS.DebugEngine.AD7.Impl
|
|||
|
||||
//((Host.Bochs)mHost).FixBochsConfiguration(new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("IsoFileName", mISO) });
|
||||
break;
|
||||
case LaunchType.IntelEdison:
|
||||
mHost = new IntelEdison(mDebugInfo, false);
|
||||
break;
|
||||
case LaunchType.HyperV:
|
||||
mHost = new HyperV(mDebugInfo, false);
|
||||
break;
|
||||
case LaunchType.Qemu:
|
||||
if (!QemuSupport.QemuEnabled)
|
||||
{
|
||||
|
|
@ -570,6 +564,12 @@ namespace Cosmos.VS.DebugEngine.AD7.Impl
|
|||
}
|
||||
mHost = new Qemu(mDebugInfo, xUseGDB);
|
||||
break;
|
||||
case LaunchType.IntelEdison:
|
||||
mHost = new IntelEdison(mDebugInfo, false);
|
||||
break;
|
||||
case LaunchType.HyperV:
|
||||
mHost = new HyperV(mDebugInfo, false);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Launch value: '" + mLaunch + "'.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
<EnumValue Name="VMware" DisplayName="VMware" />
|
||||
<EnumValue Name="Slave" DisplayName="Attached Slave (CanaKit)" />
|
||||
<EnumValue Name="Bochs" DisplayName="Bochs" />
|
||||
<EnumValue Name="Qemu" DisplayName="Qemu" />
|
||||
<EnumValue Name="IntelEdison" DisplayName="Intel Edison" />
|
||||
<EnumValue Name="HyperV" DisplayName="Hyper-V" />
|
||||
</EnumProperty>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@
|
|||
this.tabBochs = new System.Windows.Forms.TabPage();
|
||||
this.checkStartBochsDebugGui = new System.Windows.Forms.CheckBox();
|
||||
this.checkEnableBochsDebug = new System.Windows.Forms.CheckBox();
|
||||
this.tabQemu = new System.Windows.Forms.TabPage();
|
||||
this.tabPXE = new System.Windows.Forms.TabPage();
|
||||
this.butnPxeRefresh = new System.Windows.Forms.Button();
|
||||
this.comboPxeInterface = new System.Windows.Forms.ComboBox();
|
||||
|
|
@ -111,6 +112,7 @@
|
|||
this.tabLaunch.SuspendLayout();
|
||||
this.tabVMware.SuspendLayout();
|
||||
this.tabBochs.SuspendLayout();
|
||||
this.tabQemu.SuspendLayout();
|
||||
this.tabPXE.SuspendLayout();
|
||||
this.tabUSB.SuspendLayout();
|
||||
this.tabISO.SuspendLayout();
|
||||
|
|
@ -156,6 +158,7 @@
|
|||
this.TabControl1.Controls.Add(this.tabVMware);
|
||||
this.TabControl1.Controls.Add(this.tabHyperV);
|
||||
this.TabControl1.Controls.Add(this.tabBochs);
|
||||
this.TabControl1.Controls.Add(this.tabQemu);
|
||||
this.TabControl1.Controls.Add(this.tabPXE);
|
||||
this.TabControl1.Controls.Add(this.tabUSB);
|
||||
this.TabControl1.Controls.Add(this.tabISO);
|
||||
|
|
@ -704,6 +707,16 @@
|
|||
this.checkEnableBochsDebug.Text = "Enable Bochs Debugger";
|
||||
this.checkEnableBochsDebug.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabQemu
|
||||
//
|
||||
this.tabQemu.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabQemu.Name = "tabQemu";
|
||||
this.tabQemu.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabQemu.Size = new System.Drawing.Size(627, 486);
|
||||
this.tabQemu.TabIndex = 5;
|
||||
this.tabQemu.Text = "Qemu";
|
||||
this.tabQemu.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPXE
|
||||
//
|
||||
this.tabPXE.Controls.Add(this.butnPxeRefresh);
|
||||
|
|
@ -865,6 +878,7 @@
|
|||
this.tabVMware.ResumeLayout(false);
|
||||
this.tabVMware.PerformLayout();
|
||||
this.tabBochs.ResumeLayout(false);
|
||||
this.tabQemu.ResumeLayout(false);
|
||||
this.tabPXE.ResumeLayout(false);
|
||||
this.tabPXE.PerformLayout();
|
||||
this.tabUSB.ResumeLayout(false);
|
||||
|
|
@ -909,6 +923,7 @@
|
|||
private System.Windows.Forms.CheckBox checkIgnoreDebugStubAttribute;
|
||||
private System.Windows.Forms.TabPage tabBochs;
|
||||
private System.Windows.Forms.CheckBox checkEnableBochsDebug;
|
||||
private System.Windows.Forms.TabPage tabQemu;
|
||||
private System.Windows.Forms.TabPage tabVMware;
|
||||
private System.Windows.Forms.CheckBox checkEnableGDB;
|
||||
private System.Windows.Forms.CheckBox checkStartCosmosGDB;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
protected int mHyperVDebugPipe;
|
||||
|
||||
protected bool mShowTabBochs;
|
||||
protected bool mShowTabQemu;
|
||||
protected bool mShowTabDebug;
|
||||
protected bool mShowTabDeployment;
|
||||
protected bool mShowTabLaunch;
|
||||
|
|
@ -98,8 +99,8 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
if (xValue != mViewModel.BuildProperties.Launch)
|
||||
{
|
||||
mViewModel.BuildProperties.Launch = xValue;
|
||||
// Bochs requires an ISO. Force Deployment property.
|
||||
if (LaunchType.Bochs == xValue)
|
||||
// Bochs and Qemu requires an ISO. Force Deployment property.
|
||||
if (xValue == LaunchType.Bochs)
|
||||
{
|
||||
if (DeploymentType.ISO != mViewModel.BuildProperties.Deployment)
|
||||
{
|
||||
|
|
@ -329,6 +330,7 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
RemoveTab(tabISO);
|
||||
RemoveTab(tabSlave);
|
||||
RemoveTab(tabBochs);
|
||||
RemoveTab(tabQemu);
|
||||
|
||||
if (mShowTabDebug)
|
||||
{
|
||||
|
|
@ -372,6 +374,10 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
{
|
||||
TabControl1.TabPages.Add(tabBochs);
|
||||
}
|
||||
if (mShowTabQemu)
|
||||
{
|
||||
TabControl1.TabPages.Add(tabQemu);
|
||||
}
|
||||
|
||||
if (TabControl1.TabPages.Contains(xTab))
|
||||
{
|
||||
|
|
@ -435,6 +441,15 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
cmboVisualStudioDebugPort.Enabled = false;
|
||||
cmboVisualStudioDebugPort.SelectedIndex = mVMwareAndBochsDebugPipe;
|
||||
}
|
||||
else if (mViewModel.BuildProperties.Profile == "Qemu")
|
||||
{
|
||||
mShowTabQemu = true;
|
||||
chckEnableDebugStub.Checked = true;
|
||||
chkEnableStackCorruptionDetection.Checked = true;
|
||||
cmboCosmosDebugPort.Enabled = false;
|
||||
cmboVisualStudioDebugPort.Enabled = false;
|
||||
cmboVisualStudioDebugPort.SelectedIndex = mVMwareAndBochsDebugPipe;
|
||||
}
|
||||
else if (mViewModel.BuildProperties.Profile == "IntelEdison")
|
||||
{
|
||||
mShowTabBochs = false;
|
||||
|
|
@ -513,7 +528,8 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
mShowTabVMware = mViewModel.BuildProperties.Launch == LaunchType.VMware;
|
||||
mShowTabHyperV = mViewModel.BuildProperties.Launch == LaunchType.HyperV;
|
||||
mShowTabSlave = mViewModel.BuildProperties.Launch == LaunchType.Slave;
|
||||
mShowTabBochs = (LaunchType.Bochs == mViewModel.BuildProperties.Launch);
|
||||
mShowTabBochs = mViewModel.BuildProperties.Launch == LaunchType.Bochs;
|
||||
mShowTabQemu = mViewModel.BuildProperties.Launch == LaunchType.Qemu;
|
||||
//
|
||||
UpdateTabs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|||
{
|
||||
Add("Bochs", "Bochs");
|
||||
}
|
||||
Add("IntelEdison", "Intel Edison Serial boot");
|
||||
Add("HyperV", "Hyper-V");
|
||||
if (QemuSupport.QemuEnabled)
|
||||
{
|
||||
Add("Qemu", "Qemu");
|
||||
}
|
||||
Add("IntelEdison", "Intel Edison Serial boot");
|
||||
Add("HyperV", "Hyper-V");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue