mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
Embed exosphere, thermosphere, loader, pm, sm into fusee-secondary
Still needs boot and boot2 to be built as proper KIPs
This commit is contained in:
parent
4e12d55993
commit
af2de57fdc
2 changed files with 16 additions and 6 deletions
|
@ -10,6 +10,9 @@ name := fusee-secondary
|
|||
|
||||
dir_source := src
|
||||
dir_build := build
|
||||
dir_exosphere := ../../exosphere
|
||||
dir_thermosphere := ../../thermosphere
|
||||
dir_stratosphere := ../../stratosphere
|
||||
dir_out := out
|
||||
|
||||
ARCH := -march=armv4t -mtune=arm7tdmi -marm
|
||||
|
@ -32,9 +35,16 @@ CFLAGS = \
|
|||
|
||||
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
|
||||
|
||||
objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
|
||||
$(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \
|
||||
$(call rwildcard, $(dir_source), *.s *.c)))
|
||||
$(call rwildcard, $(dir_source), *.s *.c))) \
|
||||
$(dir_build)/bundled.o
|
||||
|
||||
define bin2o
|
||||
bin2s $< | $(AS) -o $(@)
|
||||
|
@ -55,8 +65,8 @@ $(dir_out)/$(name).bin: $(dir_build)/$(name).elf
|
|||
$(dir_build)/$(name).elf: $(objects)
|
||||
$(LINK.o) $(OUTPUT_OPTION) $^
|
||||
|
||||
$(dir_build)/%.bin.o: $(dir_build)/%.bin
|
||||
@$(bin2o)
|
||||
$(dir_build)/bundled.o: $(bundled)
|
||||
@bin2s $^ | $(AS) -o $(@)
|
||||
|
||||
$(dir_build)/%.o: $(dir_source)/%.c
|
||||
@mkdir -p "$(@D)"
|
||||
|
|
|
@ -154,7 +154,7 @@ void nxboot_main(void) {
|
|||
generic_panic();
|
||||
}
|
||||
|
||||
/* Read the warmboot firmware from a file, otherwise from PK1. */
|
||||
/* Read Package2 from a file, otherwise from its partition(s). */
|
||||
if (loader_ctx->package2_path[0] != '\0') {
|
||||
size_t package2_size = get_file_size(loader_ctx->package2_path);
|
||||
if (package2_size == 0) {
|
||||
|
@ -208,9 +208,9 @@ void nxboot_main(void) {
|
|||
generic_panic();
|
||||
}
|
||||
} else {
|
||||
/*extern const uint8_t exosphere_bin[];
|
||||
extern const uint8_t exosphere_bin[];
|
||||
extern const uint32_t exosphere_bin_size;
|
||||
memcpy(exosphere_memaddr, exosphere_bin, exosphere_bin_size);*/
|
||||
memcpy(exosphere_memaddr, exosphere_bin, exosphere_bin_size);
|
||||
}
|
||||
|
||||
/* Boot up Exosphère. */
|
||||
|
|
Loading…
Reference in a new issue