Taishan School – LVGL Porting on RK3566, Resolving Buildroot System Errors

Recently, I have been compiling the rk3566 Buildroot system, while preparing to run LVGL on the Buildroot system, aiming to create an application similar to a Qt interface that automatically runs on startup to observe the overall effect. This is what I have been working on lately.

Taishan School - LVGL Porting on RK3566, Resolving Buildroot System Errors

Previously, my system was an Android system, so to switch from the Android system to the Buildroot system, the first step is to download the Linux SDK package. Here, Jialichuang provides two methods: one is a compressed package, and the other is to pull via repo. I generally prefer using the compressed package, so I will use this compressed package as an example.

Taishan School - LVGL Porting on RK3566, Resolving Buildroot System Errors

First, you need to download two things: the first is the SDK package, and the second is the Buildroot dl files. Additionally, you need to download the corresponding checksum file, and after downloading, use the md5 tool to verify if there were any errors during the download process.

Taishan School - LVGL Porting on RK3566, Resolving Buildroot System Errors

The effect is as follows:

After downloading, the next step is to compile. We will only discuss the areas where errors occurred. First, when it compiles to Buildroot, it will report a compilation error due to a duplicate definition.

Taishan School - LVGL Porting on RK3566, Resolving Buildroot System Errors

Solution:

Copy the following content into buildroot/package/squashfs/0001-multiple-definition.patch

diff -ruN squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/squashfs-tools/mksquashfs.h squashfs-3de1687d7432ea9b302c2db9521996f506c140a3-patch/squashfs-tools/mksquashfs.h--- squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/squashfs-tools/mksquashfs.h       2015-12-07 09:42:03.000000000 +0800+++ squashfs-3de1687d7432ea9b302c2db9521996f506c140a3-patch/squashfs-tools/mksquashfs.h 2025-01-02 16:59:52.994326895 +0800@@ -133,7 +133,7 @@ #define BLOCK_OFFSET 2 extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;-struct cache *bwriter_buffer, *fwriter_buffer;+extern struct cache *bwriter_buffer, *fwriter_buffer; extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,        *to_frag, *locked_fragment, *to_process_frag; extern struct append_file **file_mapping;

Next, clear the compilation cache and recompile:

rm -rf buildroot/output/rockchip_rk3566/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/

./build.sh all

After performing these operations, the error issue should be resolved.

I also encountered a recover error, which was resolved by cleaning and recompiling. I believe some configurations were not set correctly, but I have not pinpointed the exact location. In any case, after the modifications, there were no issues.

Then, it’s time to flash and boot up.

Taishan School - LVGL Porting on RK3566, Resolving Buildroot System Errors

The overall startup effect is as follows, without any issues. Tomorrow, I will start porting LVGL, and everyone is welcome to like and share.

Taishan School - LVGL Porting on RK3566, Resolving Buildroot System Errors

Leave a Comment