From 9641f34367d9a1cfcf23581149b8bbf8d54cac86 Mon Sep 17 00:00:00 2001 From: Konsta Date: Tue, 13 Sep 2022 15:02:11 +0300 Subject: [PATCH] initial commit --- README.md | 58 +++++++++++++++++++++++++ manifest_brcm_rpi4.xml | 61 ++++++++++++++++++++++++++ remove_projects.xml | 99 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 218 insertions(+) create mode 100644 README.md create mode 100644 manifest_brcm_rpi4.xml create mode 100644 remove_projects.xml diff --git a/README.md b/README.md new file mode 100644 index 0000000..5e8eecc --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +### Device specific configuration to build AOSP Android 12 for Raspberry Pi 4. + +#### Wiki: + +- TODO + +#### Issues: + +- [Android](https://github.com/raspberry-vanilla/android_local_manifest/issues) +- [Linux kernel](https://github.com/raspberry-vanilla/android_kernel_manifest/issues) + +### How to build: + +1. Establish [Android build environment](https://source.android.com/setup/initializing) and install [repo](https://source.android.com/docs/setup/develop#installing-repo). + +2. Install additional packages (TODO: possibly non-exhaustive): + +``` +sudo apt-get install bc coreutils dosfstools e2fsprogs fdisk kpartx mtools ninja-build +sudo snap install meson +pip3 install ply +``` + +3. 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 +``` + +4. Sync source code: + +``` +repo sync +``` + +5. Compile: + +``` +. build/envsetup.sh +lunch aosp_rpi4-userdebug +make bootimage systemimage vendorimage -j$(nproc) +``` + +6. Make flashable image: + +``` +./rpi4-mkimg.sh +``` + +Also look into [Linux kernel build instructions](https://github.com/raspberry-vanilla/android_kernel_manifest/tree/android-12.1). diff --git a/manifest_brcm_rpi4.xml b/manifest_brcm_rpi4.xml new file mode 100644 index 0000000..be6c791 --- /dev/null +++ b/manifest_brcm_rpi4.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/remove_projects.xml b/remove_projects.xml new file mode 100644 index 0000000..ce7960d --- /dev/null +++ b/remove_projects.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +