hos: automatically find new kernel ini1 offset

This commit is contained in:
CTCaer
2019-09-12 23:37:00 +03:00
parent 3b16b086f8
commit 658c3c112f
7 changed files with 46 additions and 16 deletions

View File

@@ -27,9 +27,12 @@
#define PKG2_SEC_INI1 1
#define INI1_MAGIC 0x31494E49
#define PKG2_NEWKERN_INI1_START 0x168
#define PKG2_NEWKERN_INI1_END 0x170
#define PKG2_NEWKERN_START 0x800
#define PKG2_NEWKERN_GET_INI1 0x44
#define PKG2_NEWKERN_START 0x800
u32 pkg2_newkern_ini1_val;
u32 pkg2_newkern_ini1_start;
u32 pkg2_newkern_ini1_end;
typedef struct _kernel_patch_t
{
@@ -139,6 +142,7 @@ typedef struct _kip1_id_t
kip1_patchset_t* patchset;
} kip1_id_t;
void pkg2_get_newkern_info(u8 *kern_data);
void pkg2_parse_kips(link_t *info, pkg2_hdr_t *pkg2, bool *new_pkg2);
int pkg2_has_kip(link_t *info, u64 tid);
void pkg2_replace_kip(link_t *info, u64 tid, pkg2_kip1_t *kip1);