# LubanCat1 安装 Weston 系统:Ubuntu 22.04 ```bash apt install libcolord-dev liblcms2-dev libva-dev libinput-dev libdrm-dev libpango1.0-dev libpam0g-dev libgbm-dev freerdp2-dev libxkbcommon-dev libpixman-1-dev libcairo2-dev libjpeg-dev libwebp-dev libsystemd-dev libdbus-1-dev libseat-dev libx11-xcb-dev libxcb-xkb-dev libxcb-composite0-dev libgstreamer-plugins-base1.0-dev libxml2-dev libxcursor-dev apt install meson cmake git graphviz doxygen xsltproc xmlto pkg-config apt install libasound2 libasound2-data libasound2-dev libasound2-plugin-equal libasound2-plugins libasound2-plugins-extra alsaplayer-alsa alsa-tools alsa-topology-conf alsa-utils alsa-firmware-loaders alsa-base gstreamer1.0-libav gstreamer1.0-qt5 gstreamer1.0-alsa sudo dpkg -i gstreamer1.0-rockchip1_1.14-4_arm64.deb # apt install libegl-dev libgegl-common libpam0g libgles2 libpipewire-0.2-dev ``` 其中 [gstreamer1.0-rockchip1_1.14-4_arm64.deb](../LubanCat2/img/LubanCat2_Linux_Lite_配置/gstreamer1.0-rockchip1_1.14-4_arm64.deb) 在 \/ubuntu/packages/arm64/gst-rkmpp/ 目录下获得。 /etc/environment: ```bash XDG_RUNTIME_DIR="/run/user/0" DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/0/bus" RUNLEVEL=3 WESTON_DISABLE_ATOMIC=1 WESTON_DRM_MIRROR=1 WESTON_DRM_KEEP_RATIO=1 WESTON_FREEZE_DISPLAY=/tmp/.freeze_weston WAYLAND_DISPLAY=wayland-0 PREFERED_VIDEOSINK=waylandsink QT_QPA_PLATFORM=wayland QT_GSTREAMER_WINDOW_VIDEOSINK=waylandsink QT_GSTREAMER_WIDGET_VIDEOSINK=waylandsink QT_GSTREAMER_PLAYBIN=playbin3 GST_VIDEO_CONVERT_PREFERRED_FORMAT=NV12:NV16:I420:YUY2 GST_VIDEO_FLIP_USE_RGA=1 GST_VIDEO_CONVERT_USE_RGA=1 PIXMAN_USE_RGA=1 QT_OPENGL=desktop ``` /etc/xdg/weston/weston.ini.d/pixman.ini ```ini [core] use-pixman=true ``` /etc/xdg/weston/weston.ini ```ini [core] xwayland=false backend=drm-backend.so idle-time=0 [keyboard] keymap_layout=us [output] name=HDMI-A-1 mode=2560x1080 [shell] locking=false panel-color=0x88882244 panel-position=bottom panel-scale=2 background-color=0x88882244 [launcher] icon=/usr/share/icons/locolor/32x32/apps/gvim.png path=/usr/bin/weston-terminal #[autolaunch] #path=/usr/bin/weston-terminal ``` ```bash git clone https://gitlab.freedesktop.org/wayland/wayland.git git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git git clone https://gitlab.freedesktop.org/wayland/weston.git # opengl 源码从 buildroot 中拷贝 ``` wayland: ```bash git checkout 1.21.0 meson build/ --prefix=/usr sudo ninja -C build/ install ``` wayland-protocols: ```bash git checkout 1.24 meson build/ --prefix=/usr sudo ninja -C build/ install ``` opengl: ```bash meson build/ --prefix=/usr -Dwith-overlay=true -Dopencl-icd=false -Dkhr-header=true -Dplatform=wayland -Dgpu=bifrost-g52 -Dversion=g2p0 sudo ninja -C build/ install ``` weston: ```bash git checkout 10.0.2 # meson build/ --prefix=/usr -Dpipewire=false meson build/ --prefix=/usr -Dpipewire=false -Ddeprecated-wl-shell=true -Dcolor-management-colord=false -Ddoc=false -Dremoting=false -Dtools=calibrator,debug,info,terminal,touch-calibrator -Dlauncher-logind=true -Dimage-jpeg=true -Dimage-webp=true -Ddeprecated-weston-launch=true -Drenderer-gl=true -Dbackend-rdp=true -Dbackend-drm=true -Dbackend-headless=true -Dbackend-wayland=true -Dbackend-drm-screencast-vaapi=true -Dcolor-management-lcms=true -Dsystemd=true -Dtest-junit-xml=true -Dshell-desktop=true -Dshell-fullscreen=true -Dshell-ivi=true -Dsimple-clients=all sudo ninja -C build/ install ``` 启动 weston,root 账户下执行: ```bash weston --tty=2 ``` systemd service(/usr/lib/systemd/system/weston.service)如下: ```service [Unit] Description=Weston # After=syslog.target # After=network.target # After=multi-user.target # After=graphical.target After=plymouth-quit-wait.service # After=systemd-logind.service [Service] RestartSec=2s Type=simple User=root Group=root ExecStart=weston-launch --tty=/dev/tty2 --user=root Restart=always [Install] WantedBy=multi-user.target ``` ```bash [root:lubancat] qt-everywhere-src-5.15.2# ./configure -release -opensource -eglfs -pkg-config -qt-libjpeg -qt-libpng -egl + cd qtbase + /root/qt-everywhere-src-5.15.2/qtbase/configure -top-level -release -opensource -eglfs -pkg-config -qt-libjpeg -qt-libpng -egl Creating qmake... ..... ....................................................Done. Info: creating super cache file /root/qt-everywhere-src-5.15.2/.qmake.super Info: creating cache file /root/qt-everywhere-src-5.15.2/.qmake.cache Info: creating stash file /root/qt-everywhere-src-5.15.2/.qmake.stash This is the Qt Open Source Edition. You are licensed to use this software under the terms of the GNU Lesser General Public License (LGPL) version 3 or the GNU General Public License (GPL) version 2. Type 'L' to view the GNU Lesser General Public License version 3 (LGPLv3). Type 'G' to view the GNU General Public License version 2 (GPLv2). Type 'y' to accept this license offer. Type 'n' to decline this license offer. Do you accept the terms of either license? y Running configuration tests... Checking for machine tuple... yes Checking for valid makespec... yes Checking for target architecture... arm64 Checking for alloca() in alloca.h... yes Checking for C++14 support... yes Checking for C++17 support... yes Checking for C99 support... yes Checking for C11 support... yes Checking for pkg-config... yes Checking for D-Bus >= 1.2... yes Checking for dlopen()... yes Checking for new dtags support... yes Checking for D-Bus >= 1.2 (host)... yes Checking for Support for Intel Control-flow Enforcement Technology... no Checking for udev... yes Checking for POSIX fallocate()... yes Checking for precompiled header support... yes Checking for RDRAND instruction... no Checking for RDSEED instruction... no Checking for symbol visibility support... yes Checking for -Bsymbolic-functions support... no Checking for Signaling NaN for doubles... yes Checking for STL compatibility... yes Checking for zlib... yes Checking for Zstandard... no Checking for clock_gettime()... yes Checking for POSIX monotonic clock... yes Checking for C++11 ... yes Checking for eventfd... yes Checking for futimens()... yes Checking for getauxval()... yes Checking for getentropy()... yes Checking for GLib... yes Checking for GNU libc... yes Checking for POSIX iconv... yes Checking for ICU... yes Checking for inotify... yes Checking for SysV IPC... yes Checking for linkat()... yes Checking for ppoll()... yes Checking for PCRE2... yes Checking for renameat2()... yes Checking for slog2... no Checking for statx() in libc... yes Checking for 64 bit atomics... yes Checking for DoubleConversion... no Checking for O_CLOEXEC... yes Checking for C++11 ... yes Checking for working std::atomic for function pointers... yes Checking for OpenSSL Headers... yes Checking for DTLS support in OpenSSL... yes Checking for getifaddrs()... yes Checking for KRB5 GSSAPI Support... no Checking for IPv6 ifname... yes Checking for Linux AF_NETLINK sockets... yes Checking for OCSP stapling support in OpenSSL... yes Checking for XCB >= 1.11... yes Checking for XCB ICCCM >= 0.3.9... no Checking for Desktop OpenGL... yes Checking for KMS... yes Checking for DRM Atomic API... yes Checking for EGL... yes Checking for XLib... yes Checking for EGL on X11... no Checking for EGLDevice... yes Checking for GBM... yes Checking for Mali EGL... no Checking for Mali 2 EGL... no Checking for i.Mx6 EGL... no Checking for XCB Xlib... yes Checking for evdev... yes Checking for FreeType... yes Checking for Fontconfig... yes Checking for libinput... yes Checking for axis API in libinput... yes Checking for LinuxFB... yes Checking for mtdev... yes Checking for OpenVG... no Checking for default QPA platform... xcb Checking for HarfBuzz... yes Checking for libmd4c... no Checking for tslib... no Checking for Vulkan... yes Checking for xkbcommon >= 0.5.0... yes Checking for xkbcommon-x11... no Checking for GTK+ >= 3.6... no Checking for CUPS... no Checking for DB2 (IBM)... no Checking for InterBase... no Checking for MySQL... no Checking for OCI (Oracle)... no Checking for ODBC... no Checking for PostgreSQL... no Checking for SQLite (version 2)... no Checking for TDS (Sybase)... no Checking for ntddmodm... no Checking for Socket CAN... yes Checking for Socket CAN FD... yes Checking for 64bit pointers... yes Checking for Sufficiently recent FPU on ARM... yes Checking for python... /usr/bin/python3 Checking for Direct3D 12... no Checking for Assimp... no Checking for SDL2... no Checking for Assimp... no Checking for Autodesk FBX... no Checking for Wayland client library... yes Checking for Wayland cursor library... yes Checking for wayland-scanner... yes Checking for EGL 1.5 with Wayland Platform... yes Checking for Linux dma-buf Buffer Sharing... no Checking for DRM EGL Server... yes Checking for Wayland EGL library... yes Checking for libhybris EGL Server... no Checking for Vulkan Buffer Sharing... yes Checking for XComposite... no Checking for wayland-server... yes Checking for Linux Client dma-buf Buffer Sharing... no Checking for Linux dma-buf Buffer Sharing... no Checking for Vulkan Buffer Sharing... yes Checking for BlueZ... no Checking for sensorfw... no Checking for Gypsy... no Checking for WinRT Geolocation API... no Checking for ALSA... yes Checking for GStreamer 1.0... yes Checking for GStreamer App 1.0... yes Checking for GStreamer encoding-profile.h... yes Checking for GStreamer OpenGL 1.0... yes Checking for GStreamer Photography 1.0... no Checking for Video for Linux... yes Checking for OpenAL... no Checking for PulseAudio >= 0.9.10... no Checking for libresourceqt5... no Checking for Flite... no Checking for Speech Dispatcher... no Checking for libclang... no Checking for architecture supported... yes Checking for bison... no Checking for submodule initialized... yes Checking for build path without whitespace... yes Checking for platform supported... Checking for gperf... no Checking for flex... no Checking for host pkg-config... /usr/bin/pkg-config Checking for jumbo build merge limit... 8 Checking for linker supports -z noexecstack... yes Checking for python2... Checking for d-bus... yes Checking for fontconfig... yes Checking for freetype >= 2.4.2... yes Checking for glib-2.0 >= 2.32.0... yes Checking for glibc > 2.16... yes Checking for harfbuzz >= 2.2.0... yes Checking for jsoncpp... no Checking for khr... yes Checking for lcms2... yes Checking for libdrm... yes Checking for libevent... no Checking for libvpx... no Checking for libwebp, libwebpmux and libwebpdemux... yes Checking for compatible libxml2 and libxslt... no Checking for minizip... no Checking for system ninja... yes Checking for nss >= 3.26... no Checking for opus... no Checking for protobuf... yes Checking for protoc... yes Checking for re2... no Checking for snappy... no Checking for x11... yes Checking for xcomposite... no Checking for xcursor... yes Checking for xi... no Checking for xtst... no Checking for zlib... yes Done running configuration tests. Configure summary: Build type: linux-g++ (arm64, CPU features: cx16 neon) Compiler: gcc 11.4.0 Configuration: compile_examples enable_new_dtags largefile neon precompile_header shared shared rpath release c++11 c++14 c++17 c++1z concurrent dbus reduce_exports stl Build options: Mode ................................... release Optimize release build for size ........ no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++17 Using ccache ........................... no Using new DTAGS ........................ yes Relocatable ............................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. yes Build parts ............................ libs examples tools Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... yes Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... yes Using system zlib ...................... yes Zstandard support ...................... no Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... yes iconv .................................. no ICU .................................... yes Built-in copy of the MIME database ..... yes Tracing backend ........................ Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... yes Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ yes DTLS ................................... yes OCSP-stapling .......................... yes SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. no Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ yes Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... yes OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. yes Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... yes INTEGRITY HID .......................... no mtdev .................................. yes tslib .................................. no xkbcommon .............................. yes X11 specific: XLib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... no xkbcommon-x11 ........................ no QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... yes EGLFS GBM ............................ yes EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes Qt Sql: SQL item models ........................ yes Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... no Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt Testlib: Tester for item models ................. yes Serial Port: ntddmodm ............................... no Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes SerialPort Support ..................... yes Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... yes Using system libtiff ................. no WEBP ................................... yes Using system libwebp ................. yes Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML just-in-time compiler .............. yes QML sequence object .................... yes QML XML http request ................... yes QML Locale ............................. yes Qt QML Models: QML list model ......................... yes QML delegate model ..................... yes Qt Quick: Direct3D 12 ............................ no AnimatedImage item ..................... yes Canvas item ............................ yes Support for Qt Quick Designer .......... yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes TableView item ......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes QtQuick3D: Assimp ................................. yes System Assimp .......................... no Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Gamepad: SDL2 ................................... no Qt 3D: Assimp ................................. yes System Assimp .......................... no Output Qt3D GL traces .................. no Use SSE2 instructions .................. no Use AVX2 instructions .................. no Aspects: Render aspect ........................ yes Input aspect ......................... yes Logic aspect ......................... yes Animation aspect ..................... yes Extras aspect ........................ yes Qt 3D Renderers: OpenGL Renderer ........................ yes RHI Renderer ........................... no Qt 3D GeometryLoaders: Autodesk FBX ........................... no Qt Wayland Drivers: EGL .................................... yes Raspberry Pi ........................... no XComposite EGL ......................... no XComposite GLX ......................... no DRM EGL ................................ yes libhybris EGL .......................... no Linux dma-buf server buffer integration . no Vulkan-based server buffer integration . yes Shm emulation server buffer integration . yes Qt Wayland Client Shell Integrations: xdg-shell .............................. yes xdg-shell unstable v5 (deprecated) ..... yes xdg-shell unstable v6 .................. yes ivi-shell .............................. yes wl-shell (deprecated) .................. yes Qt Wayland Client ........................ yes Qt Wayland Compositor .................... yes Qt Wayland Compositor Layer Plugins: VSP2 hardware layer integration ........ no Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no Native Win32 Bluetooth ................. no WinRT Bluetooth API (desktop & UWP) .... no WinRT advanced bluetooth low energy API (desktop & UWP) . no Qt Sensors: sensorfw ............................... no Qt Quick Controls 2: Styles ................................. Default Fusion Imagine Material Universal Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... yes Qt Positioning: Gypsy GPS Daemon ....................... no WinRT Geolocation API .................. no Qt Location: Qt.labs.location experimental QML plugin . yes Geoservice plugins: OpenStreetMap ........................ yes HERE ................................. yes Esri ................................. yes Mapbox ............................... yes MapboxGL ............................. yes Itemsoverlay ......................... yes QtXmlPatterns: XML schema support ..................... yes Qt Multimedia: ALSA ................................... yes GStreamer 1.0 .......................... yes GStreamer 0.10 ......................... no Video for Linux ........................ yes OpenAL ................................. no PulseAudio ............................. no Resource Policy (libresourceqt5) ....... no Windows Audio Services ................. no DirectShow ............................. no Windows Media Foundation ............... no Qt TextToSpeech: Flite .................................. no Flite with ALSA ........................ no Speech Dispatcher ...................... no Qt Tools: Qt Assistant ........................... yes Qt Designer ............................ yes Qt Distance Field Generator ............ yes kmap2qmap .............................. yes Qt Linguist ............................ yes Mac Deployment Tool .................... no makeqpf ................................ yes pixeltool .............................. yes qdbus .................................. yes qev .................................... yes Qt Attributions Scanner ................ yes qtdiag ................................. yes qtpaths ................................ yes qtplugininfo ........................... yes Windows deployment tool ................ no WinRT Runner Tool ...................... no Qt Tools: QDoc ................................... no Qt WebEngine Build Tools: Use System Ninja ....................... yes Use System Gn .......................... no Jumbo Build Merge Limit ................ 8 Developer build ........................ no Sanitizer .............................. no QtWebEngine required system libraries: fontconfig ........................... yes dbus ................................. yes nss .................................. no khr .................................. yes glibc ................................ yes Optional system libraries used: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . yes opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. yes zlib ................................. yes minizip .............................. no libevent ............................. no jsoncpp .............................. no protobuf ............................. yes libxml2 and libxslt .................. no lcms2 ................................ yes png .................................. no JPEG ................................. no harfbuzz ............................. yes freetype ............................. yes Note: Also available for Linux: linux-clang linux-icc Note: The following modules are not being compiled in this configuration: webenginecore webengine webenginewidgets pdf pdfwidgets WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation. Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package. On Windows, you must set LLVM_INSTALL_DIR to the installation path. WARNING: Tool gperf is required to build QtWebEngine. WARNING: Tool gperf is required to build QtPdf. WARNING: QtWebEngine will not be built. WARNING: QtPdf will not be built. Qt is now configured for building. Just run 'gmake'. Once everything is built, you must run 'gmake install'. Qt will be installed into '/usr/local/Qt-5.15.2'. Prior to reconfiguration, make sure you remove any leftovers from the previous build. ```