weston与gdm编译

萝らか妹 提交于 2020-01-21 05:03:30

目录

引言

1 weston源码编译

1 .1 配置weston编译的环境变量

1.2 安装libwayland

1.3 安装wayland-protocols

1.4 安装libinput

1.5 安装X Server

1.6 安装weston

2 gdm3源码编译

2.1 下载源码及依赖

2.2 编译

总结 


引言

由于在开发调试桌面系统时候,会遇到一些问题。如:通过gstreamer管道搭建的视频播放能够直接在weston桌面上显示,而weston的demo也能够同时跑在weston桌面上,那么gstreamer的管道是否作为一个client来对接weston呢?还有如:嵌入式板卡搭建起ubuntu-desktop桌面环境后,启动到gdm界面很慢,该问题也需要分析。该篇博客主要讲解weston及gdm的源码编译,只有编译了源码才能随心所欲的打log

1 weston源码编译

1 .1 配置weston编译的环境变量

1)创建install文件

mkdir ~/install

2)设置环境变量

# setup environment for local install:

export WLD=$HOME/install

export LD_LIBRARY_PATH=$WLD/lib

export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/

export PATH=$WLD/bin:$PATH

export ACLOCAL_PATH=$WLD/share/aclocal

export ACLOCAL="aclocal -I $ACLOCAL_PATH"

mkdir -p $ACLOCAL_PATH

export MAKEFLAGS="j5" # run 5 threads, or use your own flags

1.2 安装libwayland

1)安装依赖包:

sudo apt install git autoconf libtool libffi-dev libexpat1-dev libxml2-dev

2)安装文档解析相关的包

sudo apt install doxygen xmlto graphviz

3)源码编译wayland

git clone git://anongit.freedesktop.org/wayland/wayland

cd wayland

./autogen.sh --prefix=$WLD # --disable-documentation

make check

make && make install

cd ..

1.3 安装wayland-protocols

1)源码编译

git clone git://anongit.freedesktop.org/wayland/wayland-protocols

cd wayland-protocols

./autogen.sh --prefix=$WLD

make check

make && make install

cd ..

1.4 安装libinput

1)安装依赖包

sudo apt install libmtdev-dev libudev-dev libevdev-dev libwacom-dev check libgtk-3-dev libunwind8-dev libcairo2-dev

2)下载源码

git clone git://anongit.freedesktop.org/wayland/libinput

cd libinput

git checkout 1.8-branch #切换到1.8版本才有autogen.sh,最新版编译采用meson

./autogen.sh --prefix=$WLD

make check

make && make install

cd ..

1.5 安装X Server

1)安装依赖包

sudo apt install xutils-dev libgl1-mesa-dev

sudo apt install libmd-dev

sudo apt install x11proto-xcmisc-dev x11proto-bigreqs-dev x11proto-randr-dev \

  x11proto-fonts-dev x11proto-video-dev x11proto-composite-dev \

  x11proto-record-dev x11proto-scrnsaver-dev x11proto-resource-dev \

  x11proto-xf86dri-dev x11proto-present-dev x11proto-xinerama-dev \

  libxkbfile-dev libxfont-dev libpixman-1-dev x11proto-render-dev

sudo apt install libepoxy-dev

sudo apt-get install libxfont2 libxfont-dev xfonts-utils

2)下载源码

git clone git://anongit.freedesktop.org/xorg/xserver

cd xserver

./autogen.sh --prefix=$WLD --disable-docs --disable-devel-docs \

  --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \

  --disable-xquartz --disable-xwin

make check

make && make install

cd ..

1.6 安装weston

1)安装依赖包

sudo apt install libgles2-mesa-dev libxcb-composite0-dev libxcursor-dev \

  libcairo2-dev libgbm-dev libpam0g-dev

2)环境设置

mkdir -p $WLD/share/X11/xkb/rules

ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/

ln -s /usr/bin/xkbcomp $WLD/bin/

3)源码编译

git clone git://anongit.freedesktop.org/wayland/weston

cd weston

git checkout 3.0  #切换到3.0版本才有autogen.sh,最新版编译采用meson

./autogen.sh --prefix=$WLD --disable-setuid-install --with-xserver-path=$WLD/bin/Xwayland

make check # runs Xwayland

make && make install

cd ..

4)运行测试

# Weston configuration:

mkdir -p ~/.config

cp weston/weston.ini ~/.config

editor ~/.config/weston.ini # edit to set background and turn on xwayland.so module

# Run it in an X11 window:

weston

2 gdm3源码编译

2.1 下载源码及依赖

git clone https://github.com/GNOME/gdm.git #注意:下载自己需要的版本

进入gdm:

cd gdm

解决依赖:

sudo apt-get install intltool gobject-introspection accountsservice libaccountsservice-dev libcanberra-gtk3-0 libcanberra-gtk3-dev libsystemd-dev plymouth-themes libplymouth-dev

sudo apt-get install dconf-tools

2.2 编译

./autogen.sh

$ ./autogen.sh

./autogen.sh

./configure

make

sudo make install

总结 

 编译weston,大概需要1.4G的存储空间。

 编译gdm,大于需要0.1G的存储空间。

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!