mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-01 15:48:21 +00:00
everywhere: nuke UM
This commit is contained in:
+1
-3
@@ -16,7 +16,6 @@ pub const Platform = struct {
|
||||
const ArchEnum = enum {
|
||||
amd64,
|
||||
aarch64,
|
||||
um,
|
||||
};
|
||||
|
||||
const BootloaderEnum = enum {
|
||||
@@ -38,9 +37,8 @@ pub fn getPlatform(config: Config) !Platform {
|
||||
.arch = switch (config.arch) {
|
||||
.amd64 => .x86_64,
|
||||
.aarch64 => .aarch64,
|
||||
.um => builtin.cpu.arch,
|
||||
},
|
||||
.os = if (config.arch == .um) .linux else .freestanding,
|
||||
.os = .freestanding,
|
||||
};
|
||||
|
||||
if (ret.os == .freestanding and (ret.arch == .x86_64 or ret.arch == .aarch64)) {
|
||||
|
||||
+3
-3
@@ -47,6 +47,8 @@ pub fn addRun(b: *std.Build, kernel: *std.Build.Step.Compile, plat: config.Platf
|
||||
qemu.addArgs(&.{
|
||||
"-d",
|
||||
"int",
|
||||
"-s",
|
||||
"-S",
|
||||
"-D",
|
||||
"qemu.log",
|
||||
"-no-reboot",
|
||||
@@ -56,7 +58,7 @@ pub fn addRun(b: *std.Build, kernel: *std.Build.Step.Compile, plat: config.Platf
|
||||
|
||||
switch (plat.arch) {
|
||||
.x86_64 => {
|
||||
qemu.addArgs(&.{ "-serial", "stdio", "-m", "1G", "-smp", "4" });
|
||||
qemu.addArgs(&.{ "-serial", "stdio", "-m", "32M", "-smp", "4" });
|
||||
|
||||
if (!debug and builtin.target.os.tag == .linux and builtin.cpu.arch == .x86_64) qemu.addArgs(&.{ "-enable-kvm", "-cpu", "host,+invtsc" });
|
||||
},
|
||||
@@ -66,7 +68,5 @@ pub fn addRun(b: *std.Build, kernel: *std.Build.Step.Compile, plat: config.Platf
|
||||
}
|
||||
|
||||
run_step.dependOn(&qemu.step);
|
||||
} else {
|
||||
run_step.dependOn(&b.addRunArtifact(kernel).step);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user