Skip to main content

Low Level Development

Introduces how to build and pack uboot, kernel, aosp and so on.

Environment configuration

For Ubuntu >= 15.04 ,use Open JDK

sudo apt-get update
sudo apt-get install openjdk-8-jdk

Download Radxa Android SDK

Radxa Android SDK contains hundreds of Git repositories, and it would be very tedious to download them one by one without repo.

Repo

Repo is a tool used in Android development to manage multiple Git repositories. It is a Python script that facilitates developers to version control and manage multiple Git libraries.

Download Repo

$ echo "export REPO_URL='https://storage.googleapis.com/git-repo-downloads/repo'" >> ~/.bashrc
$ source ~/.bashrc
$ curl https://storage.googleapis.com/git-repo-downloads/repo -o /tmp/repo
$ sudo cp /tmp/repo /usr/local/bin/repo
$ sudo chmod +x /usr/local/bin/repo

Code download

$ repo init -u https://github.com/radxa/manifests.git -b Android12_Radxa_rk14 -m rockchip-s-release.xml
$ repo sync -d --no-tags -j4

Mirror compilation

Mirror compilation can be done using two methods

Compile using the SDK compilation script method

radxa:rock-android12 $ source build/envsetup.sh
radxa:rock-android12 $ lunch RadxaRock5C-userdebug
radxa:rock-android12 $ . /build.sh -UACKu
# get images from rockdev directory

Wait for the build to complete and you will find the images in the rockdev directory.

Method two

You can compile the image step by step according to this method

  1. Set up the environment for compiling the project
radxa:rock-android12 $ source build/envsetup.sh
radxa:rock-android12 $ lunch RadxaRock5C-userdebug
  1. Compile U-boot
radxa:rock-android12 $ . /build.sh -U
  1. Compile the kernel
radxa:rock-android12 $ . /build.sh -CK
  1. Compile AOSP
radxa:rock-android12 $ . /build.sh -A
  1. Make Images
radxa:rock-android12 $ . /build.sh -u