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

cdba: Rely on fastboot completion rather than USB disconnect #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andersson
Copy link
Collaborator

The purpose for providing different exit codes (2 vs 110) for timeout before or after fastboot was to allow tools invoking cdba to detect if the device arrived at and performed fastboot or not.

In most cases relying on the fastboot (USB) disconnect notification works fine, but in cases where the provided image fails to decompress the standard fastboot implementation will OKAY the transfer, fail to process the image and then return to process further fastboot requests.

This has been observed in cases where the image is too big, or when it contains a big endian kernel.

Change the logic to rely on the "FASTBOOT_DOWNLOAD" response to determine that we did reach fastboot and where able to upload the image and then something happened - i.e. "there's a problem with the image" vs "there's a setup problem".

The purpose for providing different exit codes (2 vs 110) for timeout
before or after fastboot was to allow tools invoking cdba to detect if
the device arrived at and performed fastboot or not.

In most cases relying on the fastboot (USB) disconnect notification
works fine, but in cases where the provided image fails to decompress
the standard fastboot implementation will OKAY the transfer, fail to
process the image and then return to process further fastboot requests.

This has been observed in cases where the image is too big, or when it
contains a big endian kernel.

Change the logic to rely on the "FASTBOOT_DOWNLOAD" response to
determine that we did reach fastboot and where able to upload the image
and then something happened - i.e. "there's a problem with the image" vs
"there's a setup problem".

Signed-off-by: Bjorn Andersson <[email protected]>
@lumag lumag enabled auto-merge December 1, 2024 08:32
@lumag
Copy link
Collaborator

lumag commented Dec 1, 2024

@andersson

The base branch requires all commits to be signed

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

Successfully merging this pull request may close these issues.

3 participants