λ

lumine

UEFI x86_64 bootloader for linux kernel images

settings

src/Config.zig

547 bytes raw

const std = @import("std");
const Io = std.Io;

pub const Path = union(enum) {
    /// file in boot partition
    boot: []const u8,

    pub fn format(self: Path, w: *Io.Writer) !void {
        switch (self) {
            // limine mention :(
            .boot => |path| try w.print("boot():{s}", .{path}),
        }
    }
};

pub const BootOption = union(enum) {
    chainload: Path,
    linux: struct {
        kernel_path: Path,
        kernel_cmdline: []const u8 = &.{},
        initrd_paths: []const Path = &.{},
    },
};

boot: BootOption,