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_ Do not download the SDK to the board when using it on a 64 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)
Compiling Android requires high machine configuration:
Download the source code compression package from the following Baidu Netdisk.
Decompression source code steps:
# v2
cat R1_Android13_SourceV3.tar.gz* | tar -zxvf -
.repo/repo/repo sync -l
# v3
mkdir r1_sdk
cat r1_android13_release_v3.0_20241002_sdk.tar.gz* | tar -zxvf - -C r1_sdk
cd r1_sdk
.repo/repo/repo sync -l
mkdir -p out/target/product/rk3588s_t/
mv obj* out/target/product/rk3588s_t/
Before compiling the source code, a series of environment dependencies need to be installed.
sudo apt-get update
sudo apt-get install git gnupg flex bison gperf libsdl1.2-dev \
libesd-java libwxgtk3.0-dev squashfs-tools build-essential zip curl \
libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \
xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev \
lib32readline-dev gcc-multilib libswitch-perl libssl-dev unzip zip device-tree-compiler \
liblz4-tool python-pyelftools python3-pyelftools -y
Full compilation is the process of merging a series of partition firmware, such as uboot and boot partition firmware, into a complete firmware. Burning a complete firmware is simpler than burning a partition.
source build/envsetup.sh
lunch R1-userdebug
./build.sh -UKAu
Partition compilation is the process of compiling the source code of each partition separately into partition firmware. The volume of partition firmware is much smaller than that of complete firmware. In driver debugging, the corresponding partition firmware is burned separately without burning other partitions. Greatly improve the speed of firmware burning and debugging.
source build/envsetup.sh
lunch R1-userdebug
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
Android
source build/envsetup.sh
lunch youyeetooR1-userdebug
make installclean
make -j8
./mkimage.sh
./build.sh -u
Before compiling the source code, a series of environment dependencies need to be installed.
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
Full compilation is the process of merging a series of partition firmware, such as uboot and boot partition firmware, into a complete firmware. Burning a complete firmware is simpler than burning a partition.
./docker/docker-rm.sh
./docker/docker-start.sh
source build/envsetup.sh
lunch R1-userdebug
./build.sh -UKAu
Partition compilation is the process of compiling the source code of each partition separately into partition firmware. The volume of partition firmware is much smaller than that of complete firmware. In driver debugging, the corresponding partition firmware is burned separately without burning other partitions. Greatly improve the speed of firmware burning and debugging.
./docker/docker-rm.sh
./docker/docker-start.sh
uboot
cd u-boot
./make.sh rk3588
kernel
cd kernel
make ARCH=arm64 CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- rockchip_linux_defconfig rk3588_linux.config
make ARCH=arm64 CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- rk3588s-yyt.img
Android
source build/envsetup.sh
lunch youyeetooR1-userdebug
make installclean
make -j8
./mkimage.sh
./build.sh -u