Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,30 @@ cd android-raspberry-pi
./unfold_aosp.sh && ./build.sh
```

### Running `unfold_aosp.sh` script

To run the `unfold_aosp.sh` script, follow these steps:

* Ensure you have the necessary dependencies installed as mentioned in the `README.md` file.
* Navigate to the root directory of the repository.
* Run the `unfold_aosp.sh` script to initialize and sync the AOSP tree. This script is located in the root directory of the repository.

The `unfold_aosp.sh` script will handle the rest of the setup process for the AOSP tree.

### Running `build_cm4.sh` script

To run the `build_cm4.sh` script, follow these steps:

* Ensure you have the necessary dependencies installed as mentioned in the `README.md` file.
* Navigate to the root directory of the repository.
* Run the `unfold_aosp.sh` script to initialize and sync the AOSP tree. This script is located in the root directory of the repository.
* Once the AOSP tree is set up, execute the `build_cm4.sh` script by running the following command:
```bash
./build_cm4.sh
```

The `build_cm4.sh` script will handle the rest of the build process for the CM4 target.

### Notes

- Depending on your hardware and internet connection, downloading and building may take 8h or more.
Expand Down
11 changes: 11 additions & 0 deletions build_cm4.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@

trap 'echo -e "\nbuild.sh interrupted"; exit 1' SIGINT

# Ensure dependencies are installed
if ! command -v repo &> /dev/null
then
echo "repo could not be found. Please install the necessary dependencies as mentioned in the README.md file."
exit 1
fi

# Navigate to the root directory of the repository
cd "$(dirname "$0")"

echo Building the Android
pushd aosptree
. build/envsetup.sh
lunch tesla_android_cm4-userdebug
make images -k || make images -j1
make sdcard
make otapackage
popd
3 changes: 3 additions & 0 deletions unfold_aosp.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

LOCAL_PATH=$(pwd)

# Initialize and sync the AOSP repository
echo Init repo tree using AOSP manifest
pushd aosptree
repo init --depth=2 -u https://android.googlesource.com/platform/manifest -b refs/tags/android-platform-14.0.0_r8 ${GD_REPO_INIT_ARGS}
Expand All @@ -14,11 +15,13 @@ git add *
git commit -m "Add GloDroid Project" --no-edit
popd

# Sync the AOSP repository
echo Sync repo tree
pushd aosptree
repo sync --no-clone-bundle --no-tags -j$(nproc --all) -v
popd

# Apply patches to the AOSP repository
echo Patch AOSP tree
patch_dir() {
pushd aosptree/$1
Expand Down