emunand: Move all emulation code to fusee-secondary and simplify logic

This commit is contained in:
hexkyz
2019-04-07 19:02:01 +01:00
parent 9eb0b84ed1
commit 92816be055
8 changed files with 315 additions and 193 deletions

View File

@@ -51,8 +51,9 @@ static void setup_env(void) {
/* Set up exception handlers. */
setup_exception_handlers();
if (nxfs_mount_all(g_stage2_args->emunand_enabled, g_stage2_args->emunand_path) < 0) {
fatal_error("Failed to mount at least one partition: %s\n", strerror(errno));
/* Initialize the file system by mounting the SD card. */
if (nxfs_init() < 0) {
fatal_error("Failed to initialize the file system: %s\n", strerror(errno));
}
/* Train DRAM. */
@@ -61,7 +62,7 @@ static void setup_env(void) {
static void cleanup_env(void) {
/* Unmount everything (this causes all open files to be flushed and closed) */
nxfs_unmount_all();
nxfs_end();
//console_end();
}