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

Fix cmd_setactiveslot() #515

Merged
merged 11 commits into from
Mar 14, 2024
Merged

Fix cmd_setactiveslot() #515

merged 11 commits into from
Mar 14, 2024

Conversation

bongbui321
Copy link
Contributor

@bongbui321 bongbui321 commented Mar 12, 2024

@bkerler, this should be the correct setactiveslot change of attributes and type for each partition.

Warning: This is qualcomm-specific, and is very slow 20s - 30s -> ~5s-15s since it looks for corresponding partitions for each switch, so it will need to be improved in the future

This is how fastboot does it. it swaps the type of active partitions with their corresponding inactive partitions, and add + unset active bit corresponding to the new active slot. Moreover, boot partitions have additional attribute/flag settings derived from fastboot implementation such as retry_count, priority_val, bootability

qcomm abl doesn't set the success_val at the bit offset 54 until it boots successfully for "boot partition fall back" if there were error with booting process. Not sure if it is safe to set it in qdl mode prior to the successful boot?

@bkerler bkerler merged commit adb2bc7 into bkerler:master Mar 14, 2024
1 check passed
@bkerler
Copy link
Owner

bkerler commented Mar 14, 2024

I assume it should be fine, but I also haven't tested that. Thanks !

@bongbui321
Copy link
Contributor Author

I didn't set the success_val at bit offset 54 and it still boots normally. I'm just not sure if it affects anything in the long run thats all.
if you flash a device enough to get fastboot up, and then flash the device using fastboot would just reset the attributes/flags to correct values

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.

2 participants