Support for hekate to boot hos with emusd/emmc base emummc
This commit is contained in:
@@ -250,4 +250,18 @@ int boot_storage_save_to_file(const void *buf, u32 size, const char *filename)
|
||||
f_close(&fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
FATFS *boot_storage_get_fs() {
|
||||
switch(drive_cur){
|
||||
case DRIVE_BOOT1:
|
||||
return &boot_storage_fs;
|
||||
case DRIVE_EMMC:
|
||||
return &emmc_fs;
|
||||
case DRIVE_BOOT1_1MB:
|
||||
return &boot_storage_fs;
|
||||
case DRIVE_SD:
|
||||
return &sd_fs;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _BOOT_STORAGE_H
|
||||
#define _BOOT_STORAGE_H
|
||||
|
||||
#include <libs/fatfs/ff.h>
|
||||
#include <utils/types.h>
|
||||
|
||||
// check if boot1 (1mb), boot1, gpp, sd (in that order) have fat32 partition,
|
||||
@@ -16,6 +17,8 @@ bool boot_storage_get_initialized();
|
||||
void *boot_storage_file_read(const char *path, u32 *fsize);
|
||||
int boot_storage_save_to_file(const void *buf, u32 size, const char *filename);
|
||||
|
||||
FATFS *boot_storage_get_fs();
|
||||
|
||||
u8 boot_storage_get_drive();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user