Pass screen status and mmc struct from stage1 to 2

This commit is contained in:
TuxSH
2018-06-04 19:17:23 +02:00
parent 116eb6c67c
commit b2139ed182
13 changed files with 139 additions and 30 deletions

View File

@@ -87,15 +87,19 @@ static ssize_t decode_utf8(uint32_t *out, const uint8_t *in) {
}
static void console_init_display(void) {
/* Initialize the display. */
display_init();
if (!g_display_initialized) {
/* Initialize the display. */
display_init();
}
/* Set the framebuffer. */
display_init_framebuffer(g_framebuffer);
/* Turn on the backlight after initializing the lfb */
/* to avoid flickering. */
display_enable_backlight(true);
if (!g_display_initialized) {
display_enable_backlight(true);
}
g_display_initialized = true;
}
@@ -140,7 +144,10 @@ static int console_create(void) {
return 0;
}
int console_init(void) {
int console_init(bool display_initialized) {
g_display_initialized = display_initialized;
if (console_create() == -1) {
return -1;
}