mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
fusee: embed spl.
This commit is contained in:
parent
edcfbf4254
commit
51858e732a
5 changed files with 27 additions and 5 deletions
|
@ -84,7 +84,7 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||||
export TOPDIR := $(CURDIR)
|
export TOPDIR := $(CURDIR)
|
||||||
|
|
||||||
export KIPDIRS := $(AMS)/stratosphere/loader $(AMS)/stratosphere/pm $(AMS)/stratosphere/sm $(AMS)/stratosphere/boot $(AMS)/stratosphere/ams_mitm
|
export KIPDIRS := $(AMS)/stratosphere/loader $(AMS)/stratosphere/pm $(AMS)/stratosphere/sm $(AMS)/stratosphere/boot $(AMS)/stratosphere/spl $(AMS)/stratosphere/ams_mitm
|
||||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
|
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
|
||||||
$(AMS)/exosphere $(AMS)/exosphere/lp0fw $(AMS)/exosphere/rebootstub \
|
$(AMS)/exosphere $(AMS)/exosphere/lp0fw $(AMS)/exosphere/rebootstub \
|
||||||
|
@ -96,7 +96,7 @@ export DEPSDIR := $(CURDIR)/$(BUILD)
|
||||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
KIPFILES := loader.kip pm.kip sm.kip ams_mitm.kip boot_100.kip boot_200.kip
|
KIPFILES := loader.kip pm.kip sm.kip ams_mitm.kip spl.kip boot_100.kip boot_200.kip
|
||||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) fusee-primary.bin \
|
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) fusee-primary.bin \
|
||||||
exosphere.bin lp0fw.bin rebootstub.bin thermosphere.bin splash_screen.bmp \
|
exosphere.bin lp0fw.bin rebootstub.bin thermosphere.bin splash_screen.bmp \
|
||||||
sept-primary.bin sept-secondary.enc \
|
sept-primary.bin sept-secondary.enc \
|
||||||
|
|
|
@ -242,6 +242,8 @@ SECTIONS
|
||||||
PROVIDE(__sept_secondary_enc_size__ = sept_secondary_enc_end - sept_secondary_enc);
|
PROVIDE(__sept_secondary_enc_size__ = sept_secondary_enc_end - sept_secondary_enc);
|
||||||
PROVIDE(__sm_kip_start__ = sm_kip - __start__);
|
PROVIDE(__sm_kip_start__ = sm_kip - __start__);
|
||||||
PROVIDE(__sm_kip_size__ = sm_kip_end - sm_kip);
|
PROVIDE(__sm_kip_size__ = sm_kip_end - sm_kip);
|
||||||
|
PROVIDE(__spl_kip_start__ = spl_kip - __start__);
|
||||||
|
PROVIDE(__spl_kip_size__ = spl_kip_end - spl_kip);
|
||||||
PROVIDE(__splash_screen_bmp_start__ = splash_screen_bmp - __start__);
|
PROVIDE(__splash_screen_bmp_start__ = splash_screen_bmp - __start__);
|
||||||
PROVIDE(__splash_screen_bmp_size__ = splash_screen_bmp_end - splash_screen_bmp);
|
PROVIDE(__splash_screen_bmp_size__ = splash_screen_bmp_end - splash_screen_bmp);
|
||||||
PROVIDE(__thermosphere_bin_start__ = thermosphere_bin - __start__);
|
PROVIDE(__thermosphere_bin_start__ = thermosphere_bin - __start__);
|
||||||
|
|
|
@ -191,6 +191,14 @@ _content_headers:
|
||||||
.asciz "sm"
|
.asciz "sm"
|
||||||
.align 5
|
.align 5
|
||||||
|
|
||||||
|
/* spl content header */
|
||||||
|
.word __spl_kip_start__
|
||||||
|
.word __spl_kip_size__
|
||||||
|
.word CONTENT_TYPE_KIP
|
||||||
|
.word 0xCCCCCCCC
|
||||||
|
.asciz "spl"
|
||||||
|
.align 5
|
||||||
|
|
||||||
/* splash_screen content header */
|
/* splash_screen content header */
|
||||||
.word __splash_screen_bmp_start__
|
.word __splash_screen_bmp_start__
|
||||||
.word __splash_screen_bmp_size__
|
.word __splash_screen_bmp_size__
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "ams_mitm_kip.h"
|
#include "ams_mitm_kip.h"
|
||||||
#include "boot_100_kip.h"
|
#include "boot_100_kip.h"
|
||||||
#include "boot_200_kip.h"
|
#include "boot_200_kip.h"
|
||||||
|
#include "spl_kip.h"
|
||||||
#undef u8
|
#undef u8
|
||||||
#undef u32
|
#undef u32
|
||||||
|
|
||||||
|
@ -45,12 +46,13 @@ static bool g_stratosphere_loader_enabled = true;
|
||||||
static bool g_stratosphere_sm_enabled = true;
|
static bool g_stratosphere_sm_enabled = true;
|
||||||
static bool g_stratosphere_pm_enabled = true;
|
static bool g_stratosphere_pm_enabled = true;
|
||||||
static bool g_stratosphere_ams_mitm_enabled = true;
|
static bool g_stratosphere_ams_mitm_enabled = true;
|
||||||
|
static bool g_stratosphere_spl_enabled = true;
|
||||||
static bool g_stratosphere_boot_enabled = false;
|
static bool g_stratosphere_boot_enabled = false;
|
||||||
|
|
||||||
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[], ams_mitm_kip[];
|
extern const uint8_t loader_kip[], pm_kip[], sm_kip[], spl_kip[], ams_mitm_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, ams_mitm_kip_size;
|
extern const uint32_t loader_kip_size, pm_kip_size, sm_kip_size, spl_kip_size, ams_mitm_kip_size;
|
||||||
|
|
||||||
/* GCC doesn't consider the size as const... we have to write it ourselves. */
|
/* GCC doesn't consider the size as const... we have to write it ourselves. */
|
||||||
|
|
||||||
|
@ -90,6 +92,11 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) {
|
||||||
num_processes++;
|
num_processes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_stratosphere_spl_enabled) {
|
||||||
|
size += spl_kip_size;
|
||||||
|
num_processes++;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_stratosphere_ams_mitm_enabled) {
|
if (g_stratosphere_ams_mitm_enabled) {
|
||||||
size += ams_mitm_kip_size;
|
size += ams_mitm_kip_size;
|
||||||
num_processes++;
|
num_processes++;
|
||||||
|
@ -129,6 +136,11 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware) {
|
||||||
data += sm_kip_size;
|
data += sm_kip_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_stratosphere_spl_enabled) {
|
||||||
|
memcpy(data, spl_kip, spl_kip_size);
|
||||||
|
data += spl_kip_size;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_stratosphere_ams_mitm_enabled) {
|
if (g_stratosphere_ams_mitm_enabled) {
|
||||||
memcpy(data, ams_mitm_kip, ams_mitm_kip_size);
|
memcpy(data, ams_mitm_kip, ams_mitm_kip_size);
|
||||||
data += ams_mitm_kip_size;
|
data += ams_mitm_kip_size;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
MODULES := loader pm sm boot ams_mitm eclct.stub ro creport fatal dmnt
|
MODULES := loader pm sm boot ams_mitm spl eclct.stub ro creport fatal dmnt
|
||||||
|
|
||||||
SUBFOLDERS := libstratosphere $(MODULES)
|
SUBFOLDERS := libstratosphere $(MODULES)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue