2022-06-04 04:42:40 +01:00
# Qualcomm bootctl HAL for Linux
2021-10-09 23:16:20 +01:00
This HAL was pulled from AOSP source code and bastardised to build and run on a musl/glibc system. This may or may not render any hardware you run it on unusable, you have been warned.
2022-06-04 04:42:40 +01:00
## Dependencies
2021-10-09 23:16:20 +01:00
2022-06-04 04:42:40 +01:00
* zlib-dev
2022-06-04 15:51:22 +01:00
* meson
* cmake
* linux-headers
## Building
qbootctl uses the meson build system
```sh
meson build
meson compile -C build
```
2022-06-04 04:42:40 +01:00
## Usage
2022-06-04 15:51:22 +01:00
```text
2022-06-04 04:42:40 +01:00
qbootctl: qcom bootctrl HAL port for Linux
-------------------------------------------
qbootctl [-c|-m|-s|-u|-b|-n|-x] [SLOT]
<no args> dump slot info (default)
-h this help text
-c get the current slot
-b SLOT check if SLOT is marked as bootable
-n SLOT check if SLOT is marked as successful
-x [SLOT] get the slot suffix for SLOT (default: current)
-s SLOT set to active slot to SLOT
-m [SLOT] mark a boot as successful (default: current)
-u [SLOT] mark SLOT as unbootable (default: current)
```
## Debugging
Set `DEBUG` to 1 in `utils.h` to enable debug logging.
2022-06-10 19:18:13 +01:00
## Documentation
A more details explanation and a list of devices where qbootctl has been
validated can be found [on the postmarketOS wiki ](https://wiki.postmarketos.org/wiki/Android_AB_Slots ):