Support for hekate to boot hos with emusd/emmc base emummc

This commit is contained in:
Christoph Baumann
2025-05-14 02:24:33 +02:00
parent af39c76b3a
commit 154ed594fc
9 changed files with 155 additions and 31 deletions

View File

@@ -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;
}

View File

@@ -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