Skip to content

Commit

Permalink
Merge pull request CosmosOS#802 from Arawn-Davies/for_cosmosos
Browse files Browse the repository at this point in the history
Updating Syslinux to version 6.03
  • Loading branch information
jp2masa authored Nov 8, 2017
2 parents 4909509 + f041e11 commit 4cf4e47
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 23 deletions.
Binary file modified Build/ISO/isolinux.bin
Binary file not shown.
Binary file added Build/ISO/ldlinux.c32
Binary file not shown.
Binary file added Build/ISO/mboot.c32
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/VMWare/Workstation/Cosmos.vmx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ scsi0.pciSlotNumber = "16"
vmci0.pciSlotNumber = "32"
vmotion.checkpointFBSize = "23920640"
vmci0.id = "1821907405"

monitor.allowLegacyCPU = "TRUE"
serial0.present = "TRUE"
serial0.yieldOnMsrRead = "TRUE"
serial0.fileType = "pipe"
Expand Down
Binary file added Build/ldlinux.c32
Binary file not shown.
Binary file added Build/libcom32.c32
Binary file not shown.
Binary file modified Build/mboot.c32
Binary file not shown.
6 changes: 6 additions & 0 deletions Setup/Cosmos.iss
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@ Source: ".\Build\VMware\*"; DestDir: "{app}\Build\VMware"; Flags: ignoreversion
; ISO
Source: ".\Build\ISO\*"; DestDir: "{app}\Build\ISO"
Source: ".\Build\mboot.c32"; DestDir: "{app}\Build\ISO\"
Source: ".\Build\ldlinux.c32"; DestDir: "{app}\Build\ISO\"
Source: ".\Build\syslinux.cfg"; DestDir: "{app}\Build\ISO\"
Source: ".\Build\libcom32.c32"; DestDir: "{app}\Build\ISO\"
; USB
Source: ".\Build\mboot.c32"; DestDir: "{app}\Build\USB\"
Source: ".\Build\ldlinux.c32"; DestDir: "{app}\Build\USB\"
Source: ".\Build\libcom32.c32"; DestDir: "{app}\Build\USB\"
Source: ".\Build\syslinux.cfg"; DestDir: "{app}\Build\USB\"
; PXE
Source: ".\Build\PXE\*"; DestDir: "{app}\Build\PXE"
Source: ".\Build\mboot.c32"; DestDir: "{app}\Build\PXE\"
Source: ".\Build\ldlinux.c32"; DestDir: "{app}\Build\PXE\"
Source: ".\Build\libcom32.c32"; DestDir: "{app}\Build\PXE\"
Source: ".\Build\syslinux.cfg"; DestDir: "{app}\Build\PXE\pxelinux.cfg"; DestName: "default"
; VSIP
Source: ".\Build\Tools\VSIXBootstrapper.exe"; DestDir: "{app}\Build\Tools"; Flags: ignoreversion uninsremovereadonly
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Build.Common/IsoMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ static public string Generate(string imageFile, string isoFilename)
File.Copy(Path.Combine(buildISO, "isolinux.bin"), Path.Combine(isoDirectory, "isolinux.bin"));
File.Copy(Path.Combine(buildISO, "mboot.c32"), Path.Combine(isoDirectory, "mboot.c32"));
File.Copy(Path.Combine(buildISO, "syslinux.cfg"), Path.Combine(isoDirectory, "syslinux.cfg"));
File.Copy(Path.Combine(buildISO, "ldlinux.c32"), Path.Combine(isoDirectory, "ldlinux.c32"));
File.Copy(Path.Combine(buildISO, "libcom32.c32"), Path.Combine(isoDirectory, "libcom32.c32"));
File.Copy(imageFile, Path.Combine(isoDirectory, "Cosmos.bin"));

string arg =
Expand Down
49 changes: 27 additions & 22 deletions source/Cosmos.Build.Common/UsbMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,34 @@
using System.Text;
using System.IO;

namespace Cosmos.Build.Common {
public class UsbMaker {
namespace Cosmos.Build.Common
{
public class UsbMaker
{
static public void Generate(string aDrive, string aKernelFile)
{
string xDrive = aDrive + @":\";
string xPathUSB = Path.Combine(CosmosPaths.Build, "USB");

static public void Generate(string aDrive, string aKernelFile) {
string xDrive = aDrive + @":\";
string xPathUSB = Path.Combine(CosmosPaths.Build, "USB");
// Copy to USB device
File.Copy(Path.Combine(xPathUSB, "mboot.c32"), xDrive + "mboot.c32", true);
File.Copy(Path.Combine(xPathUSB, "syslinux.cfg"), xDrive + "syslinux.cfg", true);
File.Copy(Path.Combine(xPathUSB, "ldlinux.c32"), xDrive + "ldlinux.c32");
File.Copy(Path.Combine(xPathUSB, "libcom32.c32"), xDrive + "libcom32.c32");
File.Copy(aKernelFile, xDrive + "Cosmos.bin", true);
//File.Copy(Path.Combine(xPathUSB, "syslinux-x86.efi"), xDrive + "syslinux-x86.efi", true);
//File.Copy(Path.Combine(xPathUSB, "syslinux-x64.efi"), xDrive + "syslinux-x64.efi", true);

// Copy to USB device
File.Copy(Path.Combine(xPathUSB, "mboot.c32"), xDrive + "mboot.c32", true);
File.Copy(Path.Combine(xPathUSB, "syslinux.cfg"), xDrive + "syslinux.cfg", true);
File.Copy(aKernelFile, xDrive + "Cosmos.bin", true);

// Set MBR
//
// In future we might be able to bring this in house to reduce external calls.
// - syslinux-4.05\win\syslinux.c - has source we need.
// - http://www.fort-awesome.net/blog/2010/03/25/MBR_VBR_and_Raw_Disk
//
var xPSI = new ProcessStartInfo(Path.Combine(CosmosPaths.Tools, "syslinux.exe"), "-fma " + aDrive + ":");
xPSI.UseShellExecute = false;
xPSI.CreateNoWindow = true;
Process.Start(xPSI);
// Set MBR
//
// In future we might be able to bring this in house to reduce external calls.
// - syslinux-4.05\win\syslinux.c - has source we need.
// - http://www.fort-awesome.net/blog/2010/03/25/MBR_VBR_and_Raw_Disk
//
var xPSI = new ProcessStartInfo(Path.Combine(CosmosPaths.Tools, "syslinux.exe"), "-fma " + aDrive + ":");
xPSI.UseShellExecute = false;
xPSI.CreateNoWindow = true;
Process.Start(xPSI);
}
}

}
}

0 comments on commit 4cf4e47

Please sign in to comment.