# rockchip **Repository Path**: wangxinyv/rockchip ## Basic Information - **Project Name**: rockchip - **Description**: It provides scripts for building openEuler image on Rockchip Socs and documents - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 27 - **Created**: 2025-02-03 - **Last Updated**: 2025-02-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Rockchip English | [简体中文](./README.md) This repository provides scripts for building openEuler image for Rockchip development boards and related documents. - [Rockchip](#rockchip) - [File Description](#file-description) - [How To Download the Latest Image](#how-to-download-the-latest-image) - [How to Build Images](#how-to-build-images) - [Prepare the Environment](#prepare-the-environment) - [Run the Scripts to Build Images](#run-the-scripts-to-build-images) - [How to Use an Image](#how-to-use-an-image) - [Install an Image on an SD Card](#install-an-image-on-an-sd-card) - [Install an Image on an EMMC](#install-an-image-on-an-emmc) - [Install an Image on an EMMC](#install-an-image-on-an-emmc) ## File Description - [documents](./documents/): - [Building openEuler image for Rockchip development boards](documents/openEuler镜像的构建.md) - [Install an Image on an EMMC](documents/刷写EMMC镜像.md) - [Build images sequentially](documents/顺序构建.md) - [Compile the kernel of Firefly-RK3399 based on the Firefly SDK](documents/基于Firefly-SDK编译Firefly-RK3399的内核镜像.md) - [Packaging ITX-RK3588J Integrated Burn Write Image](documents/打包ITX-RK3588J一体化烧写镜像.md) - [scripts](./scripts/): Used to build openEuler Rockchip images - [One-time build images](scripts/build.sh) - [Build a boot Image](scripts/build_boot.sh) - [Build a rootfs Image](scripts/build_rootfs.sh) - [Compile u-boot](scripts/build_u-boot.sh) - [Generate a bootable image](scripts/gen_image.sh) ## How To Download the Latest Image Basic information of the image is as follows:

Version

System User (Password)

Release Date

Size

Kernel Version

Repository of rootfs

Image type

openEuler 20.03 LTS Firefly-RK3399
  • root (openeuler)

2021/12/20

288 MiB

4.19.90

openEuler 20.03 LTS repository

A compressed RAW original image

openEuler 20.03 LTS Firefly-RK3399
  • root (openeuler)

2021/12/20

493 MiB

4.19.90

openEuler 20.03 LTS repository

A compressed image for the EMMC

openEuler 20.03 LTS RockPi-4A
  • root (openeuler)

2021/12/20

295 MiB

4.19.90

openEuler 20.03 LTS repository

A compressed RAW original image

openEuler 21.09 Firefly-RK3399
  • root (openeuler)

2021/12/20

420 MiB

5.10.0

openEuler 21.09 repository

A compressed RAW original image

openEuler 21.09 Firefly-RK3399
  • root (openeuler)

2021/12/20

717 MiB

5.10.0

openEuler 21.09 repository

A compressed image for the EMMC

openEuler 21.09 RockPi-4A
  • root (openeuler)

2021/12/20

717 MiB

5.10.0

openEuler 21.09 repository

A compressed RAW original image

openEuler 22.03 Firefly ITX-3588J
  • root (openeuler)

2023/7/11

494 MiB

5.10.0

openEuler 22.03 repository

A compressed RAW original image

openEuler 22.03 Firefly ITX-3588J + XFCE
  • root (openeuler)

2023/7/11

1.9 GiB

5.10.0

openEuler 22.03 repository

A compressed RAW original image

