-
Notifications
You must be signed in to change notification settings - Fork 227
src/context: priorize bootchooser to select bootslot (for custom bootloader backend) #1669
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
src/context: priorize bootchooser to select bootslot (for custom bootloader backend) #1669
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1669 +/- ##
=======================================
Coverage 84.36% 84.36%
=======================================
Files 76 76
Lines 22197 22197
=======================================
Hits 18727 18727
Misses 3470 3470
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
31cd05b
to
c53fe0b
Compare
Sounds reasonable to me to give the custom backend priority for setting the booted slot.
I guess it would make sense to clarify the detection order in the description in https://rauc.readthedocs.io/en/latest/integration.html#identification-via-custom-backend |
@ejoerns I've not checked the code yet, but we need to ensure that external and NFS override results from the bootloader backend. |
@jluebbe Indeed, that's one corner case I overlooked. Thus maybe it makes sense to just move the call to It's also a bit inconsistent currently that we check |
I ran into the same issue as @gportay, I think this would be a great path forward! |
The commit 9af0613 introduced the new bootchooser API r_boot_get_current_bootname() to allow the backend to determine the current bootslot. Since then, the bootchooser is able determine the bootslot if it cannot be guessed from the kernel cmdline; it is used by the custom backend only at that moment. This gives the priority to the bootchooser over the kernel cmdline. Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
This splits the logic of get_cmdline_bootname() in two parts: - first the bootname that explicit set the slot (rauc.external or rauc.slot), and the nfs ignored root device - second the bootname guessed from the root device
c53fe0b
to
5cede34
Compare
@jluebbe, @ejoerns, I have split the Also, I am thinking about moving the Is that looking good to you? |
The commit 9af0613 introduced the new bootchooser API r_boot_get_current_bootname() to allow the backend to determine the current bootslot.
Since then, the bootchooser is able determine the bootslot if it cannot be guessed from the kernel cmdline; it is used by the custom backend only at that moment.
This gives the priority to the bootchooser over the kernel cmdline.