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: docs/en/migration-guide.rst
+98-96Lines changed: 98 additions & 96 deletions
Original file line number
Diff line number
Diff line change
@@ -225,150 +225,152 @@ Choices for the ``--before`` and ``--after`` options have been renamed to use ``
225
225
226
226
1. Replace all underscores in the ``--before`` and ``--after`` options with ``-`` in your scripts.
227
227
228
-
espsecure.py ``v5`` Migration Guide
229
-
***********************************
228
+
.. only:: not esp8266
230
229
231
-
Command and Option Renaming
232
-
###########################
230
+
espsecure.py ``v5`` Migration Guide
231
+
***********************************
233
232
234
-
All the commands and options have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``sign_data`` -> ``sign-data``).
233
+
Command and Option Renaming
234
+
###########################
235
235
236
-
Old command and option names are **deprecated**, meaning they will work for now with a warning, but will be removed in the next major release.
236
+
All the commands and options have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``sign_data`` -> ``sign-data``).
237
237
238
-
This change affects most of the commands and the following options: ``--aes_xts``, ``--flash_crypt_conf``, ``--append_signatures``.
238
+
Old command and option names are **deprecated**, meaning they will work for now with a warning, but will be removed in the next major release.
239
239
240
-
**Migration Steps:**
240
+
This change affects most of the commands and the following options: ``--aes_xts``, ``--flash_crypt_conf``, ``--append_signatures``.
241
241
242
-
1. Replace all underscores in command and option names with ``-`` in your scripts and CI pipelines.
242
+
**Migration Steps:**
243
243
244
-
Public API Changes
245
-
##################
244
+
1. Replace all underscores in command and option names with ``-`` in your scripts and CI pipelines.
246
245
247
-
The public API of ``espsecure.py`` has been updated to provide a more consistent and user-friendly interface for programmatic use in custom scripts and applications.
246
+
Public API Changes
247
+
##################
248
248
249
-
**Key Changes:**
249
+
The public API of ``espsecure.py`` has been updated to provide a more consistent and user-friendly interface for programmatic use in custom scripts and applications.
250
250
251
-
- All functions now accept individual parameters instead of relying on the ``args`` object from the argparse module. Affected functions are:
252
-
- ``digest_secure_bootloader``
253
-
- ``generate_signing_key``
254
-
- ``digest_secure_bootloader``
255
-
- ``generate_signing_key``
256
-
- ``sign_data`` including ``sign_secure_boot_v1`` and ``sign_secure_boot_v2``
257
-
- ``verify_signature`` including ``verify_signature_v1`` and ``verify_signature_v2``
258
-
- ``extract_public_key``
259
-
- ``signature_info_v2``
260
-
- ``digest_sbv2_public_key`` and ``digest_rsa_public_key``
261
-
- ``digest_private_key``
262
-
- ``generate_flash_encryption_key``
263
-
- ``decrypt_flash_data``
264
-
- ``encrypt_flash_data``
265
-
- The ``main`` function parameter ``custom_commandline`` has been renamed to ``argv`` to unify the naming convention with esptool.
251
+
**Key Changes:**
266
252
267
-
**Migration Steps:**
253
+
- All functions now accept individual parameters instead of relying on the ``args`` object from the argparse module. Affected functions are:
254
+
- ``digest_secure_bootloader``
255
+
- ``generate_signing_key``
256
+
- ``digest_secure_bootloader``
257
+
- ``generate_signing_key``
258
+
- ``sign_data`` including ``sign_secure_boot_v1`` and ``sign_secure_boot_v2``
259
+
- ``verify_signature`` including ``verify_signature_v1`` and ``verify_signature_v2``
260
+
- ``extract_public_key``
261
+
- ``signature_info_v2``
262
+
- ``digest_sbv2_public_key`` and ``digest_rsa_public_key``
263
+
- ``digest_private_key``
264
+
- ``generate_flash_encryption_key``
265
+
- ``decrypt_flash_data``
266
+
- ``encrypt_flash_data``
267
+
- The ``main`` function parameter ``custom_commandline`` has been renamed to ``argv`` to unify the naming convention with esptool.
268
268
269
-
1. Update function calls to pass individual parameters instead of the ``args`` object. For example:
or if you were mocking the args object, now you don't have to do that and you can pass parameters directly to the function like:
274
+
``sign_data(data=data, key=key, ...)``.
275
+
2. Replace the ``custom_commandline`` parameter with ``argv`` in the ``main`` function call.
277
276
278
-
Reset Mode Renaming
279
-
###################
277
+
espefuse.py ``v5`` Migration Guide
278
+
***********************************
280
279
281
-
Choices for the ``--before`` option have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``default_reset`` -> ``default-reset``).
280
+
Reset Mode Renaming
281
+
###################
282
282
283
-
**Migration Steps:**
283
+
Choices for the ``--before`` option have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``default_reset`` -> ``default-reset``).
284
284
285
-
1. Replace all underscores in the ``--before`` option with ``-`` in your scripts.
285
+
**Migration Steps:**
286
286
287
-
Command and Option Renaming
288
-
###########################
287
+
1. Replace all underscores in the ``--before`` option with ``-`` in your scripts.
289
288
290
-
All the commands and options have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``burn_custom_mac`` -> ``burn-custom-mac``).
289
+
Command and Option Renaming
290
+
###########################
291
291
292
-
From options only ``--file_name`` has been renamed to ``--file-name``.
292
+
All the commands and options have been renamed to use ``-`` instead of ``_`` as a separator (e.g., ``burn_custom_mac`` -> ``burn-custom-mac``).
293
293
294
-
Old command and option names are **deprecated**, meaning they will work for now with a warning, but will be removed in the next major release.
294
+
From options only ``--file_name`` has been renamed to ``--file-name``.
295
295
296
-
**Migration Steps:**
296
+
Old command and option names are **deprecated**, meaning they will work for now with a warning, but will be removed in the next major release.
297
297
298
-
1. Replace all underscores in the command names with ``-`` in your scripts.
298
+
**Migration Steps:**
299
299
300
+
1. Replace all underscores in the command names with ``-`` in your scripts.
300
301
301
-
``--port`` Option is Required
302
-
#############################
303
302
304
-
The ``--port`` option is now required for all commands (except when using ``--virt``). Previously it was optional and defaulted to ``/dev/ttyUSB0``.
303
+
``--port`` Option is Required
304
+
#############################
305
305
306
-
**Migration Steps:**
306
+
The ``--port`` option is now required for all commands (except when using ``--virt``). Previously it was optional and defaulted to ``/dev/ttyUSB0``.
307
307
308
-
1. Add the ``--port`` option to all your espefuse commands.
308
+
**Migration Steps:**
309
309
310
+
1. Add the ``--port`` option to all your espefuse commands.
310
311
311
-
``execute-scripts`` Command Removal
312
-
###################################
313
312
314
-
The ``execute-scripts`` command has been **removed in v5**. This command was used to execute custom eFuses scripts. It was deprecated in favor of using ``espefuse.py`` as a Python module (see :ref:`here <espefuse-scripting>`).
313
+
``execute-scripts`` Command Removal
314
+
###################################
315
315
316
-
**Migration Steps:**
316
+
The ``execute-scripts`` command has been **removed in v5**. This command was used to execute custom eFuses scripts. It was deprecated in favor of using ``espefuse.py`` as a Python module (see :ref:`here <espefuse-scripting>`).
317
317
318
-
1. Refactor any workflows using the deprecated ``execute-scripts`` to use the public API.
319
-
2. Make sure to use the ``batch_mode`` argument for ``init_commands`` to avoid burning eFuses one by one.
320
-
3. Variables ``idx`` and ``configfiles`` are no longer supported. These can be replaced with simple for loops in Python.
318
+
**Migration Steps:**
321
319
322
-
For example, the following commands and script (using ESP32):
320
+
1. Refactor any workflows using the deprecated ``execute-scripts`` to use the public API.
321
+
2. Make sure to use the ``batch_mode`` argument for ``init_commands`` to avoid burning eFuses one by one.
322
+
3. Variables ``idx`` and ``configfiles`` are no longer supported. These can be replaced with simple for loops in Python.
323
323
324
-
.. code-block:: bash
324
+
For example, the following commands and script (using ESP32):
0 commit comments