feat: build-docker.sh: skip bitcoin-only variants for targets that do not have one
What changed, and why it matters
This commit changes a build script so that when building only Bitcoin-only firmware variants, it skips targets like boardloader, bootloader, and secure monitor that do not have such variants. It is a build-logic convenience fix with no apparent security relevance.
No security action required. Treat as routine build-script maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies build-docker.sh. When BITCOIN_ONLY=1, it skips adding make targets for boardloader, bootloader, secmon, and prodtest because those components lack bitcoin-only builds. It also skips generating a build script if no make targets remain. This avoids unnecessary build steps and potential build failures, but does not change firmware code, cryptographic operations, or runtime behavior.
Changed components
build-docker.shInspect captured patch +11 / −0
diff --git a/build-docker.sh b/build-docker.sh
index 45a34018..c2f001f4 100755
--- a/build-docker.sh
+++ b/build-docker.sh
@@ -294,9 +294,20 @@ for TREZOR_MODEL in ${MODELS[@]}; do
MAKE_TARGETS=""
for TARGET in ${CORE_TARGETS[@]}; do
+ if [ "$BITCOIN_ONLY" = "1" ]; then
+ # Skip targets that have no bitcoin-only variant.
+ case "$TARGET" in boardloader|bootloader|secmon|prodtest)
+ continue
+ ;;
+ esac
+ fi
MAKE_TARGETS="$MAKE_TARGETS build_$TARGET"
done
+ if [ -z "$MAKE_TARGETS" ]; then
+ continue
+ fi
+
SCRIPT_NAME=".build_core_${TREZOR_MODEL}_${BITCOIN_ONLY}.sh"
cat <<EOF > "build/$SCRIPT_NAME"
# DO NOT MODIFY!
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.