LINUX_SDK Source Compilation¶
Compilation Environment¶
Set up the environment on a PC to compile the Android/Linux SDK.
Environment Preparation¶
Install Ubuntu on a PC to perform SDK compilation.
- Hardware: PC must meet RAM ≥ 16 GB, CPU cores ≥ 4, Hard Drive ≥ 500GB
- Software: Ubuntu 22.04, allocate ≥ 200GB disk space for virtual machines
Install Dependencies¶
1. Enter Ubuntu, open Terminal, switch to root user

2. Enter the following commands in sequence to install dependencies.
sudo apt install git bc bison build-essential curl flex libsdl1.2-dev
sudo apt install g++-multilib gcc-multilib gnupg gperf libncurses5-dev
sudo apt install imagemagick lib32ncurses5-dev lib32readline-dev squashfs-tools
sudo apt install lib32z1-dev liblz4-tool xsltproc libssl-dev libwxgtk3.0-gtk3-dev
sudo apt install libxml2 libxml2-utils schedtool lzop pngcrush rsync
sudo apt install yasm zip zlib1g-dev python3 device-tree-compiler
sudo apt install python-pip gawk openjdk-8-jdk u-boot-tools patchelf expect
sudo pip install pyelftools
Obtaining SDK Source Code¶
Note
1. The source code cannot be compiled in a shared directory.
2. The compilation host cannot log in using the ROOT account.
1. Click to download SDK. Copy the source code compressed package to the compilation host directory.
2. Navigate to the source code directory and enter the command to decompress.
3. Enter the decompressed a133-linux directory and enter the command to restore the source code.
First-time Compilation Configuration¶
./build.sh lunch
======you are building a133 linux======
1. BoardConfig-a133-kickpi-k5.mk
2. BoardConfig-a133-kickpi-k5c.mk
which board would you like (1-2): //Select according to board type K5 or K5C

Compile Full Image¶
The generated image is located at a133-linux/out/update-a133-kickpi-k5-ubuntu16.04-lvds-7-1024-600-2025110620.img

Individual Compilation¶
Compile kernel individually
Compile rootfs individually
Kconfig Configuration¶
Kconfig modification and saving
Device Tree Path¶
Toolchain¶
Package path
Tool path after compilation
Q&A¶
- Missing event.c file issue?
aarch64-linux-gnu-gcc: error: /home/A/sdk/a133/a133-linux-test1/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/server/env/linux/event.c: No such file or directory
Perform clean operation
- Cannot open Terminal in Ubuntu 22.04?
Press ctrl+alt+F3 on the virtual machine page to enter command line mode, follow the steps shown in the diagram.

Change en_US to en_US.UTF-8, save and exit, enter reboot to restart.
