Skip to content

Commit c0a7bba

Browse files
authored
Add note on writing OTP to enc bootloader
1 parent 362f676 commit c0a7bba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bootloaders/encrypted/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ Replace private.pem and privateaes.bin with your own keys - your signing key mus
44
openssl ecparam -name secp256k1 -genkey -out private.pem
55
```
66

7-
The AES key is just be a 32 byte binary file - you can create one with
7+
The AES key is just a 32 byte binary file - you can create one with
88

99
```bash
1010
dd if=/dev/urandom of=privateaes.bin bs=1 count=32
1111
```
1212

13+
You will need to program your OTP using the generated `otp.json` file in the build folder. Note that this will enable secure boot on your device, so only signed binaries can run, and will also lock down the page the AES key is stored in. If you wish to test without enabling secure boot then you can load the `otp.json` file in the source folder, which will just program the AES key and lock down that page.
14+
```bash
15+
picotool otp load otp.json
16+
```
17+
1318
Then either drag & drop the UF2 files to the device in order (enc_bootloader first, then hello_serial_enc) waiting for a reboot in-between, or run
1419
```bash
1520
picotool load enc_bootloader.uf2

0 commit comments

Comments
 (0)