From 366d734c4dc27a14958be9f642aefa6cf0da94c2 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Sat, 4 Jul 2026 01:50:53 -0700 Subject: [PATCH] Restructure the repo --- README.md | 89 +++---------------- pawletos.xml => common/pawletos.xml | 13 +-- .../remove_projects.xml | 3 + {vendors => common/vendor}/lineageos.xml | 0 rpi/README.md | 88 ++++++++++++++++++ rpi/pawletos.xml | 13 +++ rpi/repo-shallow.yml | 15 ++++ rpi/repo.yml | 12 +++ {vendors => rpi/vendor}/brcm_rpi.xml | 0 9 files changed, 144 insertions(+), 89 deletions(-) rename pawletos.xml => common/pawletos.xml (90%) rename remove_projects.xml => common/remove_projects.xml (86%) rename {vendors => common/vendor}/lineageos.xml (100%) create mode 100644 rpi/README.md create mode 100644 rpi/pawletos.xml create mode 100644 rpi/repo-shallow.yml create mode 100644 rpi/repo.yml rename {vendors => rpi/vendor}/brcm_rpi.xml (100%) diff --git a/README.md b/README.md index acc6229..f675528 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,22 @@ -### Device specific configuration to build AOSP Android 16 (android-16.0.0_r4) for Raspberry Pi 4 and Raspberry Pi 5. -Based on [RaspberryVanilla](https://github.com/raspberry-vanilla). +### Android Manifests *** -### How to build (Ubuntu 22.04 LTS): +This repo holds manifests per project (except in the common folder) to build Android 17 for all supported devices that PawletOS targets. -1. Establish [Android build environment](https://source.android.com/docs/setup/start/requirements). +*** -2. Install additional packages: +### Setup -``` -sudo apt-get install dosfstools e2fsprogs gdisk kpartx mtools rsync -``` +1. Install [`repo`](https://source.android.com/docs/setup/download#installing-repo). +2. Establish an [Android build environment](https://source.android.com/docs/setup/start/requirements). -3. Initialize repo: +Each target below has its own build instructions (additional tools, repo init steps, lunch targets, etc). -``` -repo init -u https://android.googlesource.com/platform/manifest -b android-16.0.0_r4 -curl -o .repo/local_manifests/manifest_brcm_rpi.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/brcm_rpi.xml --create-dirs -curl -o .repo/local_manifests/manifest_lineageos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/lineageos.xml --create-dirs -curl -o .repo/local_manifests/manifest_pawletos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/pawletos.xml --create-dirs -``` +*** -Or optionally, you can reduce download size by creating a shallow clone and removing unneeded projects: +### Supported targets -``` -repo init -u https://android.googlesource.com/platform/manifest -b android-16.0.0_r4 --depth=1 -curl -o .repo/local_manifests/manifest_brcm_rpi.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/brcm_rpi.xml --create-dirs -curl -o .repo/local_manifests/manifest_lineageos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/lineageos.xml --create-dirs -curl -o .repo/local_manifests/manifest_pawletos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/pawletos.xml --create-dirs -curl -o .repo/local_manifests/remove_projects.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/remove_projects.xml -``` - -4. Sync source code: - -``` -repo sync -``` - -5. Setup Android build environment: - -``` -. build/envsetup.sh -``` - -6. Select the device (`rpi4` or `rpi5`) and build target (normal, `tablet` for tablet, `tv` for Android TV, or `car` for Android Automotive): - -``` -lunch pawlet_rpi4-bp4a-userdebug -``` -``` -lunch pawlet_rpi4_tablet-bp4a-userdebug -``` -``` -lunch pawlet_rpi4_tv-bp4a-userdebug -``` -``` -lunch pawlet_rpi4_car-bp4a-userdebug -``` -``` -lunch pawlet_rpi5-bp4a-userdebug -``` -``` -lunch pawlet_rpi5_tablet-bp4a-userdebug -``` -``` -lunch pawlet_rpi5_tv-bp4a-userdebug -``` -``` -lunch pawlet_rpi5_car-bp4a-userdebug -``` - -7. Compile: - -``` -make bootimage systemimage systemextimage vendorimage productimage -j$(nproc) -``` - -8. Make flashable image for the device (`rpi4` or `rpi5`): - -``` -./rpi4-mkimg.sh -``` -``` -./rpi5-mkimg.sh -``` \ No newline at end of file +| Target | Description | +|---|---| +| [rpi](rpi/) | Raspberry Pi 4 and Raspberry Pi 5 | diff --git a/pawletos.xml b/common/pawletos.xml similarity index 90% rename from pawletos.xml rename to common/pawletos.xml index 3edb3bd..a455393 100644 --- a/pawletos.xml +++ b/common/pawletos.xml @@ -5,17 +5,6 @@ - - - - - - - - - - - @@ -76,4 +65,4 @@ - \ No newline at end of file + diff --git a/remove_projects.xml b/common/remove_projects.xml similarity index 86% rename from remove_projects.xml rename to common/remove_projects.xml index a65a2e3..c6fbfd7 100644 --- a/remove_projects.xml +++ b/common/remove_projects.xml @@ -12,6 +12,8 @@ + + @@ -19,6 +21,7 @@ + diff --git a/vendors/lineageos.xml b/common/vendor/lineageos.xml similarity index 100% rename from vendors/lineageos.xml rename to common/vendor/lineageos.xml diff --git a/rpi/README.md b/rpi/README.md new file mode 100644 index 0000000..ac955a6 --- /dev/null +++ b/rpi/README.md @@ -0,0 +1,88 @@ +### Device specific configuration to build AOSP Android 17 (android-17.0.0_r1) for Raspberry Pi 4 and Raspberry Pi 5. +Based on [RaspberryVanilla](https://github.com/raspberry-vanilla). + +*** + +### How to build (Ubuntu Server 26.04 LTS): + +After setting up the [Android build environment](../README.md#setup), do: + +1. Install additional packages: + +``` +sudo apt-get install dosfstools e2fsprogs gdisk kpartx mtools rsync +``` + +2. Clone [PawletOS-Build](https://git.oxmc.me/PawletOS/PawletOS-Build) and install its dependencies: + +``` +git clone https://git.oxmc.me/PawletOS/PawletOS-Build +cd PawletOS-Build +pip3 install -r requirements.txt +``` + +3. Download the `repo.yml` config for this target: + +``` +curl -o repo.yml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/rpi/repo.yml +``` + +Or optionally, to reduce download size with a shallow clone: + +``` +curl -o repo.yml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/rpi/repo-shallow.yml +``` + +4. Run the build script (clones source and syncs it based on `repo.yml`): + +``` +python3 ./environ.py --applyPatches +``` + +5. source the environment: + +``` +. AOSP-Source/build/envsetup.sh +``` + +6. Select the device (`rpi4` or `rpi5`) and build target (normal, `tablet` for tablet, `tv` for Android TV, or `car` for Android Automotive): + +``` +lunch pawlet_rpi4-cp2a-userdebug +``` +``` +lunch pawlet_rpi4_tablet-cp2a-userdebug +``` +``` +lunch pawlet_rpi4_tv-cp2a-userdebug +``` +``` +lunch pawlet_rpi4_car-cp2a-userdebug +``` +``` +lunch pawlet_rpi5-cp2a-userdebug +``` +``` +lunch pawlet_rpi5_tablet-cp2a-userdebug +``` +``` +lunch pawlet_rpi5_tv-cp2a-userdebug +``` +``` +lunch pawlet_rpi5_car-cp2a-userdebug +``` + +7. Compile: + +``` +make bootimage systemimage systemextimage vendorimage productimage -j$(nproc) +``` + +8. Make flashable image for the device (`rpi4` or `rpi5`): + +``` +./rpi4-mkimg.sh +``` +``` +./rpi5-mkimg.sh +``` \ No newline at end of file diff --git a/rpi/pawletos.xml b/rpi/pawletos.xml new file mode 100644 index 0000000..b1cce42 --- /dev/null +++ b/rpi/pawletos.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/rpi/repo-shallow.yml b/rpi/repo-shallow.yml new file mode 100644 index 0000000..7e0ddad --- /dev/null +++ b/rpi/repo-shallow.yml @@ -0,0 +1,15 @@ +repo: + url: "https://android.googlesource.com/platform/manifest" + branch: "android-17.0.0_r1" + options: + - "--depth=1" + local_manifests: + manifest_common_pawletos: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/common/pawletos.xml" + manifest_brcm_rpi: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/rpi/vendor/brcm_rpi.xml" + manifest_lineageos: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/common/vendor/lineageos.xml" + manifest_pawletos: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/rpi/pawletos.xml" + remove_projects: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/common/remove_projects.xml" + +patches: + dirs: + - vendor/pawlet/patches diff --git a/rpi/repo.yml b/rpi/repo.yml new file mode 100644 index 0000000..6414aa9 --- /dev/null +++ b/rpi/repo.yml @@ -0,0 +1,12 @@ +repo: + url: "https://android.googlesource.com/platform/manifest" + branch: "android-17.0.0_r1" + local_manifests: + manifest_common_pawletos: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/common/pawletos.xml" + manifest_brcm_rpi: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/rpi/vendor/brcm_rpi.xml" + manifest_lineageos: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/common/vendor/lineageos.xml" + manifest_pawletos: "https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-17.0/rpi/pawletos.xml" + +patches: + dirs: + - vendor/pawlet/patches diff --git a/vendors/brcm_rpi.xml b/rpi/vendor/brcm_rpi.xml similarity index 100% rename from vendors/brcm_rpi.xml rename to rpi/vendor/brcm_rpi.xml