const std = @import("std"); const Step = std.Build.Step; const boot_build = @import("boot/build_boot.zig"); fn buildKernel(b: *std.Build, optimize: std.builtin.OptimizeMode) *Step.Compile { const target = b.resolveTargetQuery(.{ .cpu_arch = .x86_64, .os_tag = .freestanding, .abi = .none, }); const kernel = b.addExecutable(.{ .name = "kernel", .root_module = b.addModule("kernel", .{ .root_source_file = b.path("kernel/main.zig"), .target = target, .optimize = optimize, }), }); kernel.entry = .{ .symbol_name = "start_kernel" }; return kernel; } pub fn buildImage(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); const kernel = buildKernel(b, optimize); boot_build.buildBootImage(b, kernel); }