Commit Graph

6 Commits

Author SHA1 Message Date
Caleb Connolly
e1d7c370bc properly error if run on a non-A/B device
Detect the case where there are no A/B partitions and print an error
about it rather than erroneously continuing execution.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-03-18 14:10:52 +00:00
Arnaud Ferraris
413ee35eda bootctrl: fall back to active slot if current slot not found in cmdline
While postmarketOS makes use of a kernel cmdline argument, this isn't
the case for all distros. Furthermore, this argument isn't present in
those added automatically by the Android bootloader.

In order to still be able to use `qbootctl` on other distros, this
change ensures we use the currently active slot as the current slot when
the cmdline argument is missing. This ensure `qbootctl -m` picks up the
correct slot more often than not, instead of always defaulting to `_a`.
2025-03-18 13:40:57 +00:00
Caleb Connolly
b8d2248914 add a flag to continue when ufs bsg device is missing
For some usecases it is desired to still update the GPT headers even if
the UFS BSG device is missing. Add a new flag which implements this
behaviour.

It isn't made the default because on some platforms this could result in
an unbootable device, there it's preferable to defer to the user by just
bailing out if the UFS BSG device is unavailable.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2023-09-27 18:56:43 +01:00
Caleb Connolly
ea34c3f0b9 drop test stub, fix licenses 2023-06-24 01:38:14 +01:00
Caleb Connolly
e9e86efb96 even even more rework, drop zlib dep
Also fix the mark_boot_successful feature which I broke earlier
2023-06-24 01:04:15 +01:00
Caleb Connolly
bca9aa5dd7 more rework, cleanup, port to pure C
The only C++ was for handling discovering and iterating over the
partitions PER block device, this was implemented in a really
overcomplicated way.

Simplify things, port everything over to c11 and drop the libstdc++
requirement entirely.
2023-06-24 00:06:02 +01:00