Skip to content

Commit b16d575

Browse files
author
Marek Matej
committed
zephyr: scripts: partition generator
Added "sys" partition for the virtual efuse usage. Normalize output path. Signed-off-by: Marek Matej <[email protected]>
1 parent 772c1c6 commit b16d575

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

zephyr/scripts/partitions/esp_genpartition.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
start_year = 2024
1010

1111
scheme_default = [
12-
("boot", "mcuboot", 128),
12+
("boot", "mcuboot", 64),
13+
("sys", "sys", 64),
1314
("slot0", "image-0", -1),
1415
("slot1", "image-1", -1),
1516
("slot0-lpcore", "image-0-lpcore", 32),
@@ -20,7 +21,8 @@
2021
]
2122

2223
scheme_amp = [
23-
("boot", "mcuboot", 128),
24+
("boot", "mcuboot", 64),
25+
("sys", "sys", 64),
2426
("slot0", "image-0", -3),
2527
("slot1", "image-1", -3),
2628
("slot0-appcpu", "image-0-appcpu", -1),
@@ -162,8 +164,8 @@ def generate_partition_table_dtsi(flash_size_mb, flash_offset_kb, scheme, scheme
162164

163165
with open(output_file, "w") as f:
164166
f.write("\n".join(output))
165-
166-
print(f"Writing file {output_file}")
167+
168+
print(f"Output file: {output_file}")
167169

168170
def generate_default_partition_table_dtsi(flash_size_mb, flash_offset_kb, scheme_name):
169171

@@ -185,8 +187,8 @@ def generate_default_partition_table_dtsi(flash_size_mb, flash_offset_kb, scheme
185187

186188
with open(output_file, "w") as f:
187189
f.write("\n".join(output))
188-
189-
print(f"Writing file {output_file}")
190+
191+
print(f"Output file: {output_file}")
190192

191193
if __name__ == "__main__":
192194

@@ -195,6 +197,8 @@ def generate_default_partition_table_dtsi(flash_size_mb, flash_offset_kb, scheme
195197
if len(sys.argv) > 1:
196198
output_path = sys.argv[1]
197199

200+
output_path = os.path.realpath(output_path)
201+
198202
for offset_kb in flash_offsets_kb:
199203
for flash_mb in flash_sizes_mb:
200204
generate_partition_table_dtsi(flash_mb, offset_kb, scheme_default, "default")

0 commit comments

Comments
 (0)