youyeetoo tech team release: YY3568 Debian 11 + RT-Thread Hybrid Kernel Deployment Solution.
Solution: 3 cores (Linux or Debian) + 1 core (RT-Thread)
The YY3568 motherboard is based on the Rockchip RK3568 chip platform, featuring a quad-core 64-bit Cortex-A55 processor with a maximum frequency of up to 2GHz. It integrates a dual-core GPU architecture and high-performance NPU, exhibiting outstanding chip performance. The development board offers rich functional interfaces and robust multimedia capabilities, making it uniquely advantageous in fields such as IoT, industrial control, intelligent transportation, and lightweight AI.
YY3568 More detail:https://www.youyeetoo.com/products/yy3568-rk3568-single-board-computer
Quick Start:https://wiki.youyeetoo.com/YY3568
1. AMP Project, Download Link: http://dd.youyeetoo.cn:5000/sharing/HhtpwagEr
2. Click the "Download" button to initiate the download.
3. Move the downloaded firmware to Ubuntu.
Compile and build
Set up the compilation environment
sudo apt-get update
sudo apt-get install scons 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
Extract the project archive
Decompress the project archive:
- Navigate to the project directory
2. Full compilation
Compilation process, select youyeetoo_yy3568_emmc_defconfig.
Compilation completed successfully.
Firmware generation directory: you_project/output/firmware
Resource protection
In Linux/Debian + RT-Thread AMP mode, there may be resource contention between different systems. Therefore, it's advisable to protect certain peripherals, clocks, and other resources used in RT-Thread by defining them in the rk3568-amp.dtsi file. This helps prevent conflicts with resources on the Linux/Debian side.
CPU partitioning
CPU partitioning refers to the allocation of processing resources in a system.
In the context of RK3568, which comprises four 64-bit Cortex-A55 cores, the AMP (Asymmetric Multiprocessing) scheme of YY3568 involves three cores running Linux or Debian and one core running RT-Thread. Therefore, it's necessary to impose constraints accordingly.
Constraint Method: Modify the kernel device tree on the Linux or Debian side: rk3568-amp.dtsi. Modify as follows:
Memory partitioning
Constraint Method: Modify the kernel device tree on the Linux or Debian side: rk3568-amp.dtsi. Make the following modifications:
Bus arbitration
Using the serial port as an example, in Linux/Debian, serial port 2 is utilized as the debugging serial port, while in RT-Thread, serial port 4 is designated as the debugging serial port.
Constraint Method for Serial Port Bus Arbitration: Modify the kernel device tree on the Linux or Debian side: rk3568-amp.dtsi. Make the following modifications:
Hardware preparation:
YY3568 Dev Kit x1
USB A to A Cable x1
UART Debug Module x2
Preparation tools:
Rockchip USB Driver
Flash tool
Tools Download Link:https://wiki.youyeetoo.com/en/YY3568/unpack
2. USB driver installation
Flash tool installation
Run the flashing tool
Firmware flashing
Import firmware
Select the firmware you compiled.
Enter loader mode
1. Loader mode: In Loader mode, the bootloader enters upgrade status, waiting for host commands, used for firmware upgrades, etc. To enter Loader mode, the bootloader must detect the RECOVERY key pressed during startup and USB connected.
2. Enter loader mode:
First, disconnect the power adapter.
Connect one end of the dual-port USB Type-A data cable to the host and the other end to the development board, making sure to connect to the illustrated interface.
Press and hold the RECOVERY key on the device and keep it pressed.
Connect the power supply. After approximately 2-3 seconds, release the RECOVERY key. The flashing tool will prompt: "LOADER device detected." Click the "Upgrade" button.
Flashing completed.
Run the demo
The board needs to be connected to two serial ports: Linux system (serial port 2), RT-Thread (serial port 4).
Tips:The baud rate of the debug serial ports for both kernels: 1500000.
Execution result:
Comments