| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| overlays | ||
| scripts | ||
| .gitignore | ||
| .gitlab-ci-base.yml | ||
| .gitlab-ci.yml | ||
| ci-image.yaml | ||
| download-artifacts.sh | ||
| download-kernel.sh | ||
| download-uboot.sh | ||
| image-rockchip.yaml | ||
| lava-test-dependencies-install.yaml | ||
| LICENSE | ||
| ospack-debian.yaml | ||
| README-rk3576-evb.md | ||
| README-rock4d.md | ||
| README-rock5b.md | ||
| README-sige5.md | ||
| README.md | ||
| recipe-gfx.yaml | ||
| recipe-weston.yaml | ||
debian-images-rk3576-rk3588
This is a soft-fork of Collabora's Debos debian-images-recipes repo. It can be used to build Debian images for Rockchip RK3588-based as well as RK3576-based boards.
Currently, only the ROCK 5 Model A & B (RK3588), Sige5 (RK3576) and Rock 4 Model D (RK3576) are supported by the images. (Not tested!)
These images can be flashed to an SD card or eMMC.
Prerequisites
Prebuilt images
This repository
Images with Collabora's (dev) kernel: Download an artifact produced by a Workflow in the Actions overview, filtered by main branch
Images with Debian's Linux kernel: Download an artifact produced by a Workflow in the Actions overview, filtered by the debian-kernel branch
Collabora
See the CI/CD pipelines to download prebuilt images for your target. Extract the archive somewhere.
RockUSB
It is recommended to use rockusb from the rockchiprs
Rust crate to flash the images to the board. It can be installed with:
$ cargo install rockusb --example rockusb --features=nusb
By default, the resulting rockusb binary will be placed in ~/.cargo/bin. It's
a good idea to add this directory to your $PATH if you haven't already.
rkdeveloptool
The official vendor tool alternative to RockUSB is rkdeveloptool,
which includes some features RockUSB lacks, but lacks others. It's recommended
to build it from source, as the ./tools/rkdeveloptool included in rkbin isn't
always up to date or fully functional.
udev rules
For both RockUSB and rkdeveloptool, some udev rules are required if rockusb or rkdeveloptool is to be run as a regular user, and not root.
The following can be saved to e.g. /etc/udev/rules.d/99-rockusb.rules in order
to let regular users access Rockchip devices connected over USB:
SUBSYSTEM!="usb", GOTO="end_rules"
# RK3036
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="301a", MODE="0666", GROUP="users"
# RK3128
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="310c", MODE="0666", GROUP="users"
# RK3229
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="320b", MODE="0666", GROUP="users"
# RK3288
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="320a", MODE="0666", GROUP="users"
# RK3328
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="320c", MODE="0666", GROUP="users"
# RK3368
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="330a", MODE="0666", GROUP="users"
# RK3399
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="330c", MODE="0666", GROUP="users"
# RK3566
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="350a", MODE="0666", GROUP="users"
# RK3576
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="350e", MODE="0666", GROUP="users"
# RK3588
ATTRS{idVendor}=="2207", ATTRS{idProduct}=="350b", MODE="0666", GROUP="users"
LABEL="end_rules"
Afterwards, udevadm control --reload should be run as root to reload the
rules, and if the device has already been plugged in, either replugging it or
running udevadm trigger will ensure the new rules are in effect.
Board-specific installation instructions
Please refer to the following documents for instructions on how to install these images onto the supported boards:
Using the images
The default username is user, with the password user.
The root partition and filesystem is resized on first boot to take up all remaining space on the medium the image has been installed to.
An sshd runs on the default port of 22. The serial console is accessible at 1.5Mbauds (1500000 baud). The board will announce itself over mDNS, so
$ ssh user@debian-rockchip-rock5b-rk3588.local
will work if your system has mDNS resolution enabled.
Building the images
System requirements
On a Debian (bookworm preferred) system, install debos:
$ sudo apt install debos
Locally build images
The first stage is to build a generic (but architecture-specific) ospack, then assemble the ospack into multiple hardware-specific images.
Linux kernel and u-boot binaries for your specific platform needs to be copied
into the prebuilt directory. See the corresponding download-artifacts.sh
file for the directory layout.
$ mkdir out
$ debos --artifactdir=out -t architecture:arm64 ospack-debian.yaml
$ ./download-artifacts.sh rock5b-rk3588
$ debos --artifactdir=out -t architecture:arm64 -t platform:rock5b-rk3588 image-rockchip.yaml
$ ./download-artifacts.sh sige5-rk3576
$ debos --artifactdir=out -t architecture:arm64 -t platform:sige5-rk3576 image-rockchip.yaml
$ ./download-artifacts.sh rock-4d-rk3576
$ debos --artifactdir=out -t architecture:arm64 -t platform:rock-4d-rk3576 image-rockchip.yaml
Customization
In case you want to use the recipes at hand as basis for your project, there are several means to customize them. Feel free to fork this repository and apply your changes on top.
CI configuration
The default CI configuration .gitlab-ci.yml generates images for several
boards.
If you want to change this, you can add a custom .gitlab-ci-myproject.yml
and configure your GitLab project accordingly (Settings > CI/CD >
General Pipelines > CI/CD configuration file).
The file .gitlab-ci-base.yml and the definitions therein serves as common
include.
Install custom prebuilt Linux kernel and/or U-Boot
By default, the job template in .gitlab-ci-base.yaml downloads artifacts from
Collaboras Hardware Enablement repositories for Linux and U-Boot, respectively.
If desired, a different Linux kernel and/or U-Boot can be downloaded by
overwriting the before_script steps and using the helper scripts
download-{kernel,uboot}.sh.
Run custom recipe
In order to allow for completely flexible customization, a recipe name can be
passed to ospacks and images.
For example, passing the variable custom:cake to the ospack results in the
recipe recipe-cake.yaml being executed.
Similarly, passing the variable custom:muffin to the image-rockchip.yaml
results in the recipe image-muffin.yaml being executed.
Predefined recipes (software collections)
There are several predefined recipes available that can be activated by setting
the corresponding variable.
For example, passing the variable gfx:true results in the recipe
recipe-gfx.yaml being executed.