Skip to main content

Compile Debian firmware

This chapter introduces the compilation process of Debian firmware. It is recommended to develop under Ubuntu 18.04 system environment. If you use other system versions, you may need to adjust the compilation environment accordingly.

The compilation portion of this tutorial works with SDK versions above v1.0.6e

$ readlink -f .repo/manifest.xml
/home/daijh/p/rk3588/.repo/manifests/rk3588/rk3588_linux_release_20230301_v1.0.6e.xml

Preparatory work​

Set up compilation environment​

sudo apt-get install repo git ssh make gcc libssl-dev liblz4-tool \
expect g++ patchelf chrpath gawk texinfo chrpath diffstat binfmt-support \
qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib \
unzip \
device-tree-compiler ncurses-dev \

### Compile SDK

#### Precompile Configuration

There are configuration files for different board in `device/rockchip/rk3588/`, select the configuration file:

```bash
./build.sh aio-3588q-debian.mk

Build​

Automatic compilation​

7z x debian_rk3588_rootfs_xxx.7z
mkdir debian
mv debianxx-rootfs.img debian/debian-rootfs.img
  • start compiling
./build.sh

the firmware will be saved to the directory rockdev/pack/.

Partial compilation​

  • u-boot
./build.sh uboot
  • kernel
./build.sh extboot
  • recovery
./build.sh recovery
7z x debian_rk3588_rootfs_xxx.7z
mkdir debian
mv debianxx-rootfs.img debian/rootfs.img
  • Update each part of the .img link to the directory rockdev/:
./mkfirmware.sh
  • Pack the firmware, the firmware will be saved to the directory rockdev/pack/.
./build.sh updateimg