Signed-off-by: Pekka Paalanen <[email protected]> --- building.html | 3 + raspberrypi.html | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 0 deletions(-) create mode 100644 raspberrypi.html
diff --git a/building.html b/building.html index b946bd7..84629b7 100644 --- a/building.html +++ b/building.html @@ -41,6 +41,9 @@ cards require <a href="http://nouveau.freedesktop.org/wiki/InstallDRM#Firmware">loading external firmware</a>.</p> +<p>For building Weston for <a href="http://www.raspberrypi.org/">Raspberry +Pi</a>, see <a href="raspberrypi.html">Raspberry Pi build guide</a>.</p> + <h2>Setting up the environment</h2> <h3>Installing in a custom location</h3> <p>If you do not want to install system wide, you'll need to set diff --git a/raspberrypi.html b/raspberrypi.html new file mode 100644 index 0000000..e263fd8 --- /dev/null +++ b/raspberrypi.html @@ -0,0 +1,154 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<html> + +<head> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> +<link href="wayland.css" rel="stylesheet" type="text/css"> +<title>Weston on Raspberry Pi</title> +</head> + +<body> +<h1><a href="/"><img src="wayland.png" alt="Wayland logo"></a></h1> + +<h2>Weston on Raspberry Pi</h2> + +<p>This is a guide for installing Weston into +<a href="http://www.raspberrypi.org/">Raspberry Pi</a>. All commands and +compiling are done directly on the Pi.</p> + +<h2>Build dependencies</h2> + +<p>Assuming you are using the Raspbian distribution, install the +build dependencies:</p> +<pre> $ sudo apt-get install build-essential automake libtool bison flex \ + xutils-dev libcairo2-dev libffi-dev libmtdev-dev libjpeg-dev \ + libxcb-xfixes0-dev libxcursor-dev +</pre> + +<h2>Firmware</h2> + +<p>Make sure you have the latest Raspberry Pi firmware with the +<a href="https://github.com/Hexxeh/rpi-update">rpi-update</a> tool. A too +old firmware may cause rpi-backend to malfunction on Raspberry Pi.</p> + +<p>You may want to tweak the following options in +<tt>/boot/config.txt</tt>:</p> +<dl> + <dt><tt>gpu_mem=128</tt></dt> + <dd>How much memory to reserve for the VideoCore, i.e. framebuffers, + GL textures, Dispmanx resources.</dd> + <dt><tt>dispmanx_offline=1</tt></dt> + <dd>This will enable the firmware to fall back to off-line + compositing of Dispmanx elements. Normally the compositing + is done on-line, during scanout, but cannot handle too many + elements. With off-line enabled, an off-screen buffer + is allocated for compositing. When scene complexity + (number and sizes of elements) is high, compositing will + happen off-line into the buffer.</dd> +</dl> + +<p>By default, the rpi-backend is configured for the <tt>dispmanx_offline=1</tt> +case. Without this setting, it would be better to run Weston with +<tt>--max-planes=10</tt> command line option.</p> + +<p>If you want to use Weston with purely GLESv2 compositing, you can pass +<tt>--max-planes=0</tt> to Weston. In that case it would be preferrable +to not set <tt>dispmanx_offline=1</tt> to conserve VideoCore memory.</p> + +<h2>Setting up the environment</h2> + +<p>Here we will install to the home directory of the pi user.</p> + +<blockquote> +<pre>export WLD="$HOME/local" +export PATH="$WLD/bin:$PATH" +export LD_LIBRARY_PATH="$WLD/lib:/opt/vc/lib" +export PKG_CONFIG_PATH="$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/" +export ACLOCAL="aclocal -I $WLD/share/aclocal" +export XDG_RUNTIME_DIR="/run/shm/wayland" +export XDG_CONFIG_HOME="$WLD/etc" + +mkdir -p "$WLD/share/aclocal" +mkdir -p "$XDG_RUNTIME_DIR" +</pre> +</blockquote> + +<p>You may put the above in a script and source it in the terminal +where you wish to build the packages or run Weston.</p> + +<h2>pkg-config files</h2> + +<p>Some libraries on the Pi do not have appropriate pkg-config files +installed. We need to install them.</p> + +<p>Download the .pc files from +<a href="http://cgit.collabora.com/git/user/pq/android-pc-files.git/tree/pkgconfig?h=raspberrypi">git://git.collabora.co.uk/git/user/pq/android-pc-files.git</a> +and make sure you take the <em>raspberrypi</em> branch. The master branch +contains similar files for Android, and will not work.</p> + +<p>Copy the .pc files into <tt>$WLD/share/pkgconfig/</tt>:</p> +<pre> $ cp bcm_host.pc egl.pc glesv2.pc wayland-egl.pc $WLD/share/pkgconfig/ +</pre> + +<h2>Wayland libraries</h2> + +<p>Libwayland is built and installed the same way as in +<a href="building.html">the generic build guide</a>.</p> + +<pre> $ git clone git://anongit.freedesktop.org/wayland/wayland + $ cd wayland + $ ./autogen.sh --prefix=$WLD + $ make + $ make install +</pre> + + +<h2>libxkbcommon</h2> + +<p>Libxkbcommon is built and installed the same way as in +<a href="building.html">the generic build guide</a>, too.</p> + +<pre> $ git clone git://people.freedesktop.org/xorg/lib/libxkbcommon.git + $ cd libxkbcommon/ + $ ./autogen.sh --prefix=$WLD + $ make && make install +</pre> + + +<h2>Weston and demo applications</h2> + +<p>Weston is configured slightly differently compared to the normal build:</p> +<pre> $ git clone git://anongit.freedesktop.org/wayland/weston + $ cd weston + $ ./autogen.sh --prefix=$WLD --disable-setuid-install \ + --with-cairo-glesv2 --disable-x11-compositor --disable-drm-compositor \ + --disable-android-compositor --disable-weston-launch \ + --disable-simple-egl-clients WESTON_NATIVE_BACKEND="rpi-backend.so" + $ make + $ make install +</pre> + +<blockquote><p><i>If the +<a href="http://lists.freedesktop.org/archives/wayland-devel/2012-November/006133.html">Raspberry Pi backend patch series</a> +has not yet been merged in the main Weston repository, the git clone command +above will not produce the rpi-backend. In that case, use this instead:</i></p> +<pre> $ git clone -b raspberrypi-elements2 git://git.collabora.co.uk/git/user/pq/wayland-demos.git +</pre> +</blockquote> + +<p>Weston should work by running <tt>weston</tt>. Remember to have the +environment set up.</p> + +<h2>Troubleshooting</h2> + +<p>If the right pkg-config files are not installed, building weston can fail. +If you see the following during Weston's configure step, the +<tt>bcm_host.pc</tt> file was not found, and the rpi-backend will not work:</p> +<pre>checking for RPI_BCM_HOST... no +configure: WARNING: Raspberry Pi BCM host libraries not found, will use stubs instead. +</pre> + +<p>Too old firmware might cause corrupted graphics.</p> + +</body> +</html> -- 1.7.8.6 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
