Skip to main content

Android Build and Flash

This page summarizes the Android engineering, build, and flashing workflow for the X3588S mini ITX platform.

Development Environment​

Full Android source compilation requires a high-performance Linux machine. The manual uses Ubuntu 14.04 / 16.04 64-bit as examples. For X3588S Android 12, the build script uses Java 8:

export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH

Common dependencies include git, flex, bison, gperf, build-essential, zip, curl, gcc-multilib, g++-multilib, device-tree-compiler, u-boot-tools, libssl-dev, python-pyelftools, repo, p7zip, android-tools-fastboot, and android-tools-adb.

Toolchain​

The cross-compilation toolchains are integrated into the source package:

prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-

Key Paths​

Device tree:

kernel/arch/arm64/boot/dts/rockchip/rk3588s-9tripod-x3588s-evb.dtsi

Partition file:

rockdev/Image-x3588s/parameter.txt

Install Source Package​

tar -xvf x3588_android12.tar.gz
cd x3588s_android12

The real package name may vary by release.

Build​

Build as a normal user, not as root.

U-Boot​

./build.sh -U

Kernel​

./build.sh -K

After kernel changes, rebuild or repack boot.img.

Android Filesystem​

./build.sh -A

Help​

./build.sh -h

Common options:

OptionDescription
-uBuild U-Boot
-kBuild kernel
-sBuild Android filesystem
-UPackage update.img
-j=Parallel build, for example -j=20
-aBuild U-Boot, kernel, Android filesystem, and package image

Output Images​

FileDescription
boot.imgContains kernel.img and resource.img
boot-debug.imgBoot image for root operations on user firmware
config.cfgFlash-tool configuration
MiniLoaderAll.binFirst-stage loader
misc.imgrecovery-wipe boot flag
parameter.txtPartition information
pcba_small_misc.imgSimple PCBA mode flag
pcba_whole_misc.imgFull PCBA mode flag
recovery.imgrecovery-ramdisk, kernel, and dtb
super.imgodm, product, vendor, system, system_ext partitions
trust.imgUsually not required for RK3588S
uboot.imgU-Boot firmware
vbmeta.imgAVB verification information
update.imgFull firmware package for flashing tools

Windows Flashing​

X3588S requires AndroidTool_Release_v2.79 or later. DriverAssitant_v5.1.1 is recommended.

  1. Install the Rockchip USB driver.
  2. Open RKTools/windows/AndroidTool/AndroidTool_Release_v2.79/AndroidTool.exe.
  3. Select the Upgrade Firmware tab.
  4. Select the generated update.img.
  5. Hold the RECOVERY key and connect the USB cable and 12V DC power.
  6. Flash after the tool detects Maskrom or Loader mode.