Overview
The Buildroot route compiles Qt5 as part of the root filesystem, producing a minimal Linux image that includes the Qt runtime libraries:
- Lightweight: No desktop environment; all system resources are reserved for the application
- Full-screen eglfs: Qt applications drive the display directly via KMS/DRM, bypassing X11/Wayland
- Integrated: Qt libraries, toolchain, and kernel image are managed within the same build system, ensuring version consistency
SDK path: /home/lckfb/TaishanPi-3-Linux Qt version: 5.15.11 (defined by buildroot/package/qt5/qt5.mk)
Prerequisites
- Dependency installation completed per Environment Setup
- Host meets minimum build requirements: 8-core CPU, 16 GB RAM, 150 GB available storage
Enabling Qt5 in Buildroot
Entering menuconfig
# Enter the SDK root directory
cd /home/lckfb/TaishanPi-3-Linux
# Interactive selection (recommended)
./build.sh lunch
# Select tspi_3m_rk3576_buildroot_defconfig
# Directly open menuconfig
./build.sh bconfig2
3
4
5
6
7
8
9
bconfigopens the Buildroot menuconfig interface. After saving, it automatically updates the default configuration file (buildroot/configs/rockchip_rk3576_defconfig).
Key Configuration Items
For the complete module list, refer to Buildroot Qt5 Module Configuration Reference
In menuconfig, navigate to: Target packages → Graphic libraries and applications (graphic/text) → Qt5
| Configuration Item | Description | Required |
|---|---|---|
BR2_PACKAGE_QT5 | Qt5 master switch | Required |
BR2_PACKAGE_QT5BASE | Qt5 core libraries (QtCore/Network/Gui, etc.) | Required |
BR2_PACKAGE_QT5BASE_FONTCONFIG | Fontconfig font management | Required |
BR2_PACKAGE_QT5BASE_GUI | GUI module | Required |
BR2_PACKAGE_QT5BASE_WIDGETS | Widgets module | Required |
BR2_PACKAGE_QT5BASE_OPENGL | OpenGL support | Required |
BR2_PACKAGE_QT5BASE_EGLFS | eglfs backend (required for full-screen apps) | Required |
BR2_PACKAGE_QT5BASE_DEFAULT_QPA | Set to eglfs | Required |
BR2_PACKAGE_NFS_UTILS | NFS utilities | Optional |
BR2_PACKAGE_QT5BASE_LINUXFB | linuxfb backend (fallback, usable without GPU) | Optional |
BR2_PACKAGE_QT5DECLARATIVE | QML support | As needed |
BR2_PACKAGE_QT5QUICKCONTROLS2 | Quick Controls 2 | As needed |
BR2_PACKAGE_QT5SVG | SVG support | As needed |
BR2_PACKAGE_QT5MULTIMEDIA | Multimedia support | As needed |
It is recommended to also enable the NFS client
The subsequent Communication Channels Configuration recommends using NFS for development iteration. To avoid having to recompile later, it is recommended to enable it at this stage:
Target packages → Networking applications → nfs-utils (check BR2_PACKAGE_NFS_UTILS)
The eglfs_kms backend depends on the Mali GPU driver. Ensure the following is also enabled:
Target packages → Hardware handling → Firmware → rockchip-mali
→ BR2_PACKAGE_ROCKCHIP_MALI=y2
Compiling Qt5
Full Build (Recommended for First Use)
cd /home/lckfb/TaishanPi-3-Linux
./build.sh all2
Building Qt5 Package Individually
# First-time Qt5 build
./build.sh bmake:qt5base
# Force rebuild (use after modifying configuration)
./build.sh bmake:qt5base-rebuild2
3
4
5
Build Output
After compilation, build artifacts are located under buildroot/output/rockchip_rk3576/:
| Path | Contents |
|---|---|
host/bin/qmake | qmake for cross-compilation |
host/bin/ | Qt host tools (moc, rcc, uic, etc.) and Buildroot cross-compiler |
host/share/buildroot/toolchainfile.cmake | Buildroot auto-generated CMake toolchain file |
staging/usr/include/qt5/ | Qt5 header files |
staging/usr/lib/libQt5*.so | Qt5 shared libraries (for linking) |
staging/usr/lib/cmake/ | Qt5 CMake configuration files |
target/usr/lib/libQt5*.so | Qt5 runtime libraries deployed to the board |
staging/is a symlink tohost/aarch64-buildroot-linux-gnu/sysroot/, which is the cross-compiler's sysroot directory. The contents oftarget/are packaged into the root filesystem image.
You must re-flash after compilation
If the board is currently running an image that does not include Qt runtime libraries, you must flash the newly compiled image to the development board. Skipping this step will cause Qt programs to fail to start due to missing runtime libraries. See System Flashing for flashing instructions.
Next Step
After compilation is complete, flash the new image to the development board (see System Flashing), then configure the Communication Channels.