2024-07-04 02:19:42 +08:00
|
|
|
|
# LubanCat1 安装 Weston
|
|
|
|
|
|
|
|
|
|
系统:Ubuntu 22.04
|
|
|
|
|
|
|
|
|
|
```bash
|
2024-07-04 13:08:59 +08:00
|
|
|
|
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
|
2024-07-04 02:19:42 +08:00
|
|
|
|
|
2024-07-04 13:08:59 +08:00
|
|
|
|
apt install meson cmake git graphviz doxygen xsltproc xmlto pkg-config
|
2024-07-04 02:19:42 +08:00
|
|
|
|
|
2024-07-06 15:00:08 +08:00
|
|
|
|
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
|
2024-07-04 20:05:42 +08:00
|
|
|
|
|
2024-07-04 02:19:42 +08:00
|
|
|
|
# apt install libegl-dev libgegl-common libpam0g libgles2 libpipewire-0.2-dev
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-06 15:00:08 +08:00
|
|
|
|
其中 gstreamer1.0-rockchip1_1.14-4_arm64.deb 在 \<rk356x sdk\>/ubuntu/packages/arm64/gst-rkmpp/ 目录下获得。
|
|
|
|
|
|
2024-07-04 02:19:42 +08:00
|
|
|
|
/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
|
2024-07-04 20:05:42 +08:00
|
|
|
|
QT_QPA_PLATFORM=wayland
|
2024-07-04 02:19:42 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-07-04 10:11:16 +08:00
|
|
|
|
/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=gb
|
|
|
|
|
|
|
|
|
|
[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
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-04 02:19:42 +08:00
|
|
|
|
```bash
|
2024-07-04 13:08:59 +08:00
|
|
|
|
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
|
2024-07-04 02:19:42 +08:00
|
|
|
|
# opengl 源码从 buildroot 中拷贝
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-04 13:08:59 +08:00
|
|
|
|
wayland:
|
2024-07-04 02:19:42 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2024-07-04 13:08:59 +08:00
|
|
|
|
git checkout 1.21.0
|
|
|
|
|
meson build/ --prefix=/usr
|
|
|
|
|
sudo ninja -C build/ install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
wayland-protocols:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git checkout 1.24
|
2024-07-04 02:19:42 +08:00
|
|
|
|
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
|
2024-07-04 13:08:59 +08:00
|
|
|
|
git checkout 10.0.2
|
|
|
|
|
# meson build/ --prefix=/usr -Dpipewire=false
|
2024-07-04 02:19:42 +08:00
|
|
|
|
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
|
|
|
|
|
```
|
2024-07-04 13:08:59 +08:00
|
|
|
|
|
|
|
|
|
启动 weston,root 账户下执行:
|
|
|
|
|
|
|
|
|
|
```bash
|
2024-07-05 10:33:39 +08:00
|
|
|
|
weston --tty=2
|
2024-07-04 13:08:59 +08:00
|
|
|
|
```
|
2024-07-04 13:52:12 +08:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
```
|