build: switch to zonfig

This commit is contained in:
Loïc Grégoire
2026-04-24 10:35:53 -04:00
parent 36690a8149
commit a46782adca
18 changed files with 179 additions and 247 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ extern var AP_TRAMPOLINE_DATA: u8;
extern var __percpu_start: u8;
extern var __percpu_end: u8;
pub export var cpu_id_to_apic_id: [config.CONFIG_NCPUS]u32 = undefined;
pub export var cpu_id_to_apic_id: [config.ncpus]u32 = undefined;
const start_stack = ke.ExportedCpuLocal(usize, 0, "ap_start_stack");
+5 -6
View File
@@ -3,12 +3,11 @@
const config = @import("config");
pub const impl = if (@hasDecl(config, "CONFIG_ARCH_AMD64"))
@import("pc/impl.zig")
else if (@hasDecl(config, "CONFIG_ARCH_UM"))
@import("um/impl.zig")
else
@compileError("unsupported architecture");
pub const impl = switch (config.arch) {
.amd64 => @import("pc/impl.zig"),
.um => @import("um/impl.zig"),
else => @compileError("unsupported architecture"),
};
pub const acpi = @import("acpi/root.zig");
+9
View File
@@ -0,0 +1,9 @@
#define _GNU_SOURCE 1
#include <SDL.h>
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <ucontext.h>
#include <unistd.h>
+1 -6
View File
@@ -3,12 +3,7 @@ const r = @import("root");
pub const std_options = r.std_options;
pub const panic = r.panic;
const c = @cImport({
@cInclude("SDL.h");
@cInclude("signal.h");
@cInclude("pthread.h");
});
const c = @import("c");
const std = @import("std");
const ke = r.ke;
const pl = r.pl;
+1 -10
View File
@@ -10,16 +10,7 @@ pub const entry = @import("entry.zig");
const timer = @import("timer.zig");
pub const c = @cImport({
@cDefine("_GNU_SOURCE", "1");
@cInclude("pthread.h");
@cInclude("sys/mman.h");
@cInclude("ucontext.h");
@cInclude("signal.h");
@cInclude("unistd.h");
@cInclude("sys/time.h");
@cInclude("sched.h");
});
pub const c = @import("c");
pub const name = "User-Mode";