build: use switch_to.sh for qemu builds
What changed, and why it matters
This commit is a routine cleanup of the project's automated build configuration. It replaces a custom QEMU build setup with a shared helper script already used elsewhere. There is no change to the actual Jade firmware code, user-facing behavior, or security-sensitive logic.
No security action required. Review as normal build-maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies .gitlab/test_fw.yml to refactor CI job definitions for QEMU firmware builds. It removes the .build_test_qemu_template template and its inline sdkconfig manipulation (copying defaults and appending CONFIG_DEBUG_UNATTENDED_CI, CONFIG_HEAP_POISONING_COMPREHENSIVE, CONFIG_LOG_DEFAULT_LEVEL_NONE), replacing it with calls to ./tools/switch_to.sh qemu –dev –ci (with optional –psram and –unamalgamated). This is a build-script consolidation; no source code, cryptographic, or runtime behavior is changed.
Changed components
gitlab/test_fw.yml CI configurationInspect captured patch +8 / −13
diff --git a/gitlab/test_fw.yml b/gitlab/test_fw.yml
index 191dd79..43979e3 100644
--- a/gitlab/test_fw.yml
+++ b/gitlab/test_fw.yml
@@ -44,22 +44,17 @@ build_test_jade_v2_noradio_ci:
- . $HOME/esp/esp-idf/export.sh && ./tools/switch_to.sh jade_v2 --dev --debug --ci --log --jtag --noradio
-.build_test_qemu_template:
+build_test_qemu:
extends: .build_test_template
before_script:
- # Create CI config from the default developer device config
- # TODO: Add qemu to tools/switch_to.sh
- - echo $CI_JOB_NAME | sed "s/^${CI_JOB_STAGE}//" | sed "s/_ci$//" >device_name
- - cp configs/sdkconfig$(cat device_name).defaults sdkconfig.defaults
- - echo "CONFIG_DEBUG_UNATTENDED_CI=y" >>sdkconfig.defaults
- - echo "CONFIG_HEAP_POISONING_COMPREHENSIVE=y" >>sdkconfig.defaults
- - echo "CONFIG_LOG_DEFAULT_LEVEL_NONE=y" >>sdkconfig.defaults
-
-build_test_qemu:
- extends: .build_test_qemu_template
+ - . $HOME/esp/esp-idf/export.sh && ./tools/switch_to.sh qemu --dev --ci
build_test_qemu_psram:
- extends: .build_test_qemu_template
+ extends: .build_test_template
+ before_script:
+ - . $HOME/esp/esp-idf/export.sh && ./tools/switch_to.sh qemu --dev --ci --psram
build_test_qemu_psram_unamalgamated:
- extends: .build_test_qemu_template
+ extends: .build_test_template
+ before_script:
+ - . $HOME/esp/esp-idf/export.sh && ./tools/switch_to.sh qemu --dev --ci --psram --unamalgamated
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.