lvgl/lv_port_linux — 477★ trên GitHub (C). LVGL configured to work on Linux (Wayland, DRM, EGL, OpenGL, fbdev, X11 etc)
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is an example project that shows how to run LVGL
on GNU/Linux and other Unix-like systems. It builds a small simulator
application, lvglsim, that opens a window (or drives a display directly) and
runs LVGL's demos. It can also be used as a starting point to cross-compile LVGL to
an embedded linux board.
LVGL ships drivers for the whole Linux graphics stack, and this port can build
against any of them:
Backend
Description
LV_USE_SDL
SDL2 (default) — a desktop window
LV_USE_WAYLAND
Wayland
LV_USE_X11
X11
LV_USE_GLFW
GLFW3 (OpenGL)
LV_USE_LINUX_DRM
DRM/KMS (/dev/dri/*)
LV_USE_LINUX_FBDEV
Legacy framebuffer (/dev/fb*)
Configuration is driven by Kconfig, the same system used by the Linux
kernel, so you can pick drivers, features and demos from a menu instead of
editing a header by hand.
Get started
Prerequisites
CMake, Python 3, and python3-venv are required to build LVGL from source.
Ninja is optional but recommended to speed-up building.
If you only want to build this port against an LVGL that is already
installed on the system, none of the Python tooling is needed. See
Building against an installed LVGL.
Install the system packages with your distribution's package manager, then
install the Python tools in a virtual environment (recommended so they don't
pollute your system Python):
No submodule and no Python tools are needed in this mode, since LVGL itself is
not built. If the installed LVGL is not in a location CMake searches by default,
point it there:
Kconfig plays no part here: .config and the defconfigs are ignored, and the
enabled feature set comes from the installed lv_conf.h instead.
Because the CONFIG_LV_* options are not available, anything normally selected
through Kconfig has to be passed on the command line. For the 3D truck demo:
Note that this requires an LVGL built with LV_USE_GLTF enabled
Configuring LVGL
Configuration lives in a .config file at the repository root. When it exists,
the build uses it; otherwise it falls back to configs/get_started.defconfig.
The Kconfig tools (defconfig, menuconfig) come from kconfiglib and must be
run from the repository root, where the top-level Kconfig lives.
Start from a defconfig
Generate a .config from a defconfig:
defconfig configs/get_started.defconfig
Besides the port's own get_started.defconfig, LVGL ships several ready-made
defconfigs in lvgl/configs/defconfigs/.
Once you have a .config, open the interactive menu to enable/disable drivers,
features, fonts and demos:
menuconfig
Save and exit, then rebuild:
cmake -B build
cmake --build build -j$(nproc)
Backends
This port supports these Linux display and input backend that LVGL provides.
A backend is compiled in when its CONFIG_LV_USE_* option is enabled (through
Kconfig, as above). The glue code for each one lives in:
You can install the built LVGL library and headers to your system:
cmake --install ./build
Boards
The boards/ directory contains hardware-specific documentation and
configuration files for running LVGL on officially supported embedded Linux development
boards. Currently supported boards:
LV_SIM_WINDOW_WIDTH — width of the window (default 800).
LV_SIM_WINDOW_HEIGHT — height of the window (default 480).
Legacy framebuffer (fbdev)
LV_LINUX_FBDEV_DEVICE — override the default (/dev/fb0) framebuffer device node.
EVDEV touchscreen / mouse pointer device
LV_LINUX_EVDEV_POINTER_DEVICE — the path of the input device, e.g.
/dev/input/by-id/my-mouse-or-touchscreen. If not set, devices are
discovered and added automatically.
DRM/KMS
LV_LINUX_DRM_CARD — override the default (/dev/dri/card0) card.
Permissions
Some devices require special permissions. We recommend adding your user to the appropriate group to avoid running the application with sudo.
Access requirements depend on which drivers you choose to use:
video group: Grants access to the framebuffer (/dev/fb0) if using fbdev.
input group: Grants access to event devices (/dev/input/*) if using evdev.
If you are using either driver, add your user to the corresponding group(s):
# Add your user to the relevant group(s)
sudo adduser $USER video
sudo adduser $USER input
# Apply group changes to the current terminal session
newgrp video
./build/bin/lvglsim
Note: If your display/input setup does not rely on fbdev or evdev (for example, if you are using SDL, X11, or Wayland), you can safely skip these group permission steps.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/lvgl/lv_port_linux là nguồn chính thức.
lvgl/lv_port_linux có bao nhiêu sao?
lvgl/lv_port_linux có 477 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/lvgl/lv_port_linux. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
lvgl/lv_port_linux có những chủ đề gì?
GitHub topics của lvgl/lv_port_linux: "drm", "framebuffer", "linux", "lvgl", "opengl", "wayland", "yocto". TopGit xếp repo vào nhóm mã nguồn mở.
lvgl/lv_port_linux có phải mã nguồn mở không?
Có — lvgl/lv_port_linux phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/lvgl/lv_port_linux.
lvgl/lv_port_linux có trang demo không?
Dự án có trang chủ ở https://docs.lvgl.io/master/integration/embedded_linux/index.html. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
lvgl/lv_port_linux còn đang phát triển không?
Commit gần nhất trên lvgl/lv_port_linux là 6 ngày trước (theo timestamp GitHub). Repo có 265 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về lv_port_linux?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về lv_port_linux.