SunriseOS icon indicating copy to clipboard operation
SunriseOS copied to clipboard

Stop using GRUB

Open roblabla opened this issue 4 years ago • 1 comments

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:

  1. Do some amount of hardware initialization
  2. Find and load the Package2 (containing the Kernel + builtins)
  3. Verify its signature against a hardcoded key (for simplicity's sake, will be the same as the secure boot key)
  4. 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.

roblabla avatar Sep 09 '19 10:09 roblabla

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.

roblabla avatar Sep 09 '19 10:09 roblabla