Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32] Simplifies SimpleNamespace creation for generating factory partition with and without encryption #26015

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions scripts/tools/generate_esp32_chip_factory_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,22 +400,17 @@ def generate_nvs_csv(out_csv_filename):


def generate_nvs_bin(encrypt, size, csv_filename, bin_filename):
nvs_args = SimpleNamespace(version=2,
outdir=os.getcwd(),
input=csv_filename,
output=bin_filename,
size=hex(size))
if encrypt:
nvs_args = SimpleNamespace(version=2,
keygen=True,
keyfile=NVS_KEY_PARTITION_BIN,
inputkey=None,
outdir=os.getcwd(),
input=csv_filename,
output=bin_filename,
size=hex(size))
nvs_args.keygen = True
nvs_args.keyfile = NVS_KEY_PARTITION_BIN
nvs_args.inputkey = None,
nvs_partition_gen.encrypt(nvs_args)
else:
nvs_args = SimpleNamespace(input=csv_filename,
output=bin_filename,
size=hex(size),
outdir=os.getcwd(),
version=2)
nvs_partition_gen.generate(nvs_args)


Expand Down