Build Celadon From Source
This page explains the prerequisites and steps to set up your environment, download source code, and build Celadon from source.
Prerequisites
A 64-bit development workstation running Ubuntu* 22.04 (Jammy Jellyfish) operating system.
Python supported version is 3.6+. This is mainly to be inline with latest repo command released by Google.
Around 350GB of free disk space on your workstation is required to checkout the source code and to store the build artifacts.
Note
Although Android* is typically built with a GNU/Linux* or macOS* operating system, we recommend you build Celadon images on Ubuntu* 22.04. For setup instructions using other operating systems, refer to the Establishing a Build Environment section on the AOSP website.
Also, note the Android prerequisites for build.
Set up the development environment
Celadon and Android source code consist of multiple Git* repositories. The repo tool makes it easier to work with those repositories.
Create a local
bin/
directory, download the repo tool to that directory, and make the binary executable with the following commands:$ mkdir -p ~/bin $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo $ export PATH=~/bin:$PATH
Install the following required packages on your 64-bit Ubuntu 22.04 LTS development workstation prior to the compilation:
$ sudo apt-get update $ sudo apt-get install -y wget openjdk-8-jdk git ccache automake \ lzop bison gperf build-essential zip curl \ zlib1g-dev g++-multilib python3-networkx \ libxml2-utils bzip2 libbz2-dev libbz2-1.0 \ libghc-bzlib-dev squashfs-tools pngcrush \ schedtool dpkg-dev liblz4-tool make optipng maven \ libssl-dev bc bsdmainutils gettext python3-mako \ libelf-dev sbsigntool dosfstools mtools efitools \ python3-pystache git-lfs python-is-python3 flex clang libncurses5 \ fakeroot ncurses-dev xz-utils cryptsetup-bin \ apt-transport-https ca-certificates curl lsb-release \ rsync vim python-six kmod glslang-tools \ software-properties-common cpio python3-pip ninja-build \ cutils cmake pkg-config xorriso mtools libjson-c-dev file $ sudo pip3 install meson==0.60.0 mako==1.1.0 dataclasses pycryptodome ply==3.11 # OneAPI Integration support has been added # but it has dependencies which need to be installed in build environment $ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ | tee /etc/apt/sources.list.d/oneAPI.list $sudo apt-get update && \ sudo apt-get install -y intel-oneapi-ipp-devel-2021.10 \ intel-oneapi-mkl-devel-2021.1.1 intel-oneapi-ipp-devel-32bit-2021.10 \ intel-oneapi-mkl-devel-32bit-2021.1.1
Build Celadon Android 15 Version
Celadon Android 15 version supports both BareMetal and CIV [Android VM]
Download the source
Enter the following commands to create an empty directory to hold the Celadon source files and serve as the working directory, and to bring down the latest version of repo tool, including its most recent fixes.
Note
The URL specifies the manifest that refers to various repositories used by Celadon, which are placed within the working directory. For now, a
.repo/
folder is created to store the manifest and the metadata of the source repositories.$ mkdir celadon $ cd celadon
Note, the below repo init command pulls the latest development celadon source code based on Android 15 from the master branch.
$ repo init -u https://github.com/projectceladon/manifest -b master -m default.xml
To continue working on the Android 14 based source code, use the following manifest instead:
$ repo init -u https://github.com/projectceladon/manifest -b celadon/u/mr0/master
Enter the following command to pull down the Celadon Android source tree to your working directory. The repo sync operation might take time depending on your Internet download speed. Refer to the Downloading the Source section of the AOSP website for tips to download the source behind a proxy.
$ repo sync -c
Build Celadon boot image
Optionally, delete existing output of any previous build with the following command in the top-most Celadon source directory:
$ make clobber
Enter the following command to initialize the build variables with the
envsetup.sh
script:$ source build/envsetup.sh
Specify your Celadon lunch target using the lunch command. You can run lunch with no arguments to choose different build variants, and select a lunch target from a list of available options. For example, the following commands configure the build system to build the installer files for Celadon in VM images:
$ lunch caas-ap3a-userdebug # this is used for Android 15 onwards $ lunch caas-userdebug # this will be used until Android 14 $ make flashfiles -j $(nproc)
Note
The -j $(nproc) argument instructs the builder to compile the source code with parallel tasks. The generated kernelflinger executables .ZIP file (
out/target/product/caas/caas-flashfiles-eng.$USER.zip
andout/target/product/caas/caas-flashfiles-eng.$USER.iso.zip
) is available after the build. You can refer to Run Celadon in a virtual machine section to prepare the host environment and boot the CiV image with QEMU.