diff --git a/.gitmodules b/.gitmodules index eedd2e5..9872978 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,3 +9,11 @@ [submodule "CakeHax"] path = CakeHax url = https://github.com/dukesrg/CakeHax.git +[submodule "2xrsa"] + path = 2xrsa + url = https://github.com/b1l1s/2xrsa.git + ignore = dirty +[submodule "firmtool"] + path = firmtool + url = https://github.com/TuxSH/firmtool.git + ignore = dirty diff --git a/2xrsa b/2xrsa new file mode 160000 index 0000000..c3f93cb --- /dev/null +++ b/2xrsa @@ -0,0 +1 @@ +Subproject commit c3f93cb492d61978fd0620d715510932837495dd diff --git a/Makefile b/Makefile index fbd630d..0b695aa 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) -.PHONY: common clean all gateway binary cakehax cakerop brahma release +.PHONY: common clean all gateway firm 2xrsa binary cakehax cakerop brahma release #--------------------------------------------------------------------------------- all: binary @@ -119,10 +119,18 @@ submodules: binary: common @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile +firm: binary + @firmtool/firmtool build $(OUTPUT).firm -n 0x23F00000 -e 0 -D $(OUTPUT).bin -A 0x23F00000 -C NDMA -i + gateway: binary @cp resources/LauncherTemplate.dat $(OUTPUT_D)/Launcher.dat @dd if=$(OUTPUT).bin of=$(OUTPUT_D)/Launcher.dat bs=1497296 seek=1 conv=notrunc +2xrsa: binary + @make --no-print-directory -C 2xrsa + @mv $(OUTPUT).bin $(OUTPUT_D)/arm9.bin + @mv $(CURDIR)/2xrsa/bin/arm11.bin $(OUTPUT_D)/arm11.bin + cakehax: submodules binary @make dir_out=$(OUTPUT_D) name=$(TARGET).dat -C CakeHax bigpayload @dd if=$(OUTPUT).bin of=$(OUTPUT).dat bs=512 seek=160 @@ -143,11 +151,16 @@ brahma: submodules binary release: @rm -fr $(BUILD) $(OUTPUT_D) $(RELEASE) @make --no-print-directory binary + @-make --no-print-directory firm + @-make --no-print-directory 2xrsa @-make --no-print-directory cakerop @-make --no-print-directory brahma @[ -d $(RELEASE) ] || mkdir -p $(RELEASE) @[ -d $(RELEASE)/$(TARGET) ] || mkdir -p $(RELEASE)/$(TARGET) @cp $(OUTPUT).bin $(RELEASE) + @-cp $(OUTPUT).firm $(RELEASE) + @-cp $(OUTPUT_D)/arm9.bin $(RELEASE) + @-cp $(OUTPUT_D)/arm11.bin $(RELEASE) @-cp $(OUTPUT).dat $(RELEASE) @-cp $(OUTPUT).nds $(RELEASE) @-cp $(OUTPUT).3dsx $(RELEASE)/$(TARGET) @@ -163,6 +176,8 @@ clean: @-make clean --no-print-directory -C CakesROP @echo clean BrahmaLoader... @-make clean --no-print-directory -C BrahmaLoader + @echo clean 2xrsa... + @-make clean --no-print-directory -C 2xrsa @echo clean SafeB9SInstaller... @rm -fr $(BUILD) $(OUTPUT_D) $(RELEASE) diff --git a/firmtool b/firmtool new file mode 160000 index 0000000..375e66c --- /dev/null +++ b/firmtool @@ -0,0 +1 @@ +Subproject commit 375e66c946968c8d39258b01038817a628b88e89