Here are two compilation schemes available. If you want to compile directly, choose Scheme 1. If you want to compile with Docker, choose Scheme 2.
Precautions:
1. The SDK adopts cross compilation, so it needs to be compiled in X86_64 bi Do not download the SDK to the board when using it on at computer
2. Please use Ubuntu 20.04 (real machine or Docker container) for the compilation environment. Using other versions may cause compilation errors
3. Do not store or extract SDKs in virtual machine shared folders or non English directories
4. Please use regular users throughout the process of obtaining and compiling the SDK, and root privileges are not allowed or required (unless APT installation software is required)
Download the source code from the link below and place it on an x86 Ubuntu host or virtual machine.
mkdir R1_Debian
cat r1_linux_release_v2.0_v3.0_20240928_sdk.tar.gz* | tar -zxvf - -C R1_Debian
cd R1_Debian
.repo/repo/repo sync -l
cd ..
tar -zxvf dl.tar.gz -C R1_Debian/buildroot/
Dependencies required for installing source code compilation
sudo apt update
sudo apt-get install 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 python \
device-tree-compiler ncurses-dev \
./build.sh BoardConfig-R1-Debian.mk
./build.sh
The complete firmware size obtained through complete compilation is over 3G. Burning complete firmware takes a lot of time, which is not conducive to debugging drivers and other programs. Step by step compilation is provided here, which requires
uboot
cd u-boot
./make.sh rk3588
kernel
cd kernel
make CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rockchip_linux_defconfig rk3588_linux.config
make CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rk3588s-yyt.img
recovery
./build.sh recovery
./build.sh firmware
./build.sh updateimg
the firmware will be saved to the directory rockdev
Dependencies required for installing source code compilation
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot
sudo systemctl status docker
./docker/docker-rm.sh
./docker/docker-start.sh
./build.sh BoardConfig-R1-Debian.mk
./build.sh
./docker/docker-rm.sh
./docker/docker-start.sh
uboot
cd u-boot
./make.sh rk3588
kernel
cd kernel
make CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rockchip_linux_defconfig rk3588_linux.config
make CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rk3588s-yyt.img
recovery
./build.sh recovery
./build.sh firmware
./build.sh updateimg
the firmware will be saved to the directory rockdev