From e1fa0510c0bd45ae977de728470fc9645fc142ad Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Mon, 23 May 2016 03:04:18 -0400 Subject: [PATCH] Rename vco -> modules --- Makefile | 10 ++-- {vco/template/tool => host}/compile_header.c | 0 {vco => modules}/Makefile | 0 {vco => modules}/README.txt | 0 {vco => modules}/template/Makefile | 0 {vco => modules}/template/linker.ld | 0 .../template}/meta/cfw_version | 0 .../signatures => modules/template}/meta/deps | 0 {vco => modules}/template/meta/desc | 0 {vco => modules}/template/meta/name | 0 .../template}/meta/patch_version | 0 .../template}/meta/title | 0 .../signatures => modules/template}/meta/uuid | 0 {vco => modules}/template/src/exported.h | 0 {vco => modules}/template/src/headers.h | 0 {vco => modules}/template/src/main.c | 0 {vco => modules}/template/src/start.s | 0 vco/signatures/Makefile | 1 - vco/signatures/linker.ld | 1 - vco/signatures/meta/desc | 1 - vco/signatures/meta/name | 1 - vco/signatures/src/exported.h | 1 - vco/signatures/src/headers.h | 1 - vco/signatures/src/main.c | 54 ------------------- vco/signatures/src/start.s | 1 - vco/signatures/tool | 1 - vco/template/meta/cfw_version | 1 - vco/template/meta/deps | 1 - vco/template/meta/patch_version | 1 - vco/template/meta/title | 1 - vco/template/meta/uuid | 1 - 31 files changed, 5 insertions(+), 72 deletions(-) rename {vco/template/tool => host}/compile_header.c (100%) rename {vco => modules}/Makefile (100%) rename {vco => modules}/README.txt (100%) rename {vco => modules}/template/Makefile (100%) rename {vco => modules}/template/linker.ld (100%) rename {vco/signatures => modules/template}/meta/cfw_version (100%) rename {vco/signatures => modules/template}/meta/deps (100%) rename {vco => modules}/template/meta/desc (100%) rename {vco => modules}/template/meta/name (100%) rename {vco/signatures => modules/template}/meta/patch_version (100%) rename {vco/signatures => modules/template}/meta/title (100%) rename {vco/signatures => modules/template}/meta/uuid (100%) rename {vco => modules}/template/src/exported.h (100%) rename {vco => modules}/template/src/headers.h (100%) rename {vco => modules}/template/src/main.c (100%) rename {vco => modules}/template/src/start.s (100%) delete mode 120000 vco/signatures/Makefile delete mode 120000 vco/signatures/linker.ld delete mode 100644 vco/signatures/meta/desc delete mode 100644 vco/signatures/meta/name delete mode 120000 vco/signatures/src/exported.h delete mode 120000 vco/signatures/src/headers.h delete mode 100644 vco/signatures/src/main.c delete mode 120000 vco/signatures/src/start.s delete mode 120000 vco/signatures/tool delete mode 100644 vco/template/meta/cfw_version delete mode 100644 vco/template/meta/deps delete mode 100644 vco/template/meta/patch_version delete mode 100644 vco/template/meta/title delete mode 100644 vco/template/meta/uuid diff --git a/Makefile b/Makefile index 3d51d57..061813b 100644 --- a/Makefile +++ b/Makefile @@ -28,11 +28,11 @@ objects_cfw = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ $(call rwildcard, $(dir_source), *.s *.c))) .PHONY: all -all: a9lh vco external +all: a9lh modules external -.PHONY: vco -vco: - make -C vco +.PHONY: modules +modules: + make -C modules .PHONY: external external: @@ -43,7 +43,7 @@ a9lh: $(dir_out)/arm9loaderhax.bin .PHONY: clean clean: - make -C vco clean + make -C modules clean make -C external clean rm -rf $(dir_out) $(dir_build) diff --git a/vco/template/tool/compile_header.c b/host/compile_header.c similarity index 100% rename from vco/template/tool/compile_header.c rename to host/compile_header.c diff --git a/vco/Makefile b/modules/Makefile similarity index 100% rename from vco/Makefile rename to modules/Makefile diff --git a/vco/README.txt b/modules/README.txt similarity index 100% rename from vco/README.txt rename to modules/README.txt diff --git a/vco/template/Makefile b/modules/template/Makefile similarity index 100% rename from vco/template/Makefile rename to modules/template/Makefile diff --git a/vco/template/linker.ld b/modules/template/linker.ld similarity index 100% rename from vco/template/linker.ld rename to modules/template/linker.ld diff --git a/vco/signatures/meta/cfw_version b/modules/template/meta/cfw_version similarity index 100% rename from vco/signatures/meta/cfw_version rename to modules/template/meta/cfw_version diff --git a/vco/signatures/meta/deps b/modules/template/meta/deps similarity index 100% rename from vco/signatures/meta/deps rename to modules/template/meta/deps diff --git a/vco/template/meta/desc b/modules/template/meta/desc similarity index 100% rename from vco/template/meta/desc rename to modules/template/meta/desc diff --git a/vco/template/meta/name b/modules/template/meta/name similarity index 100% rename from vco/template/meta/name rename to modules/template/meta/name diff --git a/vco/signatures/meta/patch_version b/modules/template/meta/patch_version similarity index 100% rename from vco/signatures/meta/patch_version rename to modules/template/meta/patch_version diff --git a/vco/signatures/meta/title b/modules/template/meta/title similarity index 100% rename from vco/signatures/meta/title rename to modules/template/meta/title diff --git a/vco/signatures/meta/uuid b/modules/template/meta/uuid similarity index 100% rename from vco/signatures/meta/uuid rename to modules/template/meta/uuid diff --git a/vco/template/src/exported.h b/modules/template/src/exported.h similarity index 100% rename from vco/template/src/exported.h rename to modules/template/src/exported.h diff --git a/vco/template/src/headers.h b/modules/template/src/headers.h similarity index 100% rename from vco/template/src/headers.h rename to modules/template/src/headers.h diff --git a/vco/template/src/main.c b/modules/template/src/main.c similarity index 100% rename from vco/template/src/main.c rename to modules/template/src/main.c diff --git a/vco/template/src/start.s b/modules/template/src/start.s similarity index 100% rename from vco/template/src/start.s rename to modules/template/src/start.s diff --git a/vco/signatures/Makefile b/vco/signatures/Makefile deleted file mode 120000 index 25eaf27..0000000 --- a/vco/signatures/Makefile +++ /dev/null @@ -1 +0,0 @@ -../template/Makefile \ No newline at end of file diff --git a/vco/signatures/linker.ld b/vco/signatures/linker.ld deleted file mode 120000 index 6577326..0000000 --- a/vco/signatures/linker.ld +++ /dev/null @@ -1 +0,0 @@ -../template/linker.ld \ No newline at end of file diff --git a/vco/signatures/meta/desc b/vco/signatures/meta/desc deleted file mode 100644 index 8496ff8..0000000 --- a/vco/signatures/meta/desc +++ /dev/null @@ -1 +0,0 @@ -Patches signatures in NATIVE_FIRM. diff --git a/vco/signatures/meta/name b/vco/signatures/meta/name deleted file mode 100644 index 25dc00f..0000000 --- a/vco/signatures/meta/name +++ /dev/null @@ -1 +0,0 @@ -NATIVE_FIRM Signature Patch diff --git a/vco/signatures/src/exported.h b/vco/signatures/src/exported.h deleted file mode 120000 index 0cbf2cf..0000000 --- a/vco/signatures/src/exported.h +++ /dev/null @@ -1 +0,0 @@ -../../template/src/exported.h \ No newline at end of file diff --git a/vco/signatures/src/headers.h b/vco/signatures/src/headers.h deleted file mode 120000 index 0be6138..0000000 --- a/vco/signatures/src/headers.h +++ /dev/null @@ -1 +0,0 @@ -../../template/src/headers.h \ No newline at end of file diff --git a/vco/signatures/src/main.c b/vco/signatures/src/main.c deleted file mode 100644 index e343842..0000000 --- a/vco/signatures/src/main.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include "exported.h" - -uint8_t pat1[] = {0xC0, 0x1C, 0x76, 0xE7}; -uint8_t pat2[] = {0xB5, 0x22, 0x4D, 0x0C}; - -// See asm/sigpatches.s for the code here -uint8_t sigpatch[] = {0x00, 0x20, 0x70, 0x47}; - -uint8_t *firm_mem, *off, *off2; -uint32_t size = 0; -exefs_h* firm_p9_exefs; - -int main() { - //Look for signature checks - fprintf(stderr, "Applying signature patch\n"); - - firm_p9_exefs = get_firm_proc9_exefs(); - - fprintf(stderr, "ExeFS: 0x%x\n", firm_p9_exefs); - - // The code segment. - firm_mem = (uint8_t*)firm_p9_exefs + sizeof(exefs_h) + firm_p9_exefs->fileHeaders[0].offset; - size = firm_p9_exefs->fileHeaders[0].size; - - fprintf(stderr, "Search, P0.\n"); - off = memfind(firm_mem, size, pat1, 4); - - if (off == NULL) { - fprintf(stderr, "Failed, P0.\n"); - return 1; // Failed to find sigpatch. Ugh. - } - - // We're subbing one because the code goes back 1. - // Unique patterns, etc. - fprintf(stderr, "Search, P1.\n"); - off2 = memfind(firm_mem, size, pat2, 4) - 1; - - if (off2 == NULL) { - fprintf(stderr, "Failed, P1.\n"); - return 2; // Failed to find sigpatch. Ugh. - } - - fprintf(stderr, "Signatures, P0, 0x%x\n", (uint32_t)off); - memcpy(off, sigpatch, 2); - - fprintf(stderr, "Signatures, P1, 0x%x\n", (uint32_t)off2); - memcpy(off2, sigpatch, 4); - - fprintf(stderr, "Succeded.\n"); - - return 0; -} diff --git a/vco/signatures/src/start.s b/vco/signatures/src/start.s deleted file mode 120000 index e408660..0000000 --- a/vco/signatures/src/start.s +++ /dev/null @@ -1 +0,0 @@ -../../template/src/start.s \ No newline at end of file diff --git a/vco/signatures/tool b/vco/signatures/tool deleted file mode 120000 index 37fac4b..0000000 --- a/vco/signatures/tool +++ /dev/null @@ -1 +0,0 @@ -../template/tool/ \ No newline at end of file diff --git a/vco/template/meta/cfw_version b/vco/template/meta/cfw_version deleted file mode 100644 index 573541a..0000000 --- a/vco/template/meta/cfw_version +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/vco/template/meta/deps b/vco/template/meta/deps deleted file mode 100644 index b0047fa..0000000 --- a/vco/template/meta/deps +++ /dev/null @@ -1 +0,0 @@ -None diff --git a/vco/template/meta/patch_version b/vco/template/meta/patch_version deleted file mode 100644 index d00491f..0000000 --- a/vco/template/meta/patch_version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/vco/template/meta/title b/vco/template/meta/title deleted file mode 100644 index 8380236..0000000 --- a/vco/template/meta/title +++ /dev/null @@ -1 +0,0 @@ -Native diff --git a/vco/template/meta/uuid b/vco/template/meta/uuid deleted file mode 100644 index d00491f..0000000 --- a/vco/template/meta/uuid +++ /dev/null @@ -1 +0,0 @@ -1 -- 2.39.5