A port of the Qualcomm Android bootctrl HAL for musl/glibc userspace.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Caleb Connolly e9e86efb96
even even more rework, drop zlib dep
1 year ago
.clang-format rework, fixup, cleanup 1 year ago
.gitignore gitignore: compile_commands.json 2 years ago
LICENSE cleanup, stub out tests 3 years ago
README.md minor cleanups, improve error handling 2 years ago
bootctrl.h more rework, cleanup, port to pure C 1 year ago
bootctrl_impl.c even even more rework, drop zlib dep 1 year ago
bootctrl_test.c more rework, cleanup, port to pure C 1 year ago
crc32.c even even more rework, drop zlib dep 1 year ago
crc32.h even even more rework, drop zlib dep 1 year ago
gpt-utils.c even even more rework, drop zlib dep 1 year ago
gpt-utils.h even even more rework, drop zlib dep 1 year ago
meson.build even even more rework, drop zlib dep 1 year ago
qbootctl.c more rework, cleanup, port to pure C 1 year ago
ufs-bsg.c more rework, cleanup, port to pure C 1 year ago
ufs-bsg.h minor cleanups, improve error handling 2 years ago
utils.h rework, fixup, cleanup 1 year ago

README.md

Qualcomm bootctl HAL for Linux

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.

Dependencies

  • zlib-dev
  • meson
  • cmake
  • linux-headers

Building

qbootctl uses the meson build system

meson build
meson compile -C build

Usage

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.

Documentation

A more details explanation and a list of devices where qbootctl has been validated can be found on the postmarketOS wiki: