Build Flags
This section provides custom PBRP Build Flags that can be used while building for devices. These flags are expected to be used inside BoardConfig.mk
of your device tree.
PBRP GO Support (DEPRECATED in 3.0.0)
PBRP GO is a lite version of the real PBRP for devices like MTK which have limited recovery partition size. The recovery built will only support limited themes.
Usage:
PB_GO := TRUE
Disable dm-verity by Default
dm-verity is enabled by default in PBRP. This build flag disables dm-verity by default, which can be useful for devices that have issues with dm-verity verification.
Usage:
PB_DISABLE_DEFAULT_DM_VERITY := true
When to use: Use this flag when your device has dm-verity issues that prevent proper booting after system modifications.
Force Use of dd for Flashing Recovery
There are many old devices (like mt65xx variants) which follow traditional approach to flash recovery which can cause issues while flashing. This is an EXPERIMENTAL flag, enable only if you are facing the same kind of issue.
Usage:
PB_FORCE_DD_FLASH := TRUE
When to use: Use this flag for older MediaTek devices (mt65xx variants) that have issues with standard recovery flashing methods.
Official and Beta Build Flags
These flags are used to mark builds as official or beta releases, which affects the build identification and branding.
Usage:
Official Build:
PB_OFFICIAL := true
Beta Build:
BETA_BUILD := true
Note: Use PB_OFFICIAL := true
for official releases and BETA_BUILD := true
for beta builds.
Specific Torch Path
For devices that require a specific torch/flashlight path in PBRP, use this flag to define the correct system path.
Usage:
PB_TORCH_PATH := /sys/class/leds/flashlight
Example paths:
/sys/class/leds/flashlight
- Common flashlight path/sys/class/leds/torch-light0
- Alternative torch path/sys/class/leds/led:flash_0
- Another common path
When to use: Use this flag when the default torch implementation doesn't work on your device, and you need to specify a custom path for the flashlight functionality.
Additional Information
Implementation Guidelines:
- Add these flags to your device's
BoardConfig.mk
file - Flags should be placed before any conditional statements that might depend on them
- Test thoroughly when using experimental flags
- Document any custom flags used in your device tree README
Example BoardConfig.mk snippet:
# PBRP Build Flags
PB_OFFICIAL := true
PB_DISABLE_DEFAULT_DM_VERITY := true
PB_TORCH_PATH := /sys/class/leds/flashlight
# Other device configurations...
TARGET_ARCH := arm64