Support for NYX to load from BOOT1/GPP/SD in that order, UMS option to mount whatever volume is selected as boot storage
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <storage/boot_storage.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <bdk.h>
|
||||
@@ -84,7 +85,7 @@ typedef struct _fss_content_t
|
||||
|
||||
static void _fss_update_r2p()
|
||||
{
|
||||
u8 *r2p_payload = sd_file_read("atmosphere/reboot_payload.bin", NULL);
|
||||
u8 *r2p_payload = boot_storage_file_read("atmosphere/reboot_payload.bin", NULL);
|
||||
|
||||
is_ipl_updated(r2p_payload, "atmosphere/reboot_payload.bin", h_cfg.updater2p ? true : false);
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ int hos_keygen(void *keyblob, u32 kb, tsec_ctxt_t *tsec_ctxt, bool stock, bool i
|
||||
*/
|
||||
|
||||
// Use custom TSEC Hovi Keygen firmware.
|
||||
tsec_ctxt->fw = sd_file_read("bootloader/sys/thk.bin", NULL);
|
||||
tsec_ctxt->fw = boot_storage_file_read("bootloader/sys/thk.bin", NULL);
|
||||
if (!tsec_ctxt->fw)
|
||||
{
|
||||
_hos_crit_error("\nFailed to load thk.bin");
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <storage/boot_storage.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <bdk.h>
|
||||
@@ -29,7 +30,7 @@
|
||||
|
||||
static int _config_warmboot(launch_ctxt_t *ctxt, const char *value)
|
||||
{
|
||||
ctxt->warmboot = sd_file_read(value, &ctxt->warmboot_size);
|
||||
ctxt->warmboot = boot_storage_file_read(value, &ctxt->warmboot_size);
|
||||
if (!ctxt->warmboot)
|
||||
return 0;
|
||||
|
||||
@@ -38,7 +39,7 @@ static int _config_warmboot(launch_ctxt_t *ctxt, const char *value)
|
||||
|
||||
static int _config_secmon(launch_ctxt_t *ctxt, const char *value)
|
||||
{
|
||||
ctxt->secmon = sd_file_read(value, &ctxt->secmon_size);
|
||||
ctxt->secmon = boot_storage_file_read(value, &ctxt->secmon_size);
|
||||
if (!ctxt->secmon)
|
||||
return 0;
|
||||
|
||||
@@ -47,7 +48,7 @@ static int _config_secmon(launch_ctxt_t *ctxt, const char *value)
|
||||
|
||||
static int _config_kernel(launch_ctxt_t *ctxt, const char *value)
|
||||
{
|
||||
ctxt->kernel = sd_file_read(value, &ctxt->kernel_size);
|
||||
ctxt->kernel = boot_storage_file_read(value, &ctxt->kernel_size);
|
||||
if (!ctxt->kernel)
|
||||
return 0;
|
||||
|
||||
@@ -81,7 +82,7 @@ static int _config_kip1(launch_ctxt_t *ctxt, const char *value)
|
||||
strcpy(dir + dirlen, filelist->name[i]);
|
||||
|
||||
merge_kip_t *mkip1 = (merge_kip_t *)malloc(sizeof(merge_kip_t));
|
||||
mkip1->kip1 = sd_file_read(dir, &size);
|
||||
mkip1->kip1 = boot_storage_file_read(dir, &size);
|
||||
if (!mkip1->kip1)
|
||||
{
|
||||
free(mkip1);
|
||||
@@ -103,7 +104,7 @@ static int _config_kip1(launch_ctxt_t *ctxt, const char *value)
|
||||
else
|
||||
{
|
||||
merge_kip_t *mkip1 = (merge_kip_t *)malloc(sizeof(merge_kip_t));
|
||||
mkip1->kip1 = sd_file_read(value, &size);
|
||||
mkip1->kip1 = boot_storage_file_read(value, &size);
|
||||
if (!mkip1->kip1)
|
||||
{
|
||||
free(mkip1);
|
||||
@@ -265,7 +266,7 @@ static int _config_fss(launch_ctxt_t *ctxt, const char *value)
|
||||
|
||||
static int _config_exo_fatal_payload(launch_ctxt_t *ctxt, const char *value)
|
||||
{
|
||||
ctxt->exofatal = sd_file_read(value, &ctxt->exofatal_size);
|
||||
ctxt->exofatal = boot_storage_file_read(value, &ctxt->exofatal_size);
|
||||
if (!ctxt->exofatal)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <storage/boot_storage.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -387,7 +388,7 @@ int pkg1_warmboot_config(void *hos_ctxt, u32 warmboot_base, u32 fuses_fw, u8 kb)
|
||||
_warmboot_filename(path, burnt_fuses);
|
||||
if (!f_stat(path, NULL))
|
||||
{
|
||||
ctxt->warmboot = sd_file_read(path, &ctxt->warmboot_size);
|
||||
ctxt->warmboot = boot_storage_file_read(path, &ctxt->warmboot_size);
|
||||
burnt_fuses = tmp_fuses;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <storage/boot_storage.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <bdk.h>
|
||||
@@ -382,7 +383,7 @@ static int _kipm_inject(const char *kipm_path, char *target_name, pkg2_kip1_info
|
||||
if (!strcmp((char *)ki->kip1->name, target_name))
|
||||
{
|
||||
u32 size = 0;
|
||||
u8 *kipm_data = (u8 *)sd_file_read(kipm_path, &size);
|
||||
u8 *kipm_data = (u8 *)boot_storage_file_read(kipm_path, &size);
|
||||
if (!kipm_data)
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user