f21d8f6119c92b512334c92f1f1bbd07bbe30cfd
When you install `meson` without root privileges via pip, it is not properly when invoked via `meson`. Found this out the hard way, at 91% in a build.
Device specific configuration to build AOSP Android 12 for Raspberry Pi 4.
How to build:
-
Establish Android build environment and install repo.
-
Install additional packages:
sudo apt-get install bc coreutils dosfstools e2fsprogs fdisk kpartx mtools ninja-build pkg-config python3-pip
sudo pip3 install meson mako jinja2 ply pyyaml
- Initialize repo:
repo init -u https://android.googlesource.com/platform/manifest -b android-12.1.0_r22
curl --create-dirs -L -o .repo/local_manifests/manifest_brcm_rpi4.xml -O -L https://raw.githubusercontent.com/raspberry-vanilla/android_local_manifest/android-12.1/manifest_brcm_rpi4.xml
You can also reduce download size by creating a shallow clone and removing unneeded projects (optional):
repo init -u https://android.googlesource.com/platform/manifest -b android-12.1.0_r22 --depth=1
curl --create-dirs -L -o .repo/local_manifests/remove_projects.xml -O -L https://raw.githubusercontent.com/raspberry-vanilla/android_local_manifest/android-12.1/remove_projects.xml
- Sync source code:
repo sync
- Compile:
. build/envsetup.sh
lunch aosp_rpi4-userdebug
make bootimage systemimage vendorimage -j$(nproc)
- Make flashable image:
./rpi4-mkimg.sh
Also look into Linux kernel build instructions.
Issues:
Wiki:
Description