mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +00:00
nyx: Fix pkg1/2 dumping with new changes
This commit is contained in:
parent
edba8ca986
commit
0738c96867
2 changed files with 17 additions and 6 deletions
|
@ -1143,10 +1143,21 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn)
|
|||
tsec_ctxt.pkg11_off = pkg1_id->pkg11_off;
|
||||
tsec_ctxt.secmon_base = pkg1_id->secmon_base;
|
||||
|
||||
hos_eks_get();
|
||||
|
||||
if (kb >= KB_FIRMWARE_VERSION_700 && !h_cfg.sept_run)
|
||||
{
|
||||
u32 key_idx = 0;
|
||||
if (kb >= KB_FIRMWARE_VERSION_810)
|
||||
key_idx = 1;
|
||||
|
||||
if (h_cfg.eks && h_cfg.eks->enabled[key_idx] >= kb)
|
||||
h_cfg.sept_run = true;
|
||||
else
|
||||
{
|
||||
b_cfg->autoboot = 0;
|
||||
b_cfg->autoboot_list = 0;
|
||||
b_cfg->extra_cfg = EXTRA_CFG_NYX_DUMP;
|
||||
|
||||
if (!reboot_to_sept((u8 *)tsec_ctxt.fw, kb))
|
||||
{
|
||||
|
@ -1154,6 +1165,7 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn)
|
|||
goto out_free;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Read keyblob.
|
||||
u8 *keyblob = (u8 *)calloc(NX_EMMC_BLOCKSIZE, 1);
|
||||
|
|
|
@ -171,7 +171,6 @@ int reboot_to_sept(const u8 *tsec_fw, u32 kb)
|
|||
f_close(&fp);
|
||||
|
||||
b_cfg->boot_cfg |= (BOOT_CFG_AUTOBOOT_EN | BOOT_CFG_SEPT_RUN);
|
||||
b_cfg->extra_cfg = EXTRA_CFG_NYX_DUMP;
|
||||
|
||||
bool update_sept_payload = true;
|
||||
if (!f_open(&fp, "sept/payload.bin", FA_READ | FA_WRITE))
|
||||
|
|
Loading…
Reference in a new issue