From 09efbb40b8ede1d39f744c561db1eb24ea5a1a99 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Sun, 8 Jun 2025 12:19:02 -0700 Subject: [PATCH] hdl: build_bladerf.sh fixups Add H optarg, and ensure submodules are initialized prior to synthesis --- hdl/quartus/build_bladerf.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hdl/quartus/build_bladerf.sh b/hdl/quartus/build_bladerf.sh index ebf9fb6f..09d52ff4 100755 --- a/hdl/quartus/build_bladerf.sh +++ b/hdl/quartus/build_bladerf.sh @@ -3,6 +3,24 @@ # Build a bladeRF fpga image ################################################################################ +# Ensure we're in the right directory and submodules are initialized +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +# Initialize and update submodules if needed +echo "Checking and initializing submodules..." +cd "$PROJECT_ROOT" +if [ -f .gitmodules ]; then + # Initialize submodules if not already initialized + git submodule init + + # Update submodules to ensure they're checked out + git submodule update + + echo "Submodules initialized and updated." +fi +cd "$SCRIPT_DIR" + cleanup() { # Prevent recursive cleanup calls trap '' INT TERM HUP @@ -146,7 +164,7 @@ flow="full" seed="1" omit_date=false -while getopts ":cb:r:s:a:fn:l:S:Dh" opt; do +while getopts ":cb:r:s:a:fn:l:S:DhH" opt; do case $opt in c) clear_work_dir=1