Two compilation schemes are provided here. If you want to compile directly, choose scheme 1. If you want to compile with docker, choose scheme 2.
Notes:
1. SDK uses cross-compilation, so use SDK on X86_64 computer, do not download SDK to the board.
2. Please use Ubuntu20.04 (real machine or docker container) as the compilation environment. If you use other versions, compilation errors may occur.
3. Do not store or decompress SDK in virtual machine shared folders or non-English directories.
4. Please use ordinary users throughout the process of obtaining and compiling SDK. Root permissions are not allowed or required (unless apt is required to install software)
Preparations, optional configuration according to your own situation
Download the source code from the link below and put it in the 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/
Install dependencies required for 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 python2 unzip device-tree-compiler ncurses-dev
./build.sh BoardConfig-R1-Ubuntu.mk
./build.sh
The size of the complete firmware obtained by full compilation is more than 3G. Burning the complete firmware takes a long time, which is not conducive to debugging drivers and other programs. Here is a step-by-step compilation, which requires
uboot
cd u-boot
./make.sh rk3588
kernel
separatelycd 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
separately./build.sh recovery
./build.sh firmware
./build.sh updateimg
Install dependencies required for 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-Ubuntu.mk
./build.sh
./docker/docker-rm.sh
./docker/docker-start.sh
uboot
separatelycd u-boot
./make.sh rk3588
kernel
separatelycd 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
separately./build.sh recovery
./build.sh firmware
./build.sh updateimg