[bootloader] Fix minimum brightness when booting

This commit is contained in:
Yaya-Cout
2022-05-31 18:23:51 +02:00
parent 952a83400a
commit 71a8c20ee7
2 changed files with 6 additions and 0 deletions

View File

@@ -39,6 +39,8 @@ void Bootloader::UpsilonRecoveryMenu::postOpen() {
} else if (scan == Ion::Keyboard::State(Ion::Keyboard::Key::OK)) {
Slot slot = Slot::Upsilon();
Ion::Device::Board::bootloaderMPU();
// Deinitialize the backlight to prevent bugs when the firmware boots
Ion::Backlight::shutdown();
jump_to_firmware(slot.kernelHeader()->stackPointer(), slot.userlandHeader()->upsilonRecoveryBootFunction());
for(;;);
}

View File

@@ -3,6 +3,7 @@
#include <ion/src/device/shared/drivers/flash.h>
#include <bootloader/boot.h>
#include <assert.h>
#include <ion.h>
extern "C" void jump_to_firmware(const uint32_t* stackPtr, const void(*startPtr)(void));
@@ -50,6 +51,9 @@ const UserlandHeader* Slot::userlandHeader() const {
// Configure the MPU for the booted firmware
Ion::Device::Board::bootloaderMPU();
// Deinitialize the backlight to prevent bugs when the firmware boots
Ion::Backlight::shutdown();
// Jump
jump_to_firmware(kernelHeader()->stackPointer(), kernelHeader()->startPointer());
for(;;);