summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-21 11:09:36 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-21 11:09:36 -0400
commitad1f7a6a3cd262cc084673ec5cf0c561328ec7c7 (patch)
treee3369e40b8f36345911091b542021a4899bb474d /firmware
parent0ca41da65d675b624fb6389da1f488a24ea416e1 (diff)
downloadopen-iov-ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7.tar.gz
open-iov-ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7.zip
Make repo fully path-portable and add reproducible installer
- install.sh: one-command fresh-Ubuntu reproduction (deps, NVIDIA clone + patch, GSP firmware fetch from linux-firmware.git with objcopy .fwimage extraction + MD5 verify, ordered build, host config, load, mdev creation). Wrapper-neutral: works with libvirt/raw QEMU. - patches/nvidia: regenerated path-independent patch (KBUILD_EXTRA_SYMBOLS resolved via $(src)/$(CURDIR) relative to the NVIDIA tree). - scripts/stack_manager.sh and helper scripts auto-detect repo root (OPEN_IOV_ROOT override); no hardcoded developer paths anywhere. - firmware analysis scripts use script-relative paths (also fixes stale firmware/570-GSP references); docs/wiki updated to $OPEN_IOV_ROOT. - .github/workflows/ci.yml updated for standalone repo layout; firmware fetched from linux-firmware in CI. - Untrack remaining kbuild artifacts (Module.symvers, modules.order, *.o.d); gitignore them. - STATE.md: live project state, limitations, fixed/open bugs. - README.md: rewritten for clone-and-run reproducibility.
Diffstat (limited to 'firmware')
-rw-r--r--firmware/57X-GSP/570.144/analyze_firmware.py7
-rw-r--r--firmware/57X-GSP/570.144/decompile_functions.py5
-rw-r--r--firmware/57X-GSP/570.144/decompile_handlers.py5
-rw-r--r--firmware/57X-GSP/570.144/decompile_jump_table_handlers.py5
-rw-r--r--firmware/57X-GSP/570.144/find_functions.py5
-rw-r--r--firmware/57X-GSP/570.144/find_functions_final.py5
-rw-r--r--firmware/57X-GSP/570.144/find_functions_v2.py5
-rw-r--r--firmware/57X-GSP/570.144/find_prologues.py5
-rw-r--r--firmware/57X-GSP/570.144/find_prologues_v2.py5
-rw-r--r--firmware/57X-GSP/570.144/trace_all_subsystems.py3
-rw-r--r--firmware/57X-GSP/570.144/trace_dispatchers.py3
11 files changed, 32 insertions, 21 deletions
diff --git a/firmware/57X-GSP/570.144/analyze_firmware.py b/firmware/57X-GSP/570.144/analyze_firmware.py
index ecc6c65..8a61673 100644
--- a/firmware/57X-GSP/570.144/analyze_firmware.py
+++ b/firmware/57X-GSP/570.144/analyze_firmware.py
@@ -6,10 +6,11 @@ Comprehensive GSP firmware analysis using call targets and pattern matching.
import struct
import json
import sys
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-CALL_TARGETS_FILE = "$OPEN_IOV_ROOT/firmware/570-GSP/all_call_targets.txt"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+CALL_TARGETS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "all_call_targets.txt")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
EXEC_SECTIONS = [
diff --git a/firmware/57X-GSP/570.144/decompile_functions.py b/firmware/57X-GSP/570.144/decompile_functions.py
index 4a9bc27..6e27d05 100644
--- a/firmware/57X-GSP/570.144/decompile_functions.py
+++ b/firmware/57X-GSP/570.144/decompile_functions.py
@@ -6,9 +6,10 @@ Uses our decoded instruction stream to generate pseudo-C.
import struct
import json
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
# Key functions to decompile
diff --git a/firmware/57X-GSP/570.144/decompile_handlers.py b/firmware/57X-GSP/570.144/decompile_handlers.py
index d6a1926..e2e258f 100644
--- a/firmware/57X-GSP/570.144/decompile_handlers.py
+++ b/firmware/57X-GSP/570.144/decompile_handlers.py
@@ -5,9 +5,10 @@ Decompile secondary dispatcher RPC handlers to pseudo-C.
import struct
import json
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
# Secondary dispatcher handler entry points
diff --git a/firmware/57X-GSP/570.144/decompile_jump_table_handlers.py b/firmware/57X-GSP/570.144/decompile_jump_table_handlers.py
index 46a7d4b..0038729 100644
--- a/firmware/57X-GSP/570.144/decompile_jump_table_handlers.py
+++ b/firmware/57X-GSP/570.144/decompile_jump_table_handlers.py
@@ -4,9 +4,10 @@ Decompile all jump table handlers (MAP, UNMAP, PIN, UNPIN, SCHEDULE, YIELD, NOTI
"""
import struct
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
# Jump table handlers from 0x059bfeb0
diff --git a/firmware/57X-GSP/570.144/find_functions.py b/firmware/57X-GSP/570.144/find_functions.py
index 52ad25e..b9f3232 100644
--- a/firmware/57X-GSP/570.144/find_functions.py
+++ b/firmware/57X-GSP/570.144/find_functions.py
@@ -11,9 +11,10 @@ RISC-V typical prologue:
import struct
import json
import sys
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000 # Load address from memory_blocks.json
# RISC-V instruction patterns (compressed and uncompressed)
diff --git a/firmware/57X-GSP/570.144/find_functions_final.py b/firmware/57X-GSP/570.144/find_functions_final.py
index 6e7ac0f..aa073f7 100644
--- a/firmware/57X-GSP/570.144/find_functions_final.py
+++ b/firmware/57X-GSP/570.144/find_functions_final.py
@@ -8,9 +8,10 @@ Find GSP firmware functions using the actual calling convention:
import struct
import json
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
# Executable sections
diff --git a/firmware/57X-GSP/570.144/find_functions_v2.py b/firmware/57X-GSP/570.144/find_functions_v2.py
index 12c344c..df9506d 100644
--- a/firmware/57X-GSP/570.144/find_functions_v2.py
+++ b/firmware/57X-GSP/570.144/find_functions_v2.py
@@ -6,9 +6,10 @@ Searches for multiple prologue patterns.
import struct
import json
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
def read_binary(path):
diff --git a/firmware/57X-GSP/570.144/find_prologues.py b/firmware/57X-GSP/570.144/find_prologues.py
index a4dc2d2..21f55d1 100644
--- a/firmware/57X-GSP/570.144/find_prologues.py
+++ b/firmware/57X-GSP/570.144/find_prologues.py
@@ -6,9 +6,10 @@ Only searches in executable code sections.
import struct
import json
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
# Executable sections from memory_blocks.json
diff --git a/firmware/57X-GSP/570.144/find_prologues_v2.py b/firmware/57X-GSP/570.144/find_prologues_v2.py
index 9d01305..a9de131 100644
--- a/firmware/57X-GSP/570.144/find_prologues_v2.py
+++ b/firmware/57X-GSP/570.144/find_prologues_v2.py
@@ -6,9 +6,10 @@ Handles the actual prologue patterns found.
import struct
import json
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
-OUTPUT_DIR = "$OPEN_IOV_ROOT/firmware/570-GSP"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
+OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_ADDR = 0x04000000
# Executable sections from memory_blocks.json (virtual addresses)
diff --git a/firmware/57X-GSP/570.144/trace_all_subsystems.py b/firmware/57X-GSP/570.144/trace_all_subsystems.py
index dd5cc56..e004791 100644
--- a/firmware/57X-GSP/570.144/trace_all_subsystems.py
+++ b/firmware/57X-GSP/570.144/trace_all_subsystems.py
@@ -4,8 +4,9 @@ Trace all subsystems: WPR, Migration, Primary Dispatcher sub-commands
"""
import struct
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
BASE_ADDR = 0x04000000
def read_binary(path):
diff --git a/firmware/57X-GSP/570.144/trace_dispatchers.py b/firmware/57X-GSP/570.144/trace_dispatchers.py
index 100a8a3..c5a066d 100644
--- a/firmware/57X-GSP/570.144/trace_dispatchers.py
+++ b/firmware/57X-GSP/570.144/trace_dispatchers.py
@@ -4,8 +4,9 @@ Trace dispatcher switch cases to find specific RPC handler functions.
"""
import struct
+import os
-FWIMAGE_PATH = "$OPEN_IOV_ROOT/firmware/570-GSP/gsp-570.144.fwimage.bin"
+FWIMAGE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "gsp-570.144.fwimage.bin")
BASE_ADDR = 0x04000000
def read_binary(path):