From 3fee2e027d298578ccfa6a28d8f1b03f32baad77 Mon Sep 17 00:00:00 2001 From: KholdFuzion Date: Fri, 25 Apr 2025 10:24:08 -0400 Subject: [PATCH] should build updates on linux.....linux-isms fixed --- allbuild.sh | 0 scripts/asmdiff.sh | 0 scripts/clean_baserom.sh | 0 scripts/extract_asp_gsp_rsp.sh | 0 scripts/extract_baserom.u.sh | 0 scripts/extract_cdata.sh | 0 scripts/extract_diff.e.sh | 0 scripts/extract_diff.j.sh | 0 scripts/make/build_hashtable.sh | 0 scripts/make/build_tools.sh | 0 scripts/make/checksum.sh | 0 scripts/make/clean_nuke.sh | 0 scripts/make/create_directories.sh | 0 scripts/make/default/checksum.sh | 0 scripts/make/local_template/checksum.sh | 0 scripts/make/rebuild_allver_hashtables.sh | 0 scripts/rename_sym.sh | 0 scripts/show_build_offsets.sh | 0 scripts/test_files.sh | 0 scripts/test_files_readme.md | 224 +++++++++++----------- scripts/wsl_32bit_enable.sh | 0 src/libultra/gu/lookat.c | 0 tools/asm-processor/add-test.sh | 0 tools/asm-processor/compile-test.sh | 0 tools/asm-processor/run-tests.sh | 0 tools/diff.py | 0 tools/ge-stats-deprecated.py | 0 tools/ge-stats.py | 0 28 files changed, 112 insertions(+), 112 deletions(-) mode change 100644 => 100755 allbuild.sh mode change 100644 => 100755 scripts/asmdiff.sh mode change 100644 => 100755 scripts/clean_baserom.sh mode change 100644 => 100755 scripts/extract_asp_gsp_rsp.sh mode change 100644 => 100755 scripts/extract_baserom.u.sh mode change 100644 => 100755 scripts/extract_cdata.sh mode change 100644 => 100755 scripts/extract_diff.e.sh mode change 100644 => 100755 scripts/extract_diff.j.sh mode change 100644 => 100755 scripts/make/build_hashtable.sh mode change 100644 => 100755 scripts/make/build_tools.sh mode change 100644 => 100755 scripts/make/checksum.sh mode change 100644 => 100755 scripts/make/clean_nuke.sh mode change 100644 => 100755 scripts/make/create_directories.sh mode change 100644 => 100755 scripts/make/default/checksum.sh mode change 100644 => 100755 scripts/make/local_template/checksum.sh mode change 100644 => 100755 scripts/make/rebuild_allver_hashtables.sh mode change 100644 => 100755 scripts/rename_sym.sh mode change 100644 => 100755 scripts/show_build_offsets.sh mode change 100644 => 100755 scripts/test_files.sh mode change 100644 => 100755 scripts/wsl_32bit_enable.sh mode change 100644 => 100755 src/libultra/gu/lookat.c mode change 100644 => 100755 tools/asm-processor/add-test.sh mode change 100644 => 100755 tools/asm-processor/compile-test.sh mode change 100644 => 100755 tools/asm-processor/run-tests.sh mode change 100644 => 100755 tools/diff.py mode change 100755 => 100644 tools/ge-stats-deprecated.py mode change 100755 => 100644 tools/ge-stats.py diff --git a/allbuild.sh b/allbuild.sh old mode 100644 new mode 100755 diff --git a/scripts/asmdiff.sh b/scripts/asmdiff.sh old mode 100644 new mode 100755 diff --git a/scripts/clean_baserom.sh b/scripts/clean_baserom.sh old mode 100644 new mode 100755 diff --git a/scripts/extract_asp_gsp_rsp.sh b/scripts/extract_asp_gsp_rsp.sh old mode 100644 new mode 100755 diff --git a/scripts/extract_baserom.u.sh b/scripts/extract_baserom.u.sh old mode 100644 new mode 100755 diff --git a/scripts/extract_cdata.sh b/scripts/extract_cdata.sh old mode 100644 new mode 100755 diff --git a/scripts/extract_diff.e.sh b/scripts/extract_diff.e.sh old mode 100644 new mode 100755 diff --git a/scripts/extract_diff.j.sh b/scripts/extract_diff.j.sh old mode 100644 new mode 100755 diff --git a/scripts/make/build_hashtable.sh b/scripts/make/build_hashtable.sh old mode 100644 new mode 100755 diff --git a/scripts/make/build_tools.sh b/scripts/make/build_tools.sh old mode 100644 new mode 100755 diff --git a/scripts/make/checksum.sh b/scripts/make/checksum.sh old mode 100644 new mode 100755 diff --git a/scripts/make/clean_nuke.sh b/scripts/make/clean_nuke.sh old mode 100644 new mode 100755 diff --git a/scripts/make/create_directories.sh b/scripts/make/create_directories.sh old mode 100644 new mode 100755 diff --git a/scripts/make/default/checksum.sh b/scripts/make/default/checksum.sh old mode 100644 new mode 100755 diff --git a/scripts/make/local_template/checksum.sh b/scripts/make/local_template/checksum.sh old mode 100644 new mode 100755 diff --git a/scripts/make/rebuild_allver_hashtables.sh b/scripts/make/rebuild_allver_hashtables.sh old mode 100644 new mode 100755 diff --git a/scripts/rename_sym.sh b/scripts/rename_sym.sh old mode 100644 new mode 100755 diff --git a/scripts/show_build_offsets.sh b/scripts/show_build_offsets.sh old mode 100644 new mode 100755 diff --git a/scripts/test_files.sh b/scripts/test_files.sh old mode 100644 new mode 100755 diff --git a/scripts/test_files_readme.md b/scripts/test_files_readme.md index 57e5bec..66f1be0 100644 --- a/scripts/test_files_readme.md +++ b/scripts/test_files_readme.md @@ -1,112 +1,112 @@ -### test files readme ### - -This is a tool suite to identify discrepancies between builds. It will extract relevant sections from ELF binary and compare against known good md5. The purpose is to help identify where the build is failing to match. - -### Quick start ### - - ./test_files.sh -i ge007.u-test_basis.csv - -### Overview ### - -This consists of two bash scripts: - - make/build_hashtable.sh - test_files.sh - -The first is used to generate a list of md5 checksums. This should only be used if a new build is added, or you want to generate checksums against a particular variant. - -### Making test file ### - -Output format is simple csv, one entry per line. Each line is a 32 character md5, the name of section extracted from ELF binary, and path to file relative from repo root (where this script is). - -Escaped csv, quotes or commas in filenames are not supported. - -The script iterates the following build directories, looking for `.o` files: - -- src/ -- src/game -- assets/obseg/bg -- assets/obseg/brief -- assets/obseg/setup -- assets/obseg/stan -- assets/obseg/text - -For source files, the following ELF sections are extracted: - -- .text -- .code -- .bss -- .data -- .rodata - -For asset files, the following ELF sections are extracted: - -- .bss -- .data -- .rodata - -The supported versions have already had the md5 checksums extracted from known good builds. These files are: - -- ge007.u-test_basis.csv -- ge007.j-test_basis.csv -- ge007.e-test_basis.csv - -**build test file example** - - ./make/build_hashtable.sh -v u -o ge007.u-test_basis.csv - ./make/build_hashtable.sh -v j -o ge007.j-test_basis.csv - ./make/build_hashtable.sh -v e -o ge007.e-test_basis.csv - -### Testing build ### - -A build can be compared against a test file by running `./test_files.sh`. The input file is required. This will This lists the path to the build object files. Example - - ./test_files.sh -i ge007.u-test_basis.csv - -This lists each section and file as it is tested. You should see output like - - ... - pass: section'.bss' build/u/assets/obseg/text/LsiloJ.o - pass: section'.data' build/u/assets/obseg/text/LsiloJ.o - pass: section'.rodata' build/u/assets/obseg/text/LsiloJ.o - pass: section'.bss' build/u/assets/obseg/text/LstatE.o - pass: section'.data' build/u/assets/obseg/text/LstatE.o - ... - -The output stops on the first failure. Use option `-c` to continue on mismatch. - -### Examples ### - -**Rename function**: - -Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method). - -*result*: all files pass. - -**Change function**: - -Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method) to return a different value. Rebuild the project and test. - -*result*: Test script should stop with a message similar to the following: - - checksums differ, section'.text', file: 'build/u/src/game/bg.o'. Actual=[6747949109773c07983a2584101ef214], expected=[0a3e9300d0406ae8036a97b5596f3f5c] - -**change .rodata** - -Modify `src/fr.c` method `indyGrabJpg16bit` and change one of the printf strings: - - sprintf(buffer, "zzzgrab.%d.jpeg", *pgrabnum); - -*result*: Test script should stop with a message similar to the following: - - checksums differ, section'.rodata', file: 'build/u/src/fr.o'. Actual=[9e108ace3e0dab31c819d22ed1d063b9], expected=[94e2bec0d83b53385ba626feb3005cb4] - -**Change setup file** - -Modify `assets/obseg/setup/Ump_setupcaveZ.c` padlist and change one of the float variables. Here is modifying the first entry in the array: - - { {1.0f, -726.0f, -378.0f}, {0.0f, 1.0f, 0.0f}, {-2e-06, 0.0f, 1.0f}, "p1884a", 0 }, - -*result*: Test script should stop with a message similar to the following: - - checksums differ, section'.data', file: 'build/u/assets/obseg/setup/Ump_setupcaveZ.o'. Actual=[1dd1b59ed38408ba67b6616f9194c6d9], expected=[9caabe90e7f9b62668b607b286e14738] +### test files readme ### + +This is a tool suite to identify discrepancies between builds. It will extract relevant sections from ELF binary and compare against known good md5. The purpose is to help identify where the build is failing to match. + +### Quick start ### + + ./test_files.sh -i ge007.u-test_basis.csv + +### Overview ### + +This consists of two bash scripts: + + make/build_hashtable.sh + test_files.sh + +The first is used to generate a list of md5 checksums. This should only be used if a new build is added, or you want to generate checksums against a particular variant. + +### Making test file ### + +Output format is simple csv, one entry per line. Each line is a 32 character md5, the name of section extracted from ELF binary, and path to file relative from repo root (where this script is). + +Escaped csv, quotes or commas in filenames are not supported. + +The script iterates the following build directories, looking for `.o` files: + +- src/ +- src/game +- assets/obseg/bg +- assets/obseg/brief +- assets/obseg/setup +- assets/obseg/stan +- assets/obseg/text + +For source files, the following ELF sections are extracted: + +- .text +- .code +- .bss +- .data +- .rodata + +For asset files, the following ELF sections are extracted: + +- .bss +- .data +- .rodata + +The supported versions have already had the md5 checksums extracted from known good builds. These files are: + +- ge007.u-test_basis.csv +- ge007.j-test_basis.csv +- ge007.e-test_basis.csv + +**build test file example** + + ./make/build_hashtable.sh -v u -o ge007.u-test_basis.csv + ./make/build_hashtable.sh -v j -o ge007.j-test_basis.csv + ./make/build_hashtable.sh -v e -o ge007.e-test_basis.csv + +### Testing build ### + +A build can be compared against a test file by running `./test_files.sh`. The input file is required. This will This lists the path to the build object files. Example + + ./test_files.sh -i ge007.u-test_basis.csv + +This lists each section and file as it is tested. You should see output like + + ... + pass: section'.bss' build/u/assets/obseg/text/LsiloJ.o + pass: section'.data' build/u/assets/obseg/text/LsiloJ.o + pass: section'.rodata' build/u/assets/obseg/text/LsiloJ.o + pass: section'.bss' build/u/assets/obseg/text/LstatE.o + pass: section'.data' build/u/assets/obseg/text/LstatE.o + ... + +The output stops on the first failure. Use option `-c` to continue on mismatch. + +### Examples ### + +**Rename function**: + +Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method). + +*result*: all files pass. + +**Change function**: + +Modify `src/game/bg.c` method `bgRectIsInside` (an unreferenced method) to return a different value. Rebuild the project and test. + +*result*: Test script should stop with a message similar to the following: + + checksums differ, section'.text', file: 'build/u/src/game/bg.o'. Actual=[6747949109773c07983a2584101ef214], expected=[0a3e9300d0406ae8036a97b5596f3f5c] + +**change .rodata** + +Modify `src/fr.c` method `indyGrabJpg16bit` and change one of the printf strings: + + sprintf(buffer, "zzzgrab.%d.jpeg", *pgrabnum); + +*result*: Test script should stop with a message similar to the following: + + checksums differ, section'.rodata', file: 'build/u/src/fr.o'. Actual=[9e108ace3e0dab31c819d22ed1d063b9], expected=[94e2bec0d83b53385ba626feb3005cb4] + +**Change setup file** + +Modify `assets/obseg/setup/Ump_setupcaveZ.c` padlist and change one of the float variables. Here is modifying the first entry in the array: + + { {1.0f, -726.0f, -378.0f}, {0.0f, 1.0f, 0.0f}, {-2e-06, 0.0f, 1.0f}, "p1884a", 0 }, + +*result*: Test script should stop with a message similar to the following: + + checksums differ, section'.data', file: 'build/u/assets/obseg/setup/Ump_setupcaveZ.o'. Actual=[1dd1b59ed38408ba67b6616f9194c6d9], expected=[9caabe90e7f9b62668b607b286e14738] diff --git a/scripts/wsl_32bit_enable.sh b/scripts/wsl_32bit_enable.sh old mode 100644 new mode 100755 diff --git a/src/libultra/gu/lookat.c b/src/libultra/gu/lookat.c old mode 100644 new mode 100755 diff --git a/tools/asm-processor/add-test.sh b/tools/asm-processor/add-test.sh old mode 100644 new mode 100755 diff --git a/tools/asm-processor/compile-test.sh b/tools/asm-processor/compile-test.sh old mode 100644 new mode 100755 diff --git a/tools/asm-processor/run-tests.sh b/tools/asm-processor/run-tests.sh old mode 100644 new mode 100755 diff --git a/tools/diff.py b/tools/diff.py old mode 100644 new mode 100755 diff --git a/tools/ge-stats-deprecated.py b/tools/ge-stats-deprecated.py old mode 100755 new mode 100644 diff --git a/tools/ge-stats.py b/tools/ge-stats.py old mode 100755 new mode 100644