-
Notifications
You must be signed in to change notification settings - Fork 190
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: get current bootslot on custom bootloader #1215
Conversation
c0a2ed6
to
f2a45ec
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1215 +/- ##
==========================================
+ Coverage 79.59% 79.60% +0.01%
==========================================
Files 64 64
Lines 19217 19269 +52
==========================================
+ Hits 15295 15340 +45
- Misses 3922 3929 +7
☔ View full report in Codecov by Sentry. |
@ejoerns I think the PR should pass all the tests now |
@ejoerns Sorry, I fixed the remaining issue, now it should really pass all the tests! |
@ejoerns For the codecov, I'm not sure on how to proceed. Can you share some hints? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made a number of comments, mainly referring to testing and error handling.
The loss in coverage should be resolved by actually testing the added code. See my comments. |
f7114a8
to
cdbdaba
Compare
@ejoerns fixed the distcheck now, sorry! |
@ejoerns |
ok, found and fixed |
89a49d9
to
0b996c6
Compare
I sincerely hope all the issues are solved now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already looks quite good now, especially testing changes.
Just some minor comments you might want to address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine from my site now, thanks for your effort!
On some setup, current bootslot could not be present on the kernel command line (ex: nvidia tegra L4T UEFI), therefore it is needed to use the custom bootloader backend to retrive the current bootslot. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Adding the "get-current" argument handling to test the current booted slot on a custom backend. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
This test requires a configuration file with custom bootloader enabled. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
custom_bootloader_backend must be freed as other resources when cleaning RaucConfig struct. Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
The Nvidia Tegra UEFI offers its own method to enable A/B redundancy, that it's handled internally by the L4T UEFI.
The nvbootctrl command can be used to do maintenance on A/B mechanism, inspect the status and change the next reboot booting slot.
It's not possible also, to modify the kernel cmdline from inside Linux because it is hardcoded in the bootloader at compile time.
To handle the A/B booting process, the system doesn't add the
root=
option to the cmdline, there is indeed a script which inspects the UEFI variables statuses and mount the correct rootfs at the right moment.Therefore, using the cmdline to understand on which slot the system is running is not possible on this family platforms.
Using the custom backend is the only alternative.
I tested this on a jetson agx xavier board.