diff --git a/fusee/fusee-secondary/Makefile b/fusee/fusee-secondary/Makefile index 0f828582f..4fb23141a 100644 --- a/fusee/fusee-secondary/Makefile +++ b/fusee/fusee-secondary/Makefile @@ -37,9 +37,7 @@ LDFLAGS = -specs=linker.specs -g $(ARCH) bundled = $(dir_exosphere)/out/exosphere.bin $(dir_thermosphere)/out/thermosphere.bin \ $(dir_stratosphere)/loader/loader.kip $(dir_stratosphere)/pm/pm.kip \ - $(dir_stratosphere)/sm/sm.kip - -#$(dir_stratosphere)/boot/boot.kip $(dir_stratosphere)/boot2/boot2.kip + $(dir_stratosphere)/sm/sm.kip $(dir_stratosphere)/boot/boot_100.kip $(dir_stratosphere)/boot/boot_200.kip objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ $(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \ diff --git a/fusee/fusee-secondary/src/stratosphere.c b/fusee/fusee-secondary/src/stratosphere.c index 22c25b5ea..aa0bfb6fc 100644 --- a/fusee/fusee-secondary/src/stratosphere.c +++ b/fusee/fusee-secondary/src/stratosphere.c @@ -9,16 +9,16 @@ static ini1_header_t *g_stratosphere_ini1 = NULL; -//extern const uint8_t boot_100_kip[], boot_200_kip[]; +extern const uint8_t boot_100_kip[], boot_200_kip[]; extern const uint8_t loader_kip[], pm_kip[], sm_kip[]; -//extern const uint32_t boot_100_kip_size, boot_200_kip_size; +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; /* GCC doesn't consider the size as const... we have to write it ourselves. */ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) { - //const uint8_t *boot_kip = NULL; - const uint32_t boot_kip_size = 0; + const uint8_t *boot_kip = NULL; + uint32_t boot_kip_size = 0; uint8_t *data; if (g_stratosphere_ini1 != NULL) { @@ -26,9 +26,11 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) { } if (target_firmware <= EXOSPHERE_TARGET_FIRMWARE_100) { - /* TODO. */ + boot_kip = boot_100_kip; + boot_kip_size = boot_100_kip_size; } else { - /* TODO. */ + boot_kip = boot_200_kip; + boot_kip_size = boot_200_kip_size; } size_t size = sizeof(ini1_header_t) + loader_kip_size + pm_kip_size + sm_kip_size + boot_kip_size; @@ -56,7 +58,7 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) { memcpy(data, sm_kip, sm_kip_size); data += sm_kip_size; -// memcpy(data, boot_kip, boot_kip_size); + memcpy(data, boot_kip, boot_kip_size); data += boot_kip_size; return g_stratosphere_ini1;