From 7dcabdf25ec214ce0c53b2e491159f77d88731ac Mon Sep 17 00:00:00 2001 From: d0k3 Date: Sat, 20 May 2017 13:31:20 +0200 Subject: [PATCH] Added FIRM entrypoint --- .gitmodules | 4 ++++ Makefile | 7 ++++++- firmtool | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 160000 firmtool diff --git a/.gitmodules b/.gitmodules index d0ea5bf..789e943 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,3 +9,7 @@ path = CakesROP url = https://github.com/mid-kid/CakesROP ignore = dirty +[submodule "firmtool"] + path = firmtool + url = https://github.com/TuxSH/firmtool.git + ignore = dirty diff --git a/Makefile b/Makefile index 8713451..5eaa732 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,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 binary cakehax cakerop brahma release #--------------------------------------------------------------------------------- all: binary @@ -129,6 +129,9 @@ 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 @@ -153,6 +156,7 @@ brahma: submodules binary release: @rm -fr $(BUILD) $(OUTPUT_D) $(RELEASE) @make --no-print-directory binary + @-make --no-print-directory firm @-make --no-print-directory gateway @-make --no-print-directory cakerop @-make --no-print-directory brahma @@ -161,6 +165,7 @@ release: @[ -d $(RELEASE)/scripts ] || mkdir -p $(RELEASE)/scripts @-cp $(OUTPUT_D)/Launcher.dat $(RELEASE) @cp $(OUTPUT).bin $(RELEASE) + @-cp $(OUTPUT).firm $(RELEASE) @-cp $(OUTPUT).dat $(RELEASE) @-cp $(OUTPUT).nds $(RELEASE) @-cp $(OUTPUT).3dsx $(RELEASE)/$(TARGET) diff --git a/firmtool b/firmtool new file mode 160000 index 0000000..375e66c --- /dev/null +++ b/firmtool @@ -0,0 +1 @@ +Subproject commit 375e66c946968c8d39258b01038817a628b88e89