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

@@ -108,7 +108,9 @@ int main(void) {
const char *stage2_path;
stage2_args_t *stage2_args;
uint32_t stage2_version = 0;
extern struct mmc g_sd_mmc;
sdmmc_set_loglevel(2);
/* Initialize the display, console, etc. */
setup_env();
@@ -134,6 +136,8 @@ int main(void) {
strcpy(g_chainloader_arg_data, stage2_path);
stage2_args = (stage2_args_t *)(g_chainloader_arg_data + strlen(stage2_path) + 1); /* May be unaligned. */
memcpy(&stage2_args->version, &stage2_version, 4);
stage2_args->display_initialized = false;
memcpy(&stage2_args->sd_mmc, &g_sd_mmc, sizeof(g_sd_mmc));
strcpy(stage2_args->bct0, bct0);
g_chainloader_argc = 2;