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

Firmware update: Check SW und HW version and scripts for binary creation #75

Open
MaxBaex opened this issue Jan 17, 2024 · 5 comments
Open

Comments

@MaxBaex
Copy link
Member

MaxBaex commented Jan 17, 2024

in the update file and compare to running software version before flashing. As described here: https://github.com/larus-breeze/doc_larus/blob/master/documentation/can_details/definitions.md#manufacturer-and-hardware-versions

@MaxBaex MaxBaex mentioned this issue Jan 17, 2024
7 tasks
@MaxBaex
Copy link
Member Author

MaxBaex commented Mar 5, 2024

self.elf_file = ELFFile(in_stream, sys.stdout)

second parameter sys.stdout needs to be removed as script fails with
TypeError: init() takes 2 positional arguments but 3 were given

@MaxBaex MaxBaex changed the title Firmware update: Check SW und HW version Firmware update: Check SW und HW version and scripts for binary creation Mar 5, 2024
@MaxBaex
Copy link
Member Author

MaxBaex commented Mar 6, 2024

Use http://elm-chan.org/fsw/ff/doc/findfirst.html to find all *.bin images. Then loop through all *.bin images and

  • Match the hardware version in each image.

  • Search for the *.bin image with the "newest/highest software version" File name doesn't matter except for the file-ending.

  • Compare software version from newest *.bin file to the currently running version. Flash if the uSD image contains a different version.

  • No role-back protection and no Signature (authenticity) checking right know.

@MaxBaex
Copy link
Member Author

MaxBaex commented Aug 20, 2024

Where is the hardware and software version of the currently flashed image available?

@MaxBaex
Copy link
Member Author

MaxBaex commented Aug 20, 2024

It needs to be well tested that a flashed image will not be flashed again and again. This could happen if the software version detection is not robust.

@realtimepeople
Copy link
Collaborator

The present minimalistic solution already enforces not to flash the same image again.
The GIT commit hash is placed at the beginning of the flash image, immediately behind the interrupt vectors. If this pattern is already in FLASH, the updater refuses flashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants