mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-23 02:16:41 +00:00
nyx: fix pkg1 dump/split
Broken since v5.3.1.
This commit is contained in:
parent
7f92f65c26
commit
07dafe8185
1 changed files with 1 additions and 14 deletions
|
@ -1229,22 +1229,9 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn)
|
||||||
|
|
||||||
if (h_cfg.t210b01 || kb <= KB_FIRMWARE_VERSION_620)
|
if (h_cfg.t210b01 || kb <= KB_FIRMWARE_VERSION_620)
|
||||||
{
|
{
|
||||||
const u8 *sec_map = pkg1_unpack(warmboot, secmon, loader, pkg1_id, pkg1 + pk1_offset);
|
pkg1_unpack(warmboot, secmon, loader, pkg1_id, pkg1 + pk1_offset);
|
||||||
|
|
||||||
pk11_hdr_t *hdr_pk11 = (pk11_hdr_t *)(pkg1 + pk1_offset + pkg1_id->pkg11_off + 0x20);
|
pk11_hdr_t *hdr_pk11 = (pk11_hdr_t *)(pkg1 + pk1_offset + pkg1_id->pkg11_off + 0x20);
|
||||||
|
|
||||||
// Use correct sizes.
|
|
||||||
u32 sec_size[3] = { hdr_pk11->wb_size, hdr_pk11->ldr_size, hdr_pk11->sm_size };
|
|
||||||
for (u32 i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
if (sec_map[i] == PK11_SECTION_WB)
|
|
||||||
hdr_pk11->wb_size = sec_size[i];
|
|
||||||
else if (sec_map[i] == PK11_SECTION_LD)
|
|
||||||
hdr_pk11->ldr_size = sec_size[i];
|
|
||||||
else if (sec_map[i] == PK11_SECTION_SM)
|
|
||||||
hdr_pk11->sm_size = sec_size[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display info.
|
// Display info.
|
||||||
s_printf(txt_buf + strlen(txt_buf),
|
s_printf(txt_buf + strlen(txt_buf),
|
||||||
"#C7EA46 NX Bootloader size: #0x%05X\n"
|
"#C7EA46 NX Bootloader size: #0x%05X\n"
|
||||||
|
|
Loading…
Reference in a new issue