forked from Omega-Numworks/Omega
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[recovery] Recovery Improvements #234
Open
devdl11
wants to merge
13
commits into
UpsilonNumworks:upsilon-dev
Choose a base branch
from
devdl11:upsilon-dev-1.0.1.01fix
base: upsilon-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+273
−18
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3e42d48
Revert "[storage] Possibility to store metadata with records (cursor …
Lauryy06 a01f4bc
Update config.mak (#230)
emsquid 833bc4a
[bootloader/menu] Fix typo (#231)
Tunas1337 8e543f3
Magical Backup
devdl11 ab8b353
Change Upsilon version from 1.0.0 to 1.0.1-dev
3eaa116
Merge branch 'upsilon-dev' of https://github.com/UpsilonNumworks/Upsi…
devdl11 48587c1
Review
devdl11 363ffbc
Removing debug led
devdl11 1e0fa89
Update bootloader/interface/menus/upsilon_recovery.cpp
devdl11 cbec2e5
Update bootloader/interface/menus/upsilon_recovery.h
devdl11 8996f96
Add specific header and extra version
devdl11 952a834
ld fix possibility
devdl11 71a8c20
[bootloader] Fix minimum brightness when booting
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include "upsilon_recovery.h" | ||
#include <bootloader/slots/slot.h> | ||
#include <bootloader/usb_data.h> | ||
#include <ion/src/device/shared/drivers/board.h> | ||
#include <ion.h> | ||
#include <stdlib.h> | ||
|
||
extern "C" void jump_to_firmware(const uint32_t* stackPtr, const void(*startPtr)(void)); | ||
|
||
Bootloader::UpsilonRecoveryMenu::UpsilonRecoveryMenu() : Menu(KDColorBlack, KDColorWhite, Messages::upsilonRecoveryTitle, Messages::mainTitle) { | ||
setup(); | ||
} | ||
|
||
void Bootloader::UpsilonRecoveryMenu::setup() { | ||
m_defaultColumns[0] = Column(Messages::upsilonRecoveryMessage1, k_small_font, 0, true); | ||
m_defaultColumns[1] = Column(Messages::upsilonRecoveryMessage2, k_small_font, 0, true); | ||
m_defaultColumns[2] = Column(Messages::upsilonRecoveryMessage3, k_small_font, 0, true); | ||
m_defaultColumns[3] = Column(Messages::upsilonRecoveryMessage4, k_small_font, 0, true); | ||
m_defaultColumns[4] = Column(Messages::upsilonRecoveryMessage5, k_small_font, 0, true); | ||
|
||
m_columns[0] = ColumnBinder(&m_defaultColumns[0]); | ||
m_columns[1] = ColumnBinder(&m_defaultColumns[1]); | ||
m_columns[2] = ColumnBinder(&m_defaultColumns[2]); | ||
m_columns[3] = ColumnBinder(&m_defaultColumns[3]); | ||
m_columns[4] = ColumnBinder(&m_defaultColumns[4]); | ||
} | ||
|
||
void Bootloader::UpsilonRecoveryMenu::postOpen() { | ||
// We override the open method | ||
for (;;) { | ||
uint64_t scan = Ion::Keyboard::scan(); | ||
if (scan == Ion::Keyboard::State(Ion::Keyboard::Key::Back)) { | ||
while (Ion::Keyboard::scan() == Ion::Keyboard::State(Ion::Keyboard::Key::Back)); | ||
forceExit(); | ||
return; | ||
} else if (scan == Ion::Keyboard::State(Ion::Keyboard::Key::OnOff)) { | ||
Ion::Power::suspend(); | ||
return; | ||
} 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(;;); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef _BOOTLOADER_INTERFACE_MENUS_UPSILON_RECOVERY_H_ | ||
#define _BOOTLOADER_INTERFACE_MENUS_UPSILON_RECOVERY_H_ | ||
|
||
#include <bootloader/interface/src/menu.h> | ||
|
||
namespace Bootloader { | ||
class UpsilonRecoveryMenu : public Menu { | ||
public: | ||
UpsilonRecoveryMenu(); | ||
void setup() override; | ||
void postOpen() override; | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you redraw the screen after it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean, relaunch the recovery mode ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the screen it powered down, it lost the frame buffer, you need to draw the menu a new time, not necessary by relaunching it.