1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-22 18:06:40 +00:00

fss0: Support experimental content

Use key `fss0experimental=1` in a boot entry with `fss0=` defined to enable experimental content.

(Older versions of hekate will just skip any experimental content.)
This commit is contained in:
CTCaer 2020-03-09 08:58:12 +02:00
parent 8d5c52f087
commit 8abda7f259
4 changed files with 20 additions and 1 deletions

View file

@ -70,6 +70,7 @@ You can find a template [Here](./res/hekate_ipl_template.ini)
| kip1={SD path} | Replaces/Adds kernel initial process. Multiple can be set. |
| kip1={SD folder}/* | Loads every .kip/.kip1 inside a folder. Compatible with single kip1 keys. |
| fss0={SD path} | Takes a fusee-secondary binary and `extracts` all needed parts from it. kips, exosphere, warmboot and sept. |
| fss0experimental=1 | Enables loading of experimental content from a FSS0 storage |
| kip1patch=patchname | Enables a kip1 patch. Specify with multiple lines and/or as CSV. If not found, an error will show up |
| fullsvcperm=1 | Disables SVC verification (full services permission) |
| debugmode=1 | Enables Debug mode. Obsolete when used with exosphere as secmon. |

View file

@ -44,6 +44,8 @@ extern bool is_ipl_updated(void *buf, char *path, bool force);
#define CNT_TYPE_BMP 7
#define CNT_TYPE_EMC 8
#define CNT_FLAG0_EXPERIMENTAL (1 << 0)
typedef struct _fss_t
{
u32 magic;
@ -60,7 +62,10 @@ typedef struct _fss_content_t
{
u32 offset;
u32 size;
u32 type;
u8 type;
u8 flags0;
u8 flags1;
u8 flags2;
u32 rsvd1;
char name[0x10];
} fss_content_t;
@ -142,6 +147,9 @@ int parse_fss(launch_ctxt_t *ctxt, const char *path, fss0_sept_t *sept_ctxt)
if ((curr_fss_cnt[i].offset + curr_fss_cnt[i].size) > fss_meta->size)
continue;
if ((curr_fss_cnt[i].flags0 & CNT_FLAG0_EXPERIMENTAL) && !ctxt->fss0_enable_experimental)
continue;
// Load content to launch context.
if (!sept_ctxt)
{

View file

@ -67,6 +67,7 @@ typedef struct _launch_ctxt_t
bool atmosphere;
bool exo_no_user_exceptions;
bool exo_user_pmu;
bool fss0_enable_experimental;
bool emuMMC;
ini_sec_t *cfg;

View file

@ -213,6 +213,15 @@ static int _config_exo_user_pmu_access(launch_ctxt_t *ctxt, const char *value)
static int _config_fss(launch_ctxt_t *ctxt, const char *value)
{
LIST_FOREACH_ENTRY(ini_kv_t, kv, &ctxt->cfg->kvs, link)
{
if (!strcmp("fss0experimental", kv->key))
{
ctxt->fss0_enable_experimental = *kv->val == '1';
break;
}
}
return parse_fss(ctxt, value, NULL);
}