sept: add secondary skeleton + buildscript

This commit is contained in:
Michael Scire
2019-02-20 06:31:46 -08:00
parent 26f45fab19
commit 5fe24b620d
94 changed files with 58543 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
$(AMS)/exosphere $(AMS)/exosphere/lp0fw $(AMS)/exosphere/rebootstub \
$(AMS)/thermosphere $(AMS)/fusee/fusee-primary $(AMS)/sept/sept-primary \
$(KIPDIRS)
$(AMS)/sept/sept-secondary $(KIPDIRS)
export DEPSDIR := $(CURDIR)/$(BUILD)
@@ -98,7 +98,7 @@ SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
KIPFILES := loader.kip pm.kip sm.kip ams_mitm.kip boot_100.kip boot_200.kip
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) fusee-primary.bin \
exosphere.bin lp0fw.bin rebootstub.bin thermosphere.bin splash_screen.bmp \
sept-primary.bin \
sept-primary.bin sept-secondary.enc \
$(KIPFILES)
#---------------------------------------------------------------------------------
@@ -198,6 +198,11 @@ sept_primary.bin.o sept_primary_bin.h: sept-primary.bin
@echo $(notdir $<)
@$(_bin2o)
sept_secondary.enc.o sept_secondary_enc.h: sept-secondary.enc
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(_bin2o)
%.bin.o %_bin.h: %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)

View File

@@ -50,6 +50,7 @@
#define u8 uint8_t
#define u32 uint32_t
#include "exosphere_bin.h"
#include "sept_secondary_enc.h"
#include "lp0fw_bin.h"
#include "lib/log.h"
#undef u8
@@ -413,8 +414,7 @@ uint32_t nxboot_main(void) {
if (target_firmware == ATMOSPHERE_TARGET_FIRMWARE_700) {
/* TODO: Detect when we have been loaded by sept-secondary, and thus have keys provided for us. */
static const uint8_t sept_secondary[0x0] = { /* TODO: link-time magic */ };
reboot_to_sept(tsec_fw, tsec_fw_size, sept_secondary, sizeof(sept_secondary));
reboot_to_sept(tsec_fw, tsec_fw_size, sept_secondary_enc, sept_secondary_enc_size);
}
print(SCREEN_LOG_LEVEL_MANDATORY, "[NXBOOT]: Loaded firmware from eMMC...\n");