Skip to content

[FEATURE]: Refactor imaging logic for all operating systems #104

@Ajit-Mehrotra

Description

@Ajit-Mehrotra

Context for feature

For the purposes of this issue, "imaging logic" includes: formatting the drives, downloading the OS to be imaged, extracting it, and doing file operations to read, write, and validate.

Recently, Raspberry Pi recently added and has improved and refactored its imaging logic. Some of these changes came through in v1.9.6, which we inherited in the rebase. However, more has been added since in their v1.9.7 tag and upcoming v2 release.

In our v1.1.0, our imaging logic includes a mix of backported fixes for v1.0.1 (v1.8.5 for rpi-imager) but also includes imaging logic from the v1.9.6 rebase, much of which has bugs/was improved further by rpi (which is why we relied on legacy implementations).

Feature goal

Remove legacy code and align ourselves with rpi's current imaging logic (and fix any bugs that we come across in their new implementation) to ensure that we can maintain this codebase more easily in the future.

For example, our imaging logic for windows and mac relies on the legacy implementation with backported fixes. However, the linux was using rpi's implementation (which there are two, regular vs root user). The regular user uses udisks 2, which has stayed the same at the time of writing this. Whereas the root users use rpi's cross-platform disk formatter, (which doesn't work ?).

All operating systems have had some large refactors in regards to formatting, but also for extracting and file operations as well.

This is a large undertaking, susceptible to a lot of bugs, and thus, must be thoroughly tested before release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions