Skip to content

Commit d4ed998

Browse files
committed
Remove update-key.cmake
This is not necessary anymore, now picotool writes the AES key to otp json files Fixes #613
1 parent 805e007 commit d4ed998

File tree

6 files changed

+5
-332
lines changed

6 files changed

+5
-332
lines changed

bootloaders/encrypted/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ add_executable(enc_bootloader
44
aes.S
55
)
66

7-
# Add command to update otp.json if privateaes.bin changes
8-
add_custom_command(OUTPUT ${CMAKE_CURRENT_LIST_DIR}/otp.json
9-
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_LIST_DIR}/update-key.cmake"
10-
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin)
11-
# Copy that otp.json file to build directory
7+
# Copy otp.json file to build directory
128
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otp.json
139
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/otp.json" "${CMAKE_CURRENT_BINARY_DIR}/otp.json"
1410
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/otp.json)

bootloaders/encrypted/otp.json

+1-138
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,5 @@
11
{
2-
"30:0" :
3-
{
4-
"ecc" : true,
5-
"value" :
6-
[
7-
"0x31",
8-
"0xb6",
9-
"0xd8",
10-
"0x18",
11-
"0x23",
12-
"0x2e",
13-
"0x7b",
14-
"0x7c",
15-
"0xa3",
16-
"0xb1",
17-
"0xb7",
18-
"0x90",
19-
"0x7b",
20-
"0x2f",
21-
"0x41",
22-
"0xd2",
23-
"0x51",
24-
"0xb5",
25-
"0x03",
26-
"0x62",
27-
"0xd6",
28-
"0x21",
29-
"0x0c",
30-
"0xb5",
31-
"0x8d",
32-
"0x17",
33-
"0xe6",
34-
"0xd5",
35-
"0x6b",
36-
"0x0d",
37-
"0x87",
38-
"0x8d",
39-
"0x2b",
40-
"0x74",
41-
"0xa4",
42-
"0xba",
43-
"0xb9",
44-
"0x14",
45-
"0x75",
46-
"0x88",
47-
"0x9b",
48-
"0x05",
49-
"0x2d",
50-
"0x32",
51-
"0x51",
52-
"0xc1",
53-
"0x35",
54-
"0x09",
55-
"0x78",
56-
"0xbb",
57-
"0x6d",
58-
"0xc2",
59-
"0xbb",
60-
"0xa6",
61-
"0x5e",
62-
"0x95",
63-
"0xa2",
64-
"0x29",
65-
"0x32",
66-
"0x34",
67-
"0x5b",
68-
"0x2c",
69-
"0xd3",
70-
"0xf8",
71-
"0x5d",
72-
"0xe2",
73-
"0x5f",
74-
"0x23",
75-
"0xeb",
76-
"0x27",
77-
"0xa4",
78-
"0xcd",
79-
"0xb0",
80-
"0x8e",
81-
"0xf4",
82-
"0x6e",
83-
"0x94",
84-
"0x86",
85-
"0x19",
86-
"0x93",
87-
"0x3a",
88-
"0xd8",
89-
"0x97",
90-
"0x65",
91-
"0x29",
92-
"0x25",
93-
"0x57",
94-
"0x65",
95-
"0x49",
96-
"0x03",
97-
"0xfe",
98-
"0xc6",
99-
"0xe9",
100-
"0x8b",
101-
"0xa3",
102-
"0x7e",
103-
"0x2b",
104-
"0x53",
105-
"0x80",
106-
"0x68",
107-
"0xdd",
108-
"0x05",
109-
"0x10",
110-
"0x17",
111-
"0xca",
112-
"0xc3",
113-
"0xa8",
114-
"0x04",
115-
"0x8d",
116-
"0x12",
117-
"0xaf",
118-
"0xd9",
119-
"0x49",
120-
"0xa9",
121-
"0x6d",
122-
"0x90",
123-
"0x7c",
124-
"0xb3",
125-
"0x63",
126-
"0x4f",
127-
"0x36",
128-
"0xc5",
129-
"0x00",
130-
"0xb5",
131-
"0x71",
132-
"0x74",
133-
"0xe6",
134-
"0x9a"
135-
]
136-
},
1372
"OTP_DATA_KEY1" : [ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 ],
1383
"OTP_DATA_KEY1_VALID" : "0x010101",
139-
"OTP_DATA_KEY2" : [ 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0 ],
140-
"OTP_DATA_KEY2_VALID" : "0x010101",
141-
"PAGE30_LOCK0" : "0x4a4a4a"
4+
"PAGE30_LOCK0" : "0x494949"
1425
}

bootloaders/encrypted/update-key.cmake

-23
This file was deleted.

encrypted/hello_encrypted/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ pico_set_binary_version(hello_encrypted MAJOR 7 MINOR 3)
1919
# set tbyb (optional)
2020
# target_compile_definitions(hello_encrypted PRIVATE PICO_CRT0_IMAGE_TYPE_TBYB=1)
2121

22-
# Add command to update otp.json if privateaes.bin changes
23-
add_custom_command(OUTPUT ${CMAKE_CURRENT_LIST_DIR}/otp.json
24-
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_LIST_DIR}/update-key.cmake"
25-
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin)
26-
# Copy that otp.json file to build directory
22+
# Copy otp.json file to build directory
2723
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otp.json
2824
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/otp.json" "${CMAKE_CURRENT_BINARY_DIR}/otp.json"
2925
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/otp.json)

encrypted/hello_encrypted/otp.json

+2-138
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,5 @@
11
{
2-
"29:0" :
3-
{
4-
"ecc" : true,
5-
"value" :
6-
[
7-
"0x31",
8-
"0xb6",
9-
"0xd8",
10-
"0x18",
11-
"0x23",
12-
"0x2e",
13-
"0x7b",
14-
"0x7c",
15-
"0xa3",
16-
"0xb1",
17-
"0xb7",
18-
"0x90",
19-
"0x7b",
20-
"0x2f",
21-
"0x41",
22-
"0xd2",
23-
"0x51",
24-
"0xb5",
25-
"0x03",
26-
"0x62",
27-
"0xd6",
28-
"0x21",
29-
"0x0c",
30-
"0xb5",
31-
"0x8d",
32-
"0x17",
33-
"0xe6",
34-
"0xd5",
35-
"0x6b",
36-
"0x0d",
37-
"0x87",
38-
"0x8d",
39-
"0x2b",
40-
"0x74",
41-
"0xa4",
42-
"0xba",
43-
"0xb9",
44-
"0x14",
45-
"0x75",
46-
"0x88",
47-
"0x9b",
48-
"0x05",
49-
"0x2d",
50-
"0x32",
51-
"0x51",
52-
"0xc1",
53-
"0x35",
54-
"0x09",
55-
"0x78",
56-
"0xbb",
57-
"0x6d",
58-
"0xc2",
59-
"0xbb",
60-
"0xa6",
61-
"0x5e",
62-
"0x95",
63-
"0xa2",
64-
"0x29",
65-
"0x32",
66-
"0x34",
67-
"0x5b",
68-
"0x2c",
69-
"0xd3",
70-
"0xf8",
71-
"0x5d",
72-
"0xe2",
73-
"0x5f",
74-
"0x23",
75-
"0xeb",
76-
"0x27",
77-
"0xa4",
78-
"0xcd",
79-
"0xb0",
80-
"0x8e",
81-
"0xf4",
82-
"0x6e",
83-
"0x94",
84-
"0x86",
85-
"0x19",
86-
"0x93",
87-
"0x3a",
88-
"0xd8",
89-
"0x97",
90-
"0x65",
91-
"0x29",
92-
"0x25",
93-
"0x57",
94-
"0x65",
95-
"0x49",
96-
"0x03",
97-
"0xfe",
98-
"0xc6",
99-
"0xe9",
100-
"0x8b",
101-
"0xa3",
102-
"0x7e",
103-
"0x2b",
104-
"0x53",
105-
"0x80",
106-
"0x68",
107-
"0xdd",
108-
"0x05",
109-
"0x10",
110-
"0x17",
111-
"0xca",
112-
"0xc3",
113-
"0xa8",
114-
"0x04",
115-
"0x8d",
116-
"0x12",
117-
"0xaf",
118-
"0xd9",
119-
"0x49",
120-
"0xa9",
121-
"0x6d",
122-
"0x90",
123-
"0x7c",
124-
"0xb3",
125-
"0x63",
126-
"0x4f",
127-
"0x36",
128-
"0xc5",
129-
"0x00",
130-
"0xb5",
131-
"0x71",
132-
"0x74",
133-
"0xe6",
134-
"0x9a"
135-
]
136-
},
1372
"OTP_DATA_KEY1" : [ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 ],
1383
"OTP_DATA_KEY1_VALID" : "0x010101",
139-
"PAGE29_LOCK0" : "0x494949",
140-
"PAGE29_LOCK1" : "0x3d3d3d"
141-
}
4+
"PAGE29_LOCK0" : "0x494949"
5+
}

encrypted/hello_encrypted/update-key.cmake

-23
This file was deleted.

0 commit comments

Comments
 (0)