initial commit

This commit is contained in:
Konsta
2022-09-13 14:50:45 +03:00
commit 70bbd75ca6
3 changed files with 205 additions and 0 deletions

58
README.md Normal file
View File

@@ -0,0 +1,58 @@
### Device specific configuration to build AOSP Android 13 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-13.0.0_r6
curl --create-dirs -L -o .repo/local_manifests/manifest_brcm_rpi4.xml -O -L https://raw.githubusercontent.com/raspberry-vanilla/android_local_manifest/android-13.0/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-13.0.0_r6 --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-13.0/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-13.0).

60
manifest_brcm_rpi4.xml Normal file
View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github" fetch="https://github.com/" />
<!-- Raspberry Pi -->
<project path="device/brcm/rpi4" name="raspberry-vanilla/android_device_brcm_rpi4" remote="github" revision="android-13.0" >
<linkfile src="mkimg.sh" dest="rpi4-mkimg.sh" />
</project>
<project path="device/brcm/rpi4-kernel" name="raspberry-vanilla/android_device_brcm_rpi4-kernel" remote="github" revision="android-13.0" />
<project path="vendor/brcm" name="raspberry-vanilla/proprietary_vendor_brcm" remote="github" revision="android-13.0" />
<!-- Audio -->
<project path="external/alsa-lib" name="raspberry-vanilla/android_external_alsa-lib" remote="github" revision="android-13.0" />
<project path="external/alsa-utils" name="raspberry-vanilla/android_external_alsa-utils" remote="github" revision="android-13.0" />
<!-- Bluetooth -->
<remove-project name="platform/hardware/interfaces" />
<project path="hardware/interfaces" name="raspberry-vanilla/android_hardware_interfaces" remote="github" revision="android-13.0" />
<!-- Build -->
<remove-project name="platform/build" />
<remove-project name="platform/build/soong" />
<project path="build/make" name="raspberry-vanilla/android_build" remote="github" revision="android-13.0" >
<linkfile src="CleanSpec.mk" dest="build/CleanSpec.mk" />
<linkfile src="buildspec.mk.default" dest="build/buildspec.mk.default" />
<linkfile src="core" dest="build/core" />
<linkfile src="envsetup.sh" dest="build/envsetup.sh" />
<linkfile src="target" dest="build/target" />
<linkfile src="tools" dest="build/tools" />
</project>
<project path="build/soong" name="raspberry-vanilla/android_build_soong" remote="github" revision="android-13.0" >
<linkfile src="root.bp" dest="Android.bp" />
<linkfile src="bootstrap.bash" dest="bootstrap.bash" />
</project>
<!-- Camera -->
<project path="external/boost" name="raspberry-vanilla/android_external_boost" remote="github" revision="android-13.0" />
<project path="external/libcamera" name="raspberry-vanilla/android_external_libcamera" remote="github" revision="android-13.0" />
<project path="external/libyaml" name="raspberry-vanilla/android_external_libyaml" remote="github" revision="android-13.0" />
<project path="external/libyuv_chromium" name="raspberry-vanilla/android_external_libyuv_chromium" remote="github" revision="android-13.0" />
<!-- Graphics -->
<remove-project name="platform/external/drm_hwcomposer" />
<remove-project name="platform/external/libdrm" />
<remove-project name="platform/external/mesa3d" />
<remove-project name="platform/external/minigbm" />
<project path="external/drm_hwcomposer" name="raspberry-vanilla/android_external_drm_hwcomposer" remote="github" revision="android-13.0" />
<project path="external/libdrm" name="raspberry-vanilla/android_external_libdrm" remote="github" revision="android-13.0" />
<project path="external/mesa3d" name="raspberry-vanilla/android_external_mesa3d" remote="github" revision="android-13.0" />
<project path="external/minigbm" name="raspberry-vanilla/android_external_minigbm" remote="github" revision="android-13.0" />
<!-- v4l2_codec2 -->
<remove-project name="platform/external/v4l2_codec2" />
<project path="external/v4l2_codec2" name="raspberry-vanilla/android_external_v4l2_codec2" remote="github" revision="android-13.0" />
<!-- Wifi -->
<remove-project name="platform/packages/modules/Wifi" />
<project path="packages/modules/Wifi" name="raspberry-vanilla/android_packages_modules_Wifi" remote="github" revision="android-13.0" />
</manifest>

