Read at first: https://github.com/nguyenanhgiau/local_manifests/tree/rpi4-a12-telephony
Apply the patch fix for android-s-beta-2
Run the below command for building AOSP:
cd <aosp_dir>
source build/envsetup.sh
lunch rpi4-eng
make ramdisk systemimage vendorimage -j[n]
Use -j[n] option with make, if build host has a good number of CPU cores.
There is a prebuild kernel image in scripts/kernel-android-S.
If you want to build a custom kernel, follow building kernel
We provide a script in $ANDROID_BUILD_TOP/scripts for writing and packaging. Follow Android4Pi Script