03-ANDROID_SDK_Compilation
SDK Introduction
Kernel version: 5.10
Android system version: 13.0
Obtain the SDK Source Code
Network disk directory
Copy the source code compressed package to the compilation host directory If the compilation host is a virtual machine, do not place it in the shared directory for compilation.
Verify the integrity of the file using MD5
Extract the source code compressed package
Compile the Complete Image
Select the corresponding compilation command according to the CPU model. If the compilation fails, you can try to solve it yourself or contact the technical support team.
Configure the SDK compilation items
After the configuration is selected, the software will be configured for the selected device. If you need to switch devices, you need to reconfigure; otherwise, there is no need to configure multiple times.
Compile the complete image
Image generation directory: rockdev/Image-/update-.img
You can configure the compilation thread option and specify 32 threads.
Note: If the compilation fails when building Android without specific error messages, it is likely that the virtual machine configuration is too low. You can modify the default configuration in the build.sh file and try again.
Compile Partition Images Individually
Compile Uboot individually
Image generation directory: rockdev/Image-*/uboot.img
Compile the Kernel individually
Image generation directory: rockdev/Image-*/boot.img
Compile Android individually
Image generation directory: rockdev/Image-*/super.img
Configure the Android environment Configure the command environment so that you can use commands such as mm / get_build_var in the Android environment.
Select the device configuration
Select the corresponding device according to the actual situation. For example, 'K1' and 'K1B' are for rk3568.
Load the corresponding environment script
After the environment is successfully configured, you can use relevant Android commands, such as
Other Commonly Used Commands
Configure the Kernel
Compile the multi-screen adaptive image
The factory Android/Linux image is a multi-screen adaptive image by default, which is compatible with the official 7-inch/10-inch/15-inch displays. It can be directly lit up when connected to any display.
Common Issues
The following lists various common issues encountered during the SDK compilation process, along with their solutions or ideas for resolution.
Insufficient Configuration
Common log errors due to insufficient memory configuration
Killed appears
Solution: Increase the actual memory. Generally, 32G of memory is recommended for Android. If you cannot increase the actual memory, you can try to increase the size of the swap partition and use single-threaded compilation. Configure the thread option and specify single-threaded compilation.
Last updated