GRUB is written in the unholy C language, and as such should be expunged from our systems! In order to implement secureboot, we need to run grub-mkimage in order to embed a key in the GRUB bootloader and embed our grub config. This is annoying as it breaks the build for windows users.
We should use our own bootloader. This bootloader should closely follow the design of NX-Bootloader (the bootloader of HOS/NX). Which means it should:
Do some amount of hardware initialization
Find and load the Package2 (containing the Kernel + builtins)
Verify its signature against a hardcoded key (for simplicity's sake, will be the same as the secure boot key)
Jump to the kernel's entrypoint.
This bootloader should compile to an UEFI binary (rust natively supports building UEFI binaries) that will get signed by the secure boot key.
The most complicated part of this setup will be setting things up to get ourselves a framebuffer. Maybe we should move the framebuffer acquisition in the kernel proper anyways.
GRUB is written in the unholy C language, and as such should be expunged from our systems! In order to implement secureboot, we need to run
grub-mkimage
in order to embed a key in the GRUB bootloader and embed our grub config. This is annoying as it breaks the build for windows users.We should use our own bootloader. This bootloader should closely follow the design of NX-Bootloader (the bootloader of HOS/NX). Which means it should:
This bootloader should compile to an UEFI binary (rust natively supports building UEFI binaries) that will get signed by the secure boot key.