87
remove_projects.xml Normal file
View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remove-project name="device/amlogic/yukawa" />
<remove-project name="device/amlogic/yukawa-kernel" />
<remove-project name="device/google/barbet" />
<remove-project name="device/google/barbet-sepolicy" />
<remove-project name="device/google/bluejay" />
<remove-project name="device/google/bluejay-sepolicy" />
<remove-project name="device/google/bluejay-kernel" />
<remove-project name="device/google/bramble" />
<remove-project name="device/google/bramble-sepolicy" />
<remove-project name="device/google/contexthub" />
<remove-project name="device/google/coral" />
<remove-project name="device/google/coral-kernel" />
<remove-project name="device/google/coral-sepolicy" />
<remove-project name="device/google/gs101" />
<remove-project name="device/google/gs101-sepolicy" />
<remove-project name="device/google/gs-common" />
<remove-project name="device/google/raviole" />
<remove-project name="device/google/raviole-kernel" />
<remove-project name="device/google/redbull" />
<remove-project name="device/google/redbull-kernel" />
<remove-project name="device/google/redbull-sepolicy" />
<remove-project name="device/google/redfin" />
<remove-project name="device/google/redfin-sepolicy" />
<remove-project name="device/google/sunfish" />
<remove-project name="device/google/sunfish-kernel" />
<remove-project name="device/google/sunfish-sepolicy" />
<remove-project name="device/google/trout" />
<remove-project name="device/linaro/dragonboard" />
<remove-project name="device/linaro/dragonboard-kernel" />
<remove-project name="device/linaro/hikey" />
<remove-project name="device/linaro/hikey-kernel" />
<remove-project name="device/linaro/poplar" />
<remove-project name="device/linaro/poplar-kernel" />
<remove-project name="device/mediatek/wembley-sepolicy" />
<remove-project name="device/ti/beagle-x15" />
<remove-project name="device/ti/beagle-x15-kernel" />
<remove-project name="platform/hardware/invensense" />
<remove-project name="platform/hardware/knowles/athletico/sound_trigger_hal" />
<remove-project name="platform/hardware/nxp/nfc" />
<remove-project name="platform/hardware/nxp/secure_element" />
<remove-project name="platform/hardware/qcom/audio" />
<remove-project name="platform/hardware/qcom/bootctrl" />
<remove-project name="platform/hardware/qcom/bt" />
<remove-project name="platform/hardware/qcom/camera" />
<remove-project name="platform/hardware/qcom/data/ipacfg-mgr" />
<remove-project name="platform/hardware/qcom/display" />
<remove-project name="platform/hardware/qcom/gps" />
<remove-project name="platform/hardware/qcom/keymaster" />
<remove-project name="platform/hardware/qcom/media" />
<remove-project name="platform/hardware/qcom/msm8960" />
<remove-project name="platform/hardware/qcom/msm8994" />
<remove-project name="platform/hardware/qcom/msm8996" />
<remove-project name="platform/hardware/qcom/msm8x09" />
<remove-project name="platform/hardware/qcom/msm8x26" />
<remove-project name="platform/hardware/qcom/msm8x27" />
<remove-project name="platform/hardware/qcom/msm8x84" />
<remove-project name="platform/hardware/qcom/power" />
<remove-project name="platform/hardware/qcom/sdm845/bt" />
<remove-project name="platform/hardware/qcom/sdm845/data/ipacfg-mgr" />
<remove-project name="platform/hardware/qcom/sdm845/display" />
<remove-project name="platform/hardware/qcom/sdm845/gps" />
<remove-project name="platform/hardware/qcom/sdm845/media" />
<remove-project name="platform/hardware/qcom/sdm845/thermal" />
<remove-project name="platform/hardware/qcom/sdm845/vr" />
<remove-project name="platform/hardware/qcom/sm7150/gps" />
<remove-project name="platform/hardware/qcom/sm7250/display" />
<remove-project name="platform/hardware/qcom/sm7250/gps" />
<remove-project name="platform/hardware/qcom/sm7250/media" />
<remove-project name="platform/hardware/qcom/sm8150/data/ipacfg-mgr" />
<remove-project name="platform/hardware/qcom/sm8150/display" />
<remove-project name="platform/hardware/qcom/sm8150/gps" />
<remove-project name="platform/hardware/qcom/sm8150/media" />
<remove-project name="platform/hardware/qcom/sm8150/thermal" />
<remove-project name="platform/hardware/qcom/sm8150/vr" />
<remove-project name="platform/hardware/qcom/sm8150p/gps" />
<remove-project name="platform/hardware/qcom/wlan" />
<remove-project name="platform/hardware/st/nfc" />
<remove-project name="platform/hardware/st/secure_element" />
<remove-project name="platform/hardware/st/secure_element2" />
<remove-project name="platform/hardware/samsung/nfc" />
<remove-project name="platform/hardware/ti/am57x" />
<remove-project name="platform/prebuilts/bazel/darwin-x86_64" />
<remove-project name="platform/prebuilts/clang/host/darwin-x86" />
<remove-project name="platform/prebuilts/go/darwin-x86" />
</manifest>