<!-- working title -->
# lumine

cheapskate x86_64/aarch64 UEFI bootloader

## config

> [!WARNING]
> - this rewrite is **EXTREMELY** incomplete, see `master` branch for a somewhat working c implementation.
> - docs are written primarily for `x86_64`, just replace `BOOTX64` with `BOOTAA64` and the rest should be equivalent.

config for lumine is currently written in zig object notation, see [default config](./config.zon) for reference.
see [installation](#installation) for instructions on where to put config file.

## compiling

lumine uses the [zig build system](https://ziglang.org/learn/build-system/) version `0.16.0`, which
you can download [here](https://ziglang.org/download/).

```sh
zig build -Doptimize=ReleaseSafe -Darch=x86_64
# efi executable is now in `zig-out/build/BOOTX64.efi` 
```

## emulation

dependencies like edk2 ovmf firmware are already downloaded as a zig dependency (hmmmm, even if you dont want emulation?)

```sh
# starts in serial console
zig build -Darch=x86_64 run
```

## installation

i dont want installation or setup or usage to be something convoluted or "hidden" away like grub does, so
that you can literally do it manually and it works fine, or maybe automate finding of installations like
grub's os-prober or whatever.

therefore, lumine is only two files:
- efi executable: can be placed anywhere, partition default `/EFI/BOOT/BOOTX64.EFI` or really any location
  like `/lumine/lumine.efi` etc etc, you have the freedom.
- config file: for now, config MUST be placed in `/lumine.zon`. this WILL change soon however, because i dont like it.

assuming your efi directory is `/boot`:

```sh
cp zig-out/build/BOOTX64.efi /boot/lumine/BOOTX64.EFI
cp config.zon /boot/lumine.zon
```

now just make a efi boot entry and set BootNext flag to try it out. i wont give you the steps because, well its incomplete
as shit and might not work if you smile a little gay, if you really wanna, you might already know how to do it anyway.

## license

this project is licensed under [BSD-2-Clause](./LICENSE) license
