给reno5pro+编译twrp
准备工作:
一台linux电脑
至少64g的剩余空间
良好的网络连接
至少16g的运行内存

安装依赖(以debian系为例)
sudo apt update
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev git repo python python3 python3-pip -y --fix-missing

开启缓存(可选,提高编译速度)
sudo apt install ccache -y
export USE_CCACHE=1
ccache -M 50g

同步源码
git config --global user.email "xxx@xxx.com"
git config --global user.name "xxx"
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-12.1
出现repo has been initialized in xxxxxxx就成功了
repo sync(可能需要科学上网)
出现repo sync has finished successfully就成功了

拉取设备树
git clone https://github.com/AndyCGYan/android_device_oppo_OP4EA7 device/oppo/pdrm00

准备编译
build/envsetup.sh
lunch omni_pdrm00-eng

开始编译
export ALLOW_MISSING_DEPENDENCIES=true
export LC_ALL="C"
mka recoveryimage -j$(nproc)
编译完成的twrp在out/target/product/pdrm00里。