Wayland in Embedded linux/Wayland on Raspberrypi(arm)

Package build using Wayland-build-tool

Onionfra 2017. 6. 20. 13:14

Status: Build & weston is success, but weston-simple-egl is not working


Building Weston on Rasberrypi(raspbian)


# flashing latest raspbian image in host linux

https://www.raspberrypi.org/downloads/raspbian/

https://www.raspberrypi.org/documentation/installation/installing-images/linux.md


# update & upgrade rasbian

sudo apt-get update
sudo apt-get dist-upgrade

wayland-build-tools clone (Made by Bryce Harrington)

git clone https://github.com/bryceharrington/wayland-build-tools.git


# Set build environment

cp wl_defines.sh ~/bin/

mkdir ~/build

mkdir ~/build/Wayland


# Install wayland build dependencies

./wl_install_deps

# Fail case: I got build error in mesa package in "wl_build" script so I did like below

config.txt
dtoverlay=vc4-kms-v3d
raspi-config
Change memory split -> 256MB
mesa-utils (to test OpenGL later)
sudo apt-get install mesa-utils
OpenGL driver
raspi-config -> Advanced Options -> GL Driver
Board Reboot!! "# reboot"
OpenGL test
glxgears


We need additional build dependencies

sudo apt-get build-dep libgl1-mesa-dri
sudo apt-get install \
    automake libtool \
    bison flex \
    gettext \
    libdrm-dev \
    libexpat1-dev \
    libudev-dev \
    libx11-xcb-dev \
    libxcb-dri3-dev \
    libxcb-dri2-0-dev \
    libxcb-glx0-dev \
    libxcb-xfixes0-dev \
    libxcb-present-dev \
    libxcb-sync-dev \
    libxshmfence-dev \
    libxdamage-dev \
    libxext-dev \
    libxfixes-dev \
    python-mako \
    x11proto-present-dev \
    x11proto-dri3-dev \
    x11proto-dri2-dev \
    x11proto-gl-dev


# Fail case: Even though I ran the "wl_install_deps" script, I had to install below packages using apt 

sudo apt-get install build-essential libgtk-3-dev check

# Fail case: wayland package require libxml2-dev package

sudo apt-get install libxml2-dev

# Fail case: I got build error in "libinput" package in "wl_build" script so I fixed it like below

gen libinput --disable-libwacom --disable-debug-gui

compile

# Fail case: I got build error in "pixman" package in "wl_build" script so I fixed it like below

gen pixman  --disable-arm-iwmmxt

compile

# Fail case:  I got build error in "mesa" package in "wl_build" script so I fixed it like below

echo "mesa"

cd $WLROOT/mesa

git clean -xfd

./autogen.sh --prefix=$WLD \

   --enable-gles2 \

   --with-egl-platforms=x11,wayland,drm \

   --enable-gbm --enable-shared-glapi \

   --with-gallium-drivers=vc4 \

   --without-dri-drivers \

   --disable-intel \

   --disable-va \

   --disable-vdpau \

   --disable-xvmc \

   --disable-omx

compile

# All related package clones including wayland 

./wl_clone 

# Fail case: code of "master" branch is not stable(build error) so I used mesa-11.1.1

cd ~/build/Wayland/mesa

git checkout mesa-11.1.1

# Start build

./wl_build 


# Run weston on X11(Xwayland)

./weston --tty=1


# Run weston on DRM backend (without X11)

1) Set Wayland environment variable $XDG_RUNTIME_DIR

vi ~/.profile

# Code to put in .profile

# Need to check if linux environment has XDG_RUNTIME_DIR using "env" command


if test -z "${XDG_RUNTIME_DIR}"; then export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir if ! test -d "${XDG_RUNTIME_DIR}"; then mkdir "${XDG_RUNTIME_DIR}" chmod 0700 "${XDG_RUNTIME_DIR}" fi fi

#Source from: https://wayland.freedesktop.org/building.html

2) Go to virtual console (go to tty1) & login with "root" account
ctrl + alt + F1

3) weston --tty=1


References: 

https://github.com/wayland-project/wayland-build-tools

https://wayland.freedesktop.org/building.html

https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=175981

'Wayland in Embedded linux > Wayland on Raspberrypi(arm)' 카테고리의 다른 글

Useful links  (0) 2017.06.16