What changed, and why it matters
This commit simply renames a build script from bitbox03_image_header.py to image_header.py and updates all references in the Makefile and Rust build files. The script's contents and behavior are unchanged. There is no security issue here.
No action needed; this is a benign rename-only refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A pure refactoring commit: the image header post-processing script is renamed to support future sharing across products. All call sites (Makefile targets for bitbox03-boot1 and bitbox03-firmware, plus two build.rs files and a comment in image_header.rs) are updated to the new path. No functional code changes are present in the diff.
Changed components
Makefilescripts/image_header.py (renamed from scripts/bitbox03_image_header.py)src/rust/bins/bitbox03-boot1/build.rssrc/rust/bins/bitbox03-firmware/build.rssrc/rust/bitbox-boot-utils/src/image_header.rsInspect captured patch +7 / −7
### Makefile
@@ -268,12 +268,12 @@ bitbox03-boot0-release:
arm-none-eabi-size -Ax src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-boot0
bitbox03-boot1:
(cd src/rust; cargo bitbox03-boot1-stm32u5a9j-dk)
- python3 scripts/bitbox03_image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-boot1
+ python3 scripts/image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-boot1
arm-none-eabi-size src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-boot1
arm-none-eabi-size -Ax src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-boot1
bitbox03-boot1-release:
(cd src/rust; cargo bitbox03-boot1-stm32u5a9j-dk-release)
- python3 scripts/bitbox03_image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-boot1
+ python3 scripts/image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-boot1
arm-none-eabi-size src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-boot1
arm-none-eabi-size -Ax src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-boot1
bitbox03-factorysetup:
@@ -286,12 +286,12 @@ bitbox03-factorysetup-release:
arm-none-eabi-size -Ax src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-factorysetup
bitbox03-firmware:
(cd src/rust; cargo bitbox03-firmware-stm32u5a9j-dk)
- python3 scripts/bitbox03_image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-firmware
+ python3 scripts/image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-firmware
arm-none-eabi-size src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-firmware
arm-none-eabi-size -Ax src/rust/target/thumbv8m.main-none-eabihf/debug/bitbox03-firmware
bitbox03-firmware-release:
(cd src/rust; cargo bitbox03-firmware-stm32u5a9j-dk-release)
- python3 scripts/bitbox03_image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-firmware
+ python3 scripts/image_header.py finalize-elf src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-firmware
arm-none-eabi-size src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-firmware
arm-none-eabi-size -Ax src/rust/target/thumbv8m.main-none-eabihf/release/bitbox03-firmware
### scripts/image_header.py
[binary or diff unavailable]
### src/rust/bins/bitbox03-boot1/build.rs
@@ -13,7 +13,7 @@ fn run_command(command: &mut Command, description: &str) {
fn generate_header_object(manifest_dir: &Path, out_dir: &Path) {
let repo_root = manifest_dir.join("../../../..");
- let script = repo_root.join("scripts/bitbox03_image_header.py");
+ let script = repo_root.join("scripts/image_header.py");
let header_manifest = manifest_dir.join("image_header.json");
let header_bin = out_dir.join("bitbox03-boot1-header.bin");
let header_object = out_dir.join("bitbox03-boot1-header.o");
### src/rust/bins/bitbox03-firmware/build.rs
@@ -14,7 +14,7 @@ fn run_command(command: &mut Command, description: &str) {
}
fn generate_header_object(manifest_dir: &Path, out_dir: &Path, repo_root: &Path) {
- let script = repo_root.join("scripts/bitbox03_image_header.py");
+ let script = repo_root.join("scripts/image_header.py");
let header_manifest = manifest_dir.join("image_header.json");
let header_bin = out_dir.join("bitbox03-firmware-header.bin");
let header_object = out_dir.join("bitbox03-firmware-header.o");
### src/rust/bitbox-boot-utils/src/image_header.rs
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
-// Must stay in sync with HEADER_LEN in scripts/bitbox03_image_header.py.
+// Must stay in sync with HEADER_LEN in scripts/image_header.py.
pub const IMAGE_HEADER_LEN: usize = 1024;
pub const IMAGE_HEADER_MAGIC_BOOT1: [u8; 4] = *b"BBB1";
pub const IMAGE_HEADER_MAGIC_FIRMWARE: [u8; 4] = *b"BBFW";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.