mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-24 12:14:11 +00:00
Add warnings on missing bootloader libraries
This commit is contained in:
parent
67a470921a
commit
b9e348fc17
@ -46,6 +46,7 @@ void set_default_configuration()
|
||||
h_cfg.se_keygen_done = 0;
|
||||
h_cfg.sbar_time_keeping = 0;
|
||||
h_cfg.backlight = 100;
|
||||
h_cfg.errors = 0;
|
||||
}
|
||||
|
||||
int create_config_entry()
|
||||
|
@ -30,8 +30,14 @@ typedef struct _hekate_config
|
||||
int se_keygen_done;
|
||||
u32 sbar_time_keeping;
|
||||
u32 backlight;
|
||||
u32 errors;
|
||||
} hekate_config;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ERR_LIBSYS_LP0 = (1 << 0),
|
||||
} hsysmodule_t;
|
||||
|
||||
void set_default_configuration();
|
||||
int create_config_entry();
|
||||
void config_autoboot();
|
||||
|
@ -159,7 +159,13 @@ void *tui_do_menu(gfx_con_t *con, menu_t *menu)
|
||||
gfx_putc(con, '\n');
|
||||
|
||||
// Print help and battery status.
|
||||
gfx_con_getpos(con, &con->savedx, &con->savedy);
|
||||
gfx_con_setpos(con, 0, 1127);
|
||||
if (h_cfg.errors)
|
||||
{
|
||||
gfx_printf(con, "%k Warning: %k", 0xFF800000, 0xFF555555);
|
||||
if (h_cfg.errors & ERR_LIBSYS_LP0)
|
||||
gfx_printf(con, "Sleep mode library is missing!\n");
|
||||
}
|
||||
gfx_con_setpos(con, 0, 1191);
|
||||
gfx_printf(con, "%k VOL: Move up/down\n PWR: Select option%k", 0xFF555555, 0xFFCCCCCC);
|
||||
|
||||
|
@ -223,6 +223,39 @@ void panic(u32 val)
|
||||
;
|
||||
}
|
||||
|
||||
void reboot_normal()
|
||||
{
|
||||
sd_unmount();
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
free(Kc_MENU_LOGO);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
display_end();
|
||||
panic(0x21); // Bypass fuse programming in package1.
|
||||
}
|
||||
|
||||
void reboot_rcm()
|
||||
{
|
||||
sd_unmount();
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
free(Kc_MENU_LOGO);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
display_end();
|
||||
PMC(APBDEV_PMC_SCRATCH0) = 2; // Reboot into rcm.
|
||||
PMC(0) |= 0x10;
|
||||
while (true)
|
||||
usleep(1);
|
||||
}
|
||||
|
||||
void power_off()
|
||||
{
|
||||
sd_unmount();
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
free(Kc_MENU_LOGO);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
//TODO: we should probably make sure all regulators are powered off properly.
|
||||
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_ONOFFCNFG1, MAX77620_ONOFFCNFG1_PWR_OFF);
|
||||
}
|
||||
|
||||
void config_oscillators()
|
||||
{
|
||||
CLOCK(CLK_RST_CONTROLLER_SPARE_REG0) = (CLOCK(CLK_RST_CONTROLLER_SPARE_REG0) & 0xFFFFFFF3) | 4;
|
||||
@ -771,37 +804,6 @@ out:
|
||||
free(pkg1);
|
||||
}
|
||||
|
||||
void reboot_normal()
|
||||
{
|
||||
sd_unmount();
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
free(Kc_MENU_LOGO);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
panic(0x21); // Bypass fuse programming in package1.
|
||||
}
|
||||
|
||||
void reboot_rcm()
|
||||
{
|
||||
sd_unmount();
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
free(Kc_MENU_LOGO);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
PMC(APBDEV_PMC_SCRATCH0) = 2; // Reboot into rcm.
|
||||
PMC(0) |= 0x10;
|
||||
while (true)
|
||||
usleep(1);
|
||||
}
|
||||
|
||||
void power_off()
|
||||
{
|
||||
sd_unmount();
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
free(Kc_MENU_LOGO);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
//TODO: we should probably make sure all regulators are powered off properly.
|
||||
i2c_send_byte(I2C_5, 0x3C, MAX77620_REG_ONOFFCNFG1, MAX77620_ONOFFCNFG1_PWR_OFF);
|
||||
}
|
||||
|
||||
int dump_emmc_verify(sdmmc_storage_t *storage, u32 lba_curr, char *outFilename, emmc_part_t *part)
|
||||
{
|
||||
FIL fp;
|
||||
@ -3182,7 +3184,8 @@ void ipl_main()
|
||||
set_default_configuration();
|
||||
|
||||
// Save sdram lp0 config.
|
||||
ianos_loader(true, "bootloader/sys/libsys_lp0.bso", DRAM_LIB, (void *)sdram_get_params());
|
||||
if (ianos_loader(true, "bootloader/sys/libsys_lp0.bso", DRAM_LIB, (void *)sdram_get_params()))
|
||||
h_cfg.errors |= ERR_LIBSYS_LP0;
|
||||
|
||||
display_init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user