You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/selfsigned.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,9 @@ make stm32f469disco
17
17
18
18
Read the [main readme](../README.md) to learn more, pay extra attention to the `READ_PROTECTION` and `WRITE_PROTECTION` parameters.
19
19
20
-
We recommend to make a bootloader without any protection at first, flash it, sign and flash the firmware, check that everything works, and then bump the version of the bootloader, recompile with `READ_PROTECTION=1` and `WRITE_PROTECTION=1`, sign and upload the bootloader upgrade.
20
+
We recommend making a bootloader without any protection at first, flash it, sign and flash the firmware, check that signing procedure works, and then bump the version of the bootloader, recompile with `READ_PROTECTION=1` and `WRITE_PROTECTION=1`, sign and upload the bootloader upgrade.
21
+
22
+
If you are sure that everything works you can compile bootloader with all the protections right away.
21
23
22
24
## Creating initial firmware
23
25
@@ -37,6 +39,8 @@ Now you can create initial firmware:
If you want to include main firmware there as well, just add `-f ../path/to/compiled/main/firmware.hex`. Note that firmware should be compiled with `USE_DBOOT=1` for that.
43
+
40
44
The resulting `initial_firmware.bin` can be copy-pasted to the `DIS_F469I` volume that appears when you connect the board with miniUSB.
41
45
42
46
Alternatively, if you have [`stlink-tools`](https://github.com/stlink-org/stlink) installed, you can flash the firmware with verification using:
After flashing of this initial firmware you should see an error screen of the bootloader that "No valid firmware found" - this is what we expect because we didn't upload firmware yet. For that we can generate an upgrade file.
48
52
53
+
Note that release version of the bootloader (rc99) only accepts release versions of the firmware.
54
+
49
55
## Creating upgrade files
50
56
51
57
First, compile firmware of Specter-DIY with `USE_DBOOT=1` flag. It will create a `bin/specter-diy.hex` file:
@@ -69,15 +75,15 @@ Use this command to get the message to sign:
It will return something like `1.4.0rc3-1sujn22lsgatcpyesj9v8lf4zts6myds0cwdl9ukk7pqnasr06laq2gm2yt` - here you see that it's a firmware version 1.4.0-rc3 and bech32-encoded hash of the firmware. You can sign this message now and when you get a signature in base64 format you need to add it to the upgrade:
78
+
It will return something like `1.4.0-1sujn22lsgatcpyesj9v8lf4zts6myds0cwdl9ukk7pqnasr06laq2gm2yt` - here you see that it's a firmware version 1.4.0 and bech32-encoded hash of the firmware. You can sign this message now and when you get a signature in base64 format you need to add it to the upgrade:
Repeat it for necessary number of signatures, now you should be able to copy this signed `specter_upgrade.bin` file to the SD card and load the firmware to the device.
79
85
80
-
Verify that upgrade process works, firmware is fine etc. After that you can upgrade the bootloader to "protected" one.
86
+
Verify that upgrade process works, signing of the firmware went well etc. After that you can upgrade the bootloader to "protected" one.
0 commit comments