mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-09 13:41:45 +00:00
Step 5: Scare the init bugs away
Seriously though why the fuck was this the issue
This commit is contained in:
parent
5c59d42a30
commit
09fc492610
4 changed files with 9 additions and 67 deletions
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2020 CTCaer
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms and conditions of the GNU General Public License,
|
|
||||||
* version 2, as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <bdk.h>
|
|
||||||
|
|
||||||
extern hekate_config h_cfg;
|
|
||||||
|
|
||||||
void set_default_configuration()
|
|
||||||
{
|
|
||||||
h_cfg.autoboot = 0;
|
|
||||||
h_cfg.autoboot_list = 0;
|
|
||||||
h_cfg.bootwait = 3;
|
|
||||||
h_cfg.backlight = 100;
|
|
||||||
h_cfg.autohosoff = 0;
|
|
||||||
h_cfg.autonogc = 1;
|
|
||||||
h_cfg.updater2p = 0;
|
|
||||||
h_cfg.bootprotect = 0;
|
|
||||||
h_cfg.errors = 0;
|
|
||||||
h_cfg.rcm_patched = fuse_check_patched_rcm();
|
|
||||||
h_cfg.emummc_force_disable = false;
|
|
||||||
h_cfg.t210b01 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01;
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2019 CTCaer
|
* Copyright (c) 2018-2021 CTCaer
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -17,35 +17,15 @@
|
||||||
#ifndef _CONFIG_H_
|
#ifndef _CONFIG_H_
|
||||||
#define _CONFIG_H_
|
#define _CONFIG_H_
|
||||||
|
|
||||||
#include <utils/types.h>
|
#include <bdk.h>
|
||||||
|
|
||||||
typedef struct _hekate_config
|
typedef struct _hekate_config
|
||||||
{
|
{
|
||||||
// Non-volatile config.
|
|
||||||
u32 autoboot;
|
|
||||||
u32 autoboot_list;
|
|
||||||
u32 bootwait;
|
|
||||||
u32 backlight;
|
|
||||||
u32 autohosoff;
|
|
||||||
u32 autonogc;
|
|
||||||
u32 updater2p;
|
|
||||||
u32 bootprotect;
|
|
||||||
// Global temporary config.
|
// Global temporary config.
|
||||||
bool t210b01;
|
bool t210b01;
|
||||||
bool se_keygen_done;
|
|
||||||
bool sept_run;
|
|
||||||
bool aes_slots_new;
|
|
||||||
bool emummc_force_disable;
|
bool emummc_force_disable;
|
||||||
bool rcm_patched;
|
bool rcm_patched;
|
||||||
u32 errors;
|
u32 errors;
|
||||||
} hekate_config;
|
} hekate_config;
|
||||||
|
|
||||||
void set_default_configuration();
|
|
||||||
int create_config_entry();
|
|
||||||
void config_autoboot();
|
|
||||||
void config_bootdelay();
|
|
||||||
void config_backlight();
|
|
||||||
void config_auto_hos_poweroff();
|
|
||||||
void config_nogc();
|
|
||||||
|
|
||||||
#endif /* _CONFIG_H_ */
|
#endif /* _CONFIG_H_ */
|
||||||
|
|
|
@ -71,7 +71,6 @@ void DeleteFile(char *path, FSEntry_t entry){
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunScriptString(char *str, u32 size){
|
void RunScriptString(char *str, u32 size){
|
||||||
return;
|
|
||||||
TConf.scriptCWD = "sd:/";
|
TConf.scriptCWD = "sd:/";
|
||||||
gfx_clearscreen();
|
gfx_clearscreen();
|
||||||
ParserRet_t ret = parseScript(str, size);
|
ParserRet_t ret = parseScript(str, size);
|
||||||
|
@ -86,7 +85,6 @@ void RunScriptString(char *str, u32 size){
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunScript(char *path, FSEntry_t entry){
|
void RunScript(char *path, FSEntry_t entry){
|
||||||
return;
|
|
||||||
char *thing = CombinePaths(path, entry.name);
|
char *thing = CombinePaths(path, entry.name);
|
||||||
u32 size;
|
u32 size;
|
||||||
char *script = sd_file_read(thing, &size);
|
char *script = sd_file_read(thing, &size);
|
||||||
|
|
|
@ -221,8 +221,13 @@ void ipl_main()
|
||||||
uart_wait_idle(DEBUG_UART_PORT, UART_TX_IDLE);
|
uart_wait_idle(DEBUG_UART_PORT, UART_TX_IDLE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set bootloader's default configuration.
|
// Set hekate's default configuration
|
||||||
set_default_configuration();
|
h_cfg.errors = 0;
|
||||||
|
h_cfg.rcm_patched = fuse_check_patched_rcm();
|
||||||
|
h_cfg.emummc_force_disable = false;
|
||||||
|
h_cfg.t210b01 = !!(hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01);
|
||||||
|
|
||||||
|
display_init();
|
||||||
|
|
||||||
// Mount SD Card.
|
// Mount SD Card.
|
||||||
h_cfg.errors |= !sd_mount() ? ERR_SD_BOOT_EN : 0;
|
h_cfg.errors |= !sd_mount() ? ERR_SD_BOOT_EN : 0;
|
||||||
|
@ -235,8 +240,6 @@ void ipl_main()
|
||||||
h_cfg.errors |= ERR_LIBSYS_MTC;
|
h_cfg.errors |= ERR_LIBSYS_MTC;
|
||||||
minerva_change_freq(FREQ_1600);
|
minerva_change_freq(FREQ_1600);
|
||||||
|
|
||||||
display_init();
|
|
||||||
|
|
||||||
u32 *fb = display_init_framebuffer_pitch();
|
u32 *fb = display_init_framebuffer_pitch();
|
||||||
gfx_init_ctxt(fb, 720, 1280, 720);
|
gfx_init_ctxt(fb, 720, 1280, 720);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue