# postmarketOS aports repository This is a custom fork of the [postmarketOS aports repository](https://gitlab.postmarketos.org/postmarketOS/pmaports), focused on the Xiaomi Poco F3 (Alioth). Its kernel is updated to Linux 7.3.1, carrying forward the downstream commits from the [postmarketOS SM8250 kernel](https://gitlab.postmarketos.org/soc/qualcomm-sm8250/linux) and Alioth-specific work from [nasaarmas/pmaports-alioth](https://github.com/nasaarmas/pmaports-alioth). This repository contains the APKBUILD files for postmarketOS-specific packages, along with the required patches and scripts, if any. There are many more packages defined in the [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/) on which these packages depend. Helpful resources: * [Issues](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items) * [How to create a package](https://wiki.postmarketos.org/wiki/Create_a_package) * [APKBUILD reference](https://wiki.alpinelinux.org/wiki/APKBUILD_Reference) * [pmaports commit style](./COMMITSTYLE.md) * [Approval rules](docs/approval-rules.md) * [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/) * [Alpine Linux package search](https://pkgs.alpinelinux.org/packages) * [postmarketOS package search](https://pkgs.postmarketos.org/packages) ## Alioth kernel The included Nix flake builds the kernel without pmbootstrap or a root-owned chroot, using the package's APKBUILD version, configuration and patch stack as the source of truth. Nix with flakes enabled is required. ```sh nix build # build the kernel, modules and device tree into result/ nix develop # enter the build environment ``` ### Charging patches The local patches in [`device/testing/linux-postmarketos-qcom-sm8250-alioth/`](device/testing/linux-postmarketos-qcom-sm8250-alioth/) also address Alioth charging control and status reporting: * **PM8150B/SMB5 charger:** use charger inhibit for `charging_enabled` to stop battery charging without suspending USB input. Restore the input-current policy and USB input path when re-enabling charging, with a Type-C current fallback when APSD charger detection gets stuck. * **Qualcomm fuel gauge:** follow the device-tree charger supply reference so battery status reflects the charger's state rather than guessing from instantaneous battery current; leave status unknown if the charger status cannot be read. To stop or resume charging, run as root on the phone: ```sh echo 0 > /sys/class/power_supply/pm8150b-charger/charging_enabled # stop charging echo 1 > /sys/class/power_supply/pm8150b-charger/charging_enabled # resume charging ``` ## Git Hooks You can find some useful git hooks in the `.githooks` directory. To use them, run the following command after cloning this repository: ```sh git config --local core.hooksPath .githooks ```