02-LINUX_SDK_Compilation

SDK Introduction

The Rockchip Linux SDK consists of an SDK source code package and a file system image.

The kernel version of the SDK source code package is 5.10, supporting Ubuntu 20.04 and Debian 11 file systems.

The SDK provides a buildroot system, but the buildroot system is not maintained.

Obtain the SDK Source Code

Download the SDK source code compressed package from the network disk

The network disk SDK directory is as follows:

1-SDK source code\rk356x-linux\
    rk356x-linux-*.tar.gz
    rk356x-linux-*.md5

Copy the source code compressed package to the compilation host directory

Notes:

  1. If the compilation host is a virtual machine, do not compile in the shared directory.

Verify the integrity of the file using MD5

$ md5sum -c *.md5

Extract the source code compressed package

$ tar -zxvf rk356x-linux-*.tar.gz

$ ls -al
    .git

The SDK source code compressed package is shared via a Git repository. You can use the ls -al command to view the .git folder.

Restore the source code files

Enter the extracted directory and restore the source code using Git.

Note: Please operate in Linux and have Git installed.

Obtain the File System Image

The SDK source code package does not include the file system image. You need to refer to the following steps to separately extract and copy the file system to the SDK source code.

The network disk provides Debian and Ubuntu file system images, which can be downloaded according to your needs.

Network disk directory for the file system

Usage of buildroot-dl-20230607.tar.gz:

buildroot-dl-20230607.tar.gz is an offline package of the dl library, which is used to save time during the first compilation.

Verify the integrity of the file using MD5

Extract the Debian image file

The name and directory of the Debian image file must be consistent.

File system directory: debian/linaro-rootfs.img

When selecting Debian during the lunch process, this linaro-rootfs.img will be used for compilation.

Extract the Ubuntu image file

The name and directory of the Ubuntu image file must be consistent.

File system directory: ubuntu/ubuntu-rootfs.img

When selecting Ubuntu during the lunch process, this ubuntu-rootfs.img will be used for compilation.

Compile the Complete Image

When executing build.sh for the first time to compile the SDK, you must select the compilation configuration information, such as CPU model, board model, and file system model.

The specific differences in board models can be found in the Introduction to the Getting Started Document.

SDK Compilation Configuration

The configuration command only needs to be executed once during the first compilation.

Compile the Image

Image generation directory: rockdev/update-*.img

If the compilation fails, you can try to solve it by yourself or contact the technical support customer service.

Compile Partition Images Separately

Compile Uboot Separately

Image generation directory: rockdev/uboot.img

Compile the Kernel Separately

Image generation directory: rockdev/boot.img

Compile Buildroot Separately

Image generation directory: rockdev/rootfs.img

Other Commonly Used Commands

Kernel Configuration

Buildroot Configuration

Compile the Multi-Screen Adaptive Image

The factory Android/Linux image is a multi-screen adaptive image by default, compatible with the official 7-inch/10-inch/15-inch displays. It can be directly lit up when connected to any display.

New Compilation Items in the SDK

Example: Add a compilation option for RK3568 K1 Buildroot

  • Add a new configuration file

  • Modify the compilation configuration file

Toolchain

Last updated