bootloader: improve launch code

- Fix error not showing if payload is missing or can't be read
- Move errors to their callee function to save binary space
- Refactor various parameters and comments
- Reduce size on some errors
- Do not read HOS specific config in case of payload launch
- Remove unneeded code
This commit is contained in:
CTCaer
2022-10-11 07:21:41 +03:00
parent e7866387cd
commit c0b16320cc
3 changed files with 134 additions and 163 deletions

View File

@@ -158,7 +158,7 @@ int parse_fss(launch_ctxt_t *ctxt, const char *path)
// Check if valid FSS0 and parse it.
if (fss_meta->magic == FSS0_MAGIC)
{
gfx_printf("Found FSS/PK3, Atmosphere %d.%d.%d-%08x\n"
gfx_printf("Atmosphere %d.%d.%d-%08x via FSS0/PKG3\n"
"Max HOS: %d.%d.%d\n"
"Unpacking.. ",
fss_meta->version >> 24, (fss_meta->version >> 16) & 0xFF, (fss_meta->version >> 8) & 0xFF, fss_meta->git_rev,

View File

@@ -1178,5 +1178,7 @@ int hos_launch(ini_sec_t *cfg)
error:
emmc_end();
EPRINTF("\nFailed to launch HOS!");
return 0;
}