Build System
This document provides a complete guide to compiling the Android system for Radxa Cubie A7Z.
System Requirements
- Memory: 32GB RAM recommended, minimum 16GB RAM
- OS: Ubuntu 22.04 or later recommended
If using 16GB RAM, you need to enable swap space before compiling the Android system.
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Install Dependencies
sudo apt update -y
sudo apt install libelf-dev libssl-dev bc flex bison dwarves repo git-lfs libncurses5 gawk lib32z1 lib32z1-dev -y
Download Source Code
mkdir -p ~/android
cd ~/android
repo init -u https://github.com/radxa/allwinner-android-manifests -b Android13_A733_v1.0 -m aw-a733-release.xml
repo sync
repo forall -c 'git lfs pull'
System Build
Compile Android system from source code.
Configure Model
Navigate to the downloaded source code's longan directory and use ./build.sh config for model configuration.
cd ~/android/longan
./build.sh config
In the interactive terminal configuration, select the following options in order:
- System Platform -> Android
- Main Control -> a733
- Board Model -> radxa_a7z
- Flash -> default
Compile Kernel
cd ~/android/longan
./build.sh
After compilation is complete, the terminal will display a message similar to sun60iw2p1 compile all(Kernel+modules+boot.img) successful.
The generated kernel files will be located in the out directory of the current folder.
Compile Android System
Set Up Build Environment
cd ~/android
source build/envsetup.sh
Select Build Model
lunch <board-model>
Replace <board-model> with a733_radxa_a7z-userdebug, for example: lunch a733_radxa_a7z-userdebug
Compile Android System
make -j$(nproc)
After successful compilation, the terminal will display a message similar to #### build completed successfully (06:06 (mm:ss)) ####.
Generate Flashable Image
pack
After the image packaging is complete, the terminal will output the size and file path of the generated image.