Closed yashwanthsinghm closed 2 years ago
a couple of points:
mcusigner
, please add proper variable names at lines 75, 76, 81.bin
files to the rbsigner
crate. Extracted bin
files are temporary artefacts that need to be located in the same folder as the signed artefacts.rbSigner
to signed_images
1)variable names were changed to meaning full in rbsiger/main.rs line number 75,76,81. 2)All the bin files were moved to signed_images folder. 3) rbSigner was renamed to sign_images
Single command to build sign and flash : cargo [board] build-sign-flash rustBoot
yashwanthsingh@Yashwanths-MBP rustBoot % cargo stm32f411 build-sign-flash rustBoot
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target/debug/xtask stm32f411 build-sign-flash rustBoot`
$ cargo build --release
warning: unused config key `build.runner` in `/Users/yashwanthsingh/Yash/Projects/git_rustBoot_yash/rustBoot/boards/firmware/stm32f411/boot_fw_blinky_green/.cargo/config.toml`
Finished release [optimized] target(s) in 0.08s
$ cargo build --release
warning: unused config key `build.runner` in `/Users/yashwanthsingh/Yash/Projects/git_rustBoot_yash/rustBoot/boards/firmware/stm32f411/updt_fw_blinky_red/.cargo/config.toml`
Finished release [optimized] target(s) in 0.08s
$ cargo build --release
Finished release [optimized] target(s) in 0.07s
$ rust-objcopy ../boards/target/thumbv7em-none-eabihf/release/stm32f411_bootfw -O binary ../boards/sign_images/signed_images/stm32f411_bootfw.bin
$ rust-objcopy ../boards/target/thumbv7em-none-eabihf/release/stm32f411_updtfw -O binary ../boards/sign_images/signed_images/stm32f411_updtfw.bin
$ cargo run mcu-image ../boards/sign_images/signed_images/stm32f411_bootfw.bin ../boards/sign_images/keygen/ecc256.der nistp256
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `/Users/yashwanthsingh/Yash/Projects/git_rustBoot_yash/rustBoot/target/debug/rbsigner mcu-image ../boards/sign_images/signed_images/stm32f411_bootfw.bin ../boards/sign_images/keygen/ecc256.der nistp256`
stm32f411_bootfw_v1234_signed.bin
bytes_written: 1908
$ cargo run mcu-image ../boards/sign_images/signed_images/stm32f411_updtfw.bin ../boards/sign_images/keygen/ecc256.der nistp256
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `/Users/yashwanthsingh/Yash/Projects/git_rustBoot_yash/rustBoot/target/debug/rbsigner mcu-image ../boards/sign_images/signed_images/stm32f411_updtfw.bin ../boards/sign_images/keygen/ecc256.der nistp256`
bytes_written: 1996
$ probe-rs-cli erase --chip stm32f411vetx
$ probe-rs-cli download --format Bin --base-address 0x8020000 --chip stm32f411vetx stm32f411_bootfw_v1234_signed.bin
Erasing sectors ✔ [00:00:01] [#############################] 128.00KiB/128.00KiB @ 64.94KiB/s (eta 0s )
Programming pages ✔ [00:00:00] [###############################] 2.00KiB/ 2.00KiB @ 677B/s (eta 0s )
Finished in 2.056s
$ probe-rs-cli download --format Bin --base-address 0x8040000 --chip stm32f411vetx stm32f411_updtfw_v1235_signed.bin
Erasing sectors ✔ [00:00:01] [#############################] 128.00KiB/128.00KiB @ 65.37KiB/s (eta 0s )
Programming pages ✔ [00:00:00] [###############################] 2.00KiB/ 2.00KiB @ 680B/s (eta 0s )
Finished in 2.049s
$ cargo flash --chip stm32f411vetx --release
Finished release [optimized] target(s) in 0.09s
Flashing /Users/yashwanthsingh/Yash/Projects/git_rustBoot_yash/rustBoot/boards/target/thumbv7em-none-eabihf/release/stm32f411
Erasing sectors ✔ [00:00:01] [###############################] 48.00KiB/48.00KiB @ 40.76KiB/s (eta 0s )
Programming pages ✔ [00:00:01] [###############################] 43.00KiB/43.00KiB @ 17.54KiB/s (eta 0s )
Finished in 2.211s
yashwanthsingh@Yashwanths-MBP rustBoot %
@yashwanthsinghm - close this. Lets build on top of #44
@nihalpasham okay i'm closing this.
Rust signing support added for stm32f411 , stm32f446 , stm32f723 , stm32h746 , stm32f334 , nrf52840.