## How to Build Images >![](documents/public_sys-resources/icon-notice.gif) **NOTICE:** >Five openEuler versions are currently supported for RK3399, i.e., 20.03 LTS, 20.03 LTS SP1, 20.03 LTS SP2, 20.03 LTS SP3, 21.09 and 22.03 LTS. >Only one openEuler versions are currently supported for RK3588, i.e., 22.03 LTS. >When building an image with Xfce/UKUI/DDE desktop environment, you need to pay attention to three issues: >1. For building an image with Xfce desktop environment, note that only openEuler 20.03 LTS SP2、20.03 LTS SP3, 21.09 and 22.03 LTS are currently supported. >2. For building an image with UKUI/DDE desktop environment, note that only openEuler 20.03 LTS SP1、20.03 LTS SP2、20.03 LTS SP3, 21.09 and 22.03 LTS are currently supported. >3. Need to set the parameter `-s/--spec`. Please refer to the description of this parameter for details. The corresponding -r/-repo parameter needs to be set at the same time. ### Prepare the Environment - OS: openEuler or CentOS 8 - Hardware: AArch64 hardware, Such as the RaspberryPi or RK3399/RK3588 development boards Refer to [Building an openEuler image](documents/openEuler镜像的构建.md) for details. ### Run the Scripts to Build Images Run the following command to build images: `sudo bash build.sh -n NAME -k KERNEL_URL -b KERNEL_BRANCH -c BOARD_CONFIG -r REPO_INFO -d DTB_NAME -s SPEC` **NOTE: You can directly execute "sudo bash build.sh" to build an openEuler 20.03 LTS image for Firefly-RK3399 with the script's default parameters.** After the script is executed, the following files will be generated in the build/YYYY-MM-DD folder of the directory where the script is located: - A compressed image for the EMMC: openEuler-VERSION-BOARD-RELEASE.tar.gz - A compressed RAW original image:openEuler-VERSION-BOARD-ARCH-RELEASE.img.xz >What is the difference between a compressed image for the EMMC and a compressed RAW original image? >1. A compressed image for the EMMC: It requires the use of RKDevTool or rkdeveloptool to flash it into development boards such as Firefly-RK3399, which come with EMMC storage media. >2. A compressed RAW original image: Usually refers to a complete disk image file that contains data from all disk sectors. It can be written to various storage media such as SD cards, EMMC, and others. >3. A development board with EMMC can also use an SD card to boot the image. But the storage medium selected for booting varies, If the EMMC boot priority is greater than the SD card, the system in the EMMC will be booted first. In this case, if you want to use the system in the SD card, you need to clear the EMMC first. 4. The EMMC flashing process is described in [Install an Image on an EMMC](#install-an-image-on-an-emmc), while the SD card flashing process is described in [Install an Image on an SD Card](#install-an-image-on-an-sd-card). The meaning of each parameter: 1. -n, --name IMAGE_NAME The image name to be built. For example, `openEuler-20.03-LTS-Firefly-RK3399-aarch64-alpha1` or `openEuler-21.09-Firefly-RK3399-aarch64-alpha1`. 2. -k, --kernel KERNEL_URL The URL of kernel source repository, which defaults to `https://gitee.com/openeuler/raspberrypi-kernel.git`. You can set the parameter as `git@gitee.com:openeuler/raspberrypi-kernel.git` or `git@gitee.com:openeuler/kernel.git` according to the requirement. 3. -b, --branch KERNEL_BRANCH The branch name of kernel source repository, which defaults to openEuler-20.03-LTS. According to the -k parameter, you have the following options: - -k https://gitee.com/openeuler/rockchip-kernel.git - openEuler-20.03-LTS - -k https://gitee.com/openeuler/kernel.git - openEuler-21.09 4. -c, --config BOARD_CONFIG The file name of the defconfig corresponding to the development board corresponds to the `BOARD_CONFIG` file under [u-boot/configs](https://github.com/u-boot/u-boot/tree/master/configs), which defaults to `firefly-rk3399_defconfig`. To use a precompiled u-boot on the RK3588, you can set this option to 'none'. 5. -r, --repo REPO_INFO The URL/path of target repo file, or the list of repositories' baseurls. Note that, the baseurls should be separated by space and enclosed in double quotes. Examples are as follows: - The URL of target repo file: `https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo`. - The path of target repo file: `./openEuler-20.03-LTS.repo`:for building openEuler 20.03 LTS image, refer to for details. - List of repo's baseurls: `http://repo.openeuler.org/openEuler-20.03-LTS/OS/aarch64/ http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/aarch64/`. 6. -d, --device-tree DTB_NAME The device name in the kernel device-tree whitch is a little different from the board name. It corresponds to the `DTB_NAME.dts` file under the [kernel/arch/arm64/boot/dts/rockchip](https://gitee.com/openeuler/kernel/tree/master/arch/arm64/boot/dts/rockchip) folder. The default is `rk3399-firefly`. 7. -s, --spec SPEC Specify the image version: - `headless`, image without desktop environments. - `xfce`, image with Xfce desktop environment and related software including CJK fonts and IME. - `ukui`, image with UKUI desktop environment and fundamental software without CJK fonts and IME. - `dde`, image with DDE desktop environment and fundamental software without CJK fonts and IME. - The file path of rpmlist, the file contains a list of the software to be installed in the image, refer to [rpmlist](./scripts/configs/rpmlist) for details. The default is `headless`. 8. -h, --help Displays help information. Applicable RK3399 development boards: The development boards that have been tested are as follows, and the other types of RK3399 development boards are to be tested. 1. Firefly-RK3399 The tested versions are as follows: - openEuler-20.03-LTS, run the following command: `sudo bash build.sh -n openEuler-20.03-LTS-Firefly-RK3399-aarch64-alpha1 -k https://gitee.com/openeuler/rockchip-kernel.git -b openEuler-20.03-LTS -c firefly-rk3399_defconfig -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo -d rk3399-firefly -s headless` - openEuler-22.03-LTS, run the following command: `sudo bash build.sh -n openEuler-22.03-LTS-Firefly-RK3399-aarch64-alpha1 -k https://gitee.com/openeuler/kernel.git -b openEuler-22.03-LTS -c firefly-rk3399_defconfig -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -d rk3399-firefly -s headless` 2. RockPi-4A The tested versions are as follows: - openEuler-20.03-LTS, run the following command: `sudo bash build.sh -n openEuler-20.03-LTS-RockPi-4A-aarch64-alpha1 -k https://gitee.com/openeuler/rockchip-kernel.git -b openEuler-20.03-LTS -c rock-pi-4-rk3399_defconfig -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-20.03-LTS/generic.repo -d rk3399-rock-pi-4a -s headless` - openEuler-22.03-LTS, run the following command: `sudo bash build.sh -n openEuler-22.03-LTS-RockPi-4A-aarch64-alpha1 -k https://gitee.com/openeuler/kernel.git -b openEuler-22.03-LTS -c rock-pi-4-rk3399_defconfig -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -d rk3399-rock-pi-4a -s headless` Applicable RK3588 development board: The development boards that have been tested are as follows, and the other types of RK3588 development boards are to be tested. 1. Firefly ITX-3588J The tested versions are as follows: - openEuler-22.03-LTS, run the following command: `sudo bash build.sh -n openEuler-22.03-RK3588-Firefly-ITX-3588J-aarch64-alpha1 -k https://gitee.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-RK3588 -c none -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -d rk3588-firefly-itx-3588j -s headless` 2. Firefly ROC-RK3588S-PC The tested versions are as follows: - openEuler-22.03-LTS, run the following command: `sudo bash build.sh -n openEuler-22.03-LTS-Station-M3-aarch64-alpha1 -k https://gitee.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-RK3588 -c none -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -d rk3588s-roc-pc -s headless` 3. Radxa Rock-5B The tested versions are as follows: - openEuler-22.03-LTS, run the following command: `sudo bash build.sh -n openEuler-22.03-LTS-Rock5B-aarch64-alpha1 -k https://gitee.com/openeuler/rockchip-kernel.git -b openEuler-22.03-LTS-RK3588 -c none -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-22.03-LTS/generic.repo -d rk3588-rock-5b -s headless` ## How to Use an Image ### Install an Image on an SD Card After decompressing the RAW original image, please refer to [Install openEuler on RaspberryPi](https://gitee.com/openeuler/raspberrypi/blob/master/documents/%E5%88%B7%E5%86%99%E9%95%9C%E5%83%8F.md) for details of writing an image on an SD card. You should use images provided in this project. >Note: Because Firefly-RK3399 is different from other Rockchip development boards, the system on EMMC will be booted first. The system on the EMMC needs to be cleared before using the system in the SD card to boot the Firefly-RK3399. Besides, you need to press the power button to boot after powering up the device. ### Install an Image on an EMMC Refer to [Install openEuler to the EMMC](documents/刷写EMMC镜像.md) for details about how to write compressed RAW original image to an EMMC.