mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-28 09:30:58 +01:00
fusee: Load fs.mitm by default.
This commit is contained in:
parent
11159f5fa9
commit
49f627bb28
@ -69,7 +69,7 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export KIPDIRS := $(AMS)/stratosphere/loader $(AMS)/stratosphere/pm $(AMS)/stratosphere/sm $(AMS)/stratosphere/boot
|
||||
export KIPDIRS := $(AMS)/stratosphere/loader $(AMS)/stratosphere/pm $(AMS)/stratosphere/sm $(AMS)/stratosphere/boot $(AMS)/stratosphere/fs_mitm
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
|
||||
$(AMS)/exosphere $(AMS)/thermosphere $(KIPDIRS)
|
||||
@ -79,7 +79,7 @@ export DEPSDIR := $(CURDIR)/$(BUILD)
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
KIPFILES := loader.kip pm.kip sm.kip boot_100.kip boot_200.kip
|
||||
KIPFILES := loader.kip pm.kip sm.kip fs_mitm.kip boot_100.kip boot_200.kip
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) exosphere.bin thermosphere.bin splash_screen.bmp $(KIPFILES)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
@ -101,13 +101,13 @@ int main(int argc, void **argv) {
|
||||
|
||||
g_do_nxboot = loader_ctx->chainload_entrypoint == 0;
|
||||
if (g_do_nxboot) {
|
||||
print(SCREEN_LOG_LEVEL_INFO, "Now performing nxboot.\n");
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, "Now performing nxboot.\n");
|
||||
uint32_t boot_memaddr = nxboot_main();
|
||||
nxboot_finish(boot_memaddr);
|
||||
} else {
|
||||
/* TODO: What else do we want to do in terms of argc/argv? */
|
||||
const char *path = get_loader_ctx()->file_paths_to_load[get_loader_ctx()->file_id_of_entrypoint];
|
||||
print(SCREEN_LOG_LEVEL_INFO, "Now chainloading.\n");
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, "Now chainloading.\n");
|
||||
g_chainloader_argc = 1;
|
||||
strcpy(g_chainloader_arg_data, path);
|
||||
}
|
||||
|
@ -292,6 +292,8 @@ uint32_t nxboot_main(void) {
|
||||
fatal_error("[NXBOOT]: Failed to detect target firmware!\n");
|
||||
else
|
||||
print(SCREEN_LOG_LEVEL_INFO, "[NXBOOT]: Detected target firmware %ld!\n", target_firmware);
|
||||
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, "[NXBOOT]: Loaded firmware from eMMC...\n");
|
||||
|
||||
/* Setup boot configuration for Exosphère. */
|
||||
nxboot_configure_exosphere(target_firmware);
|
||||
@ -357,7 +359,7 @@ uint32_t nxboot_main(void) {
|
||||
pmc->scratch1 = (uint32_t)warmboot_memaddr;
|
||||
}
|
||||
|
||||
print(SCREEN_LOG_LEVEL_INFO, "[NXBOOT]: Rebuilding package2...\n");
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, "[NXBOOT]: Rebuilding package2...\n");
|
||||
|
||||
/* Patch package2, adding Thermosphère + custom KIPs. */
|
||||
package2_rebuild_and_copy(package2, MAILBOX_EXOSPHERE_CONFIGURATION->target_firmware);
|
||||
|
@ -38,12 +38,13 @@ static ini1_header_t *g_stratosphere_ini1 = NULL;
|
||||
static bool g_stratosphere_loader_enabled = true;
|
||||
static bool g_stratosphere_sm_enabled = true;
|
||||
static bool g_stratosphere_pm_enabled = true;
|
||||
static bool g_stratosphere_fs_mitm_enabled = true;
|
||||
static bool g_stratosphere_boot_enabled = false;
|
||||
|
||||
extern const uint8_t boot_100_kip[], boot_200_kip[];
|
||||
extern const uint8_t loader_kip[], pm_kip[], sm_kip[];
|
||||
extern const uint8_t loader_kip[], pm_kip[], sm_kip[], fs_mitm_kip[];
|
||||
extern const uint32_t boot_100_kip_size, boot_200_kip_size;
|
||||
extern const uint32_t loader_kip_size, pm_kip_size, sm_kip_size;
|
||||
extern const uint32_t loader_kip_size, pm_kip_size, sm_kip_size, fs_mitm_kip_size;
|
||||
|
||||
/* GCC doesn't consider the size as const... we have to write it ourselves. */
|
||||
|
||||
@ -83,6 +84,11 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) {
|
||||
num_processes++;
|
||||
}
|
||||
|
||||
if (g_stratosphere_fs_mitm_enabled) {
|
||||
size += fs_mitm_kip_size;
|
||||
num_processes++;
|
||||
}
|
||||
|
||||
if (g_stratosphere_boot_enabled) {
|
||||
size += boot_kip_size;
|
||||
num_processes++;
|
||||
@ -117,6 +123,11 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) {
|
||||
data += sm_kip_size;
|
||||
}
|
||||
|
||||
if (g_stratosphere_fs_mitm_enabled) {
|
||||
memcpy(data, fs_mitm_kip, fs_mitm_kip_size);
|
||||
data += fs_mitm_kip_size;
|
||||
}
|
||||
|
||||
if (g_stratosphere_boot_enabled) {
|
||||
memcpy(data, boot_kip, boot_kip_size);
|
||||
data += boot_kip_size;
|
||||
|
Loading…
Reference in New Issue
Block a user