mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-10 04:21:45 +00:00
hos: Add identification for hos 5.1.0
This commit is contained in:
parent
3c6c92aa9c
commit
3aa195943d
2 changed files with 16 additions and 6 deletions
|
@ -610,7 +610,7 @@ static void _free_launch_components(launch_ctxt_t *ctxt)
|
||||||
free(ctxt->kip1_patches);
|
free(ctxt->kip1_patches);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _get_fs_exfat_compatible(link_t *info)
|
static bool _get_fs_exfat_compatible(link_t *info, bool *fs_is_510)
|
||||||
{
|
{
|
||||||
u32 fs_idx;
|
u32 fs_idx;
|
||||||
u32 fs_ids_cnt;
|
u32 fs_ids_cnt;
|
||||||
|
@ -631,6 +631,10 @@ static bool _get_fs_exfat_compatible(link_t *info)
|
||||||
if (!memcmp(sha_buf, kip_ids[fs_idx].hash, 8))
|
if (!memcmp(sha_buf, kip_ids[fs_idx].hash, 8))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Check if it's 5.1.0.
|
||||||
|
if ((fs_idx & ~1) == 16)
|
||||||
|
*fs_is_510 = true;
|
||||||
|
|
||||||
// Return false if FAT32 only.
|
// Return false if FAT32 only.
|
||||||
if (fs_ids_cnt <= fs_idx && !(fs_idx & 1))
|
if (fs_ids_cnt <= fs_idx && !(fs_idx & 1))
|
||||||
return false;
|
return false;
|
||||||
|
@ -888,13 +892,18 @@ int hos_launch(ini_sec_t *cfg)
|
||||||
LIST_FOREACH_ENTRY(merge_kip_t, mki, &ctxt.kip1_list, link)
|
LIST_FOREACH_ENTRY(merge_kip_t, mki, &ctxt.kip1_list, link)
|
||||||
pkg2_merge_kip(&kip1_info, (pkg2_kip1_t *)mki->kip1);
|
pkg2_merge_kip(&kip1_info, (pkg2_kip1_t *)mki->kip1);
|
||||||
|
|
||||||
// Check if FS is compatible with exFAT.
|
// Check if FS is compatible with exFAT and if 5.1.0.
|
||||||
if (!ctxt.stock && sd_fs.fs_type == FS_EXFAT && !_get_fs_exfat_compatible(&kip1_info))
|
if (!ctxt.stock && (sd_fs.fs_type == FS_EXFAT || kb == KB_FIRMWARE_VERSION_500))
|
||||||
{
|
{
|
||||||
_hos_crit_error("SD Card is exFAT and the installed\nFS only supports FAT32!");
|
bool exfat_compat = _get_fs_exfat_compatible(&kip1_info, &ctxt.exo_ctx.fs_is_510);
|
||||||
|
|
||||||
_free_launch_components(&ctxt);
|
if (sd_fs.fs_type == FS_EXFAT && !exfat_compat)
|
||||||
goto error;
|
{
|
||||||
|
_hos_crit_error("SD Card is exFAT and installed HOS driver\nonly supports FAT32!");
|
||||||
|
|
||||||
|
_free_launch_components(&ctxt);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch kip1s in memory if needed.
|
// Patch kip1s in memory if needed.
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
typedef struct _exo_ctxt_t
|
typedef struct _exo_ctxt_t
|
||||||
{
|
{
|
||||||
|
bool fs_is_510;
|
||||||
bool no_user_exceptions;
|
bool no_user_exceptions;
|
||||||
bool user_pmu;
|
bool user_pmu;
|
||||||
bool *cal0_blank;
|
bool *cal0_blank;
|
||||||
|
|
Loading…
Reference in a new issue