-
Notifications
You must be signed in to change notification settings - Fork 329
[VSC-1539] Fix scenario for partial encryption #1373
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
base: master
Are you sure you want to change the base?
Conversation
Download the artifacts for this pull request: |
Move unencrypted files at the beginning
Pull request has been marked as |
Pull request has been marked as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Issue:
When using the --encrypted-files flag, the flash command generates duplicate arguments, causing the bootloader at address 0x0 to be written twice. This duplication can corrupt the encrypted bootloader during the flashing process.
Root Cause:
The current implementation appends encrypted files after the --encrypt-files flag, then appends all files (both encrypted and unencrypted) again, resulting in duplicated entries for encrypted files.
Fixes #1366
Type of change
Please delete options that are not relevant.
Steps to test this pull request
Prerequisites
I've used esp32-h2 devkitm-1 board with flash encryption already enabled in development mode, but any board should do.
ESP-IDF "flash_encryption" example project
Test Procedure
Setup the test environment:
flasher_args.json
Create test configuration:
flasher_args.json
with the following test configuration:Create placeholder files:
storage.bin
andota_data_initial.bin
files in the build folderFlash the device:
Expected Results
✅ With this fix:
❌ Without this fix (master branch):
Notice the duplicate entries for encrypted files in the broken version.
How has this been tested?
As described above
Test Configuration:
Checklist