mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
Finish writing stratosphere_get_ini1
This commit is contained in:
parent
6efe91b083
commit
1288f54965
2 changed files with 10 additions and 10 deletions
|
@ -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, \
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue