blob: 17e4d6a7695eb42333a0436f60f28c414124f09d [file] [log] [blame]
Kristian Høgsberga46dc062010-09-14 11:25:55 -04001These instructions assume some familiarity with git and building and
2running experimental software. And be prepared that this project
3isn't at all useful right now, it's still very much a prototype. When
4the instructions suggest to clone a git repo, you can of course just
5add a remote and fetch instead, if you have a clone of that repo
6around already. I usually install all software I'm working on into
7$HOME/install, so that's what I'll use in the instructions below, but
8you can use your favorite directory of course or install over your
9system copy (pass --prefix=/usr --sysconfdir=/etc, generally).
Kristian Høgsberg61ba8982008-11-05 10:37:20 -050010
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050011
Kristian Høgsberga46dc062010-09-14 11:25:55 -040012Modesetting
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050013
Kristian Høgsberga46dc062010-09-14 11:25:55 -040014At this point, kernel modesetting is upstream for Intel, AMD and
15nVidia chipsets. Most distributions ship with kernel modesetting
16enabled by default and will work with Wayland out of the box. The
17modesetting driver must also support the page flip ioctl, which only
18the intel driver does at this point.
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050019
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050020
Kristian Høgsberga46dc062010-09-14 11:25:55 -040021Building mesa
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050022
Kristian Høgsberga46dc062010-09-14 11:25:55 -040023Wayland uses the mesa EGL stack, and all extensions required to run
24EGL on KMS are now upstream on the master branch. The 7.9 release of
25mesa will have all these extensions, but for now you'll need to build
26mesa master:
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050027
Kristian Høgsberga46dc062010-09-14 11:25:55 -040028 $ git clone git://anongit.freedesktop.org/mesa/mesa
29 $ cd mesa
30 $ ./configure --prefix=$HOME/install --enable-egl --enable-gles2
31 $ make && make install
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050032
Kristian Høgsberga46dc062010-09-14 11:25:55 -040033If you're using an intel chipset, it's best to also pass
34--disable-gallium to ./configure, since otherwise libEGL will try to
35load the gallium sw rasterizer before loading the Intel DRI driver.
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050036
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050037
Kristian Høgsberga46dc062010-09-14 11:25:55 -040038libxkbcommon
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050039
Kristian Høgsberga46dc062010-09-14 11:25:55 -040040Wayland needs libxkbcommon for translating evdev keycodes to keysyms.
41There's a couple of repos around, and we're trying to consolidate the
42development, but for wayland you'll need the repo from my get
43repository. For this you'll need development packages for xproto,
44kbproto and libX11.
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050045
Kristian Høgsberga46dc062010-09-14 11:25:55 -040046 $ git clone git://people.freedesktop.org/~krh/libxkbcommon.git
47 $ cd libxkbcommon/
48 $ ./autogen.sh --prefix=$HOME/install
49 $ make && make install
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050050
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050051
Kristian Høgsberga46dc062010-09-14 11:25:55 -040052cairo-gl
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050053
Kristian Høgsberga46dc062010-09-14 11:25:55 -040054The Waland clients render using cairo-gl, which is an experimental
55cairo backend. It has been available since cairo 1.10. Unless your
56distribution ships cairo with the gl backend enabled, you'll need to
57compile your own version of cairo:
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050058
Kristian Høgsberga46dc062010-09-14 11:25:55 -040059 $ git clone git://anongit.freedesktop.org/cairo
60 $ cd cairo
61 $ ./autogen.sh --prefix=$HOME/install --enable-gl
62 $ make && make install
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050063
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050064
Kristian Høgsberga46dc062010-09-14 11:25:55 -040065Wayland
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050066
Kristian Høgsberga46dc062010-09-14 11:25:55 -040067With mesa and libxkbcommon in place, we can checkout and build
68Wayland. Aside from mesa, Wayland needs development packages for
69gdk-pixbuf-2.0, libudev, libdrm, xcb-dri2, xcb-fixes (for X
70compositor) cairo-gl, glib-2.0, gdk-2.0 (for poppler) and
71poppler-glib:
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050072
Kristian Høgsberga46dc062010-09-14 11:25:55 -040073 $ git clone git://people.freedesktop.org/~krh/wayland
74 $ aclocal; autoconf; ./configure --prefix=$HOME/install
75 $ make && make install
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050076
Kristian Høgsberga46dc062010-09-14 11:25:55 -040077Installing into a non-/usr prefix is fine, but the 70-wayland.rules
78udev rule file has to be installed in /etc/udev/rules.d. Once
79installed, either reboot or run
Kristian Høgsberg33a52bd2008-11-03 15:31:30 -050080
Kristian Høgsberga46dc062010-09-14 11:25:55 -040081 $ sudo udevadm trigger --subsystem-match=drm --subsystem-match=input
82
83to make udev label the devices wayland will use.
84
85If DISPLAY is set, the wayland compositor will run under X in a window
86and take input from X. Otherwise it will run on the KMS framebuffer
87and take input from evdev devices. Pick a background image that you
88like and copy it to the Wayland source directory as background.jpg or
89use the -b command line option:
90
91 $ ./wayland-system-compositor -b my-image.jpg
92
93To run clients, switch to a different VT and run the client from
94there. Or run it under X and start up the clients from a terminal
95window. There are a few demo clients available, but they are all
96pretty simple and mostly for testing specific features in the wayland
97protocol: 'terminal' is a simple terminal emulator, not very compliant
98at all, but works well enough for bash
99
100 'flower' moves a flower around the screen, testing the frame protocol
101 'gears' glxgears, but for wayland, currently broken
102 'image' loads the image files passed on the command line and shows them
103
104 'view' does the same for pdf files, but needs file URIs
105 (file:///path/to/pdf)