This page provides brief instructions on using jhbuild, a Python-based build tool, to build modular X.Org. jhbuild was written to build GNOME from source, but has been adapted to many other projects.
sudo apt-get install git-core gnome-common libglib2.0-dev docbook-xsl subversion automake1.4 automake1.7 automake1.9 automake1.10 guile-1.8 waf
sudo apt-get install groff zlib1g-dev libfreetype6-dev libxml2-dev docbook gperf flex bison libssl-dev
sudo apt-get install git-core gnome-common gnome-doc-utils make automake1.4 automake1.7 automake1.9 docbook-xsl cvs subversion guile-1.8
sudo apt-get install groff zlib1g-devlib freetype6-dev g++ bison flex
...sudo yum install @gnome-devel @development-tools gnome-common glib2-devel gnome-doc-utils docbook-style-xsl waf
sudo yum install zlib-devel freetype-devel libxml2-devel expat-devel gperf libgcrypt-devel
devel/git
, devel/gnome-common
, devel/autoconf262
, devel/automake14
, devel/automake17
, devel/automake18
, devel/automake19
, devel/automake110
, devel/glib20
, devel/subversion
(don't use Apache 2.0 APR!), textproc/gnome-doc-utils
(select all options for docbook-1.4!), textproc/intltool
, lang/guile
print/freetype2
...git clone git://git.gnome.org/jhbuild
cd jhbuild
./autogen.sh
make
make install
cp sample.jhbuildrc ~/.jhbuildrc
(On FreeBSD, do gmake && gmake install
.)
msgfmt isn't installed
- it's in the GNU gettext packagemake -f Makefile.plain install
- All this omits is building the documentation, which is also at http://library.gnome.org/devel/jhbuild/
The jhbuild
executable is installed to ~/.local/bin/jhbuild. You will need to either symlink to it, use the full path or add it to your $PATH
.The moduleset for jhbuilding xorg and an example jhbuildrc are stored in git in the xorg/util/modular repository.
To build everything, you can do:
mkdir -p $HOME/xorg/util
git clone git://anongit.freedesktop.org/git/xorg/util/modular/ $HOME/xorg/util/modular
jhbuild -f $HOME/xorg/util/modular/jhbuildrc
But often you would just want to build the X server and key drivers to enable support of your latest shiny hardware, without replacing all of your X libraries and utilities. In this case, you can build specific targets rather than everything.
You will need a minimal number of drivers as well as the server; rather than executing separate jhbuild commands, you can issue a single one listing all the targets you want to build. The input drivers for PS/2 keyboards and mice are: _xf86-input-keyboard and xf86-input-mouse_.
To build the server and dependencies, along with these drivers, you would type:
jhbuild -f $HOME/xorg/util/modular/jhbuildrc build xserver xf86-video-intel xf86-input-keyboard xf86-input-mouse
Other interesting targets include xorg-drivers which builds all maintained X.org drivers.
Note: rather than building the target xorg-fonts, which will build you an entire additional set of fonts, you may want to make a link in your $prefix area to link to your existing fonts. Unless you have built your X server with --enable-builtin-fonts
it will need to access some fonts to start, even though few applications need legacy bitmap fonts anymore.
cd $prefix/lib/X11; ln -s /usr/share/fonts/X11 fonts
Other drivers you may need include the synaptics driver and/or wacom drivers, currently maintained elsewhere (fixme...).
The X server is finally using a device driver on many systems (e.g. Linux, BSD); this is called DRM. It consists of two parts, the generic DRM module and a driver specific to your hardware. Currently, the kernel modules are not built automatically by jhbuild; you can find them in drm/linux-core or drm/bsd-core. To build the drm driver,
make -C linux-core
You may want to install these where you will be able to use them from your /etc/modules file.
Other buildable modules include the applications (e.g. xbiff
) and the libraries (e.g. libXfixes
), plus there a couple of meta modules; xorg-libs
will build all libs and xorg-apps
will build all apps.
Now that your development environment is set up, you can try running it (as root).
rmmod i915 # assuming you're using Intel
rmmod drm
insmod <path_to_drm_tree_above>/linux-core/drm.ko
insmod <path_to_drm_tree_above>/linux-core/i915.ko
export LD_LIBRARY_PATH=$prefix/lib
startx -- $prefix/bin/Xorg -verbose # make sure you have a ~/.xinitrc with what you want to run
And there you have it, a fresh stack ready for tracking & doing upstream development. Enjoy!
This page and the modules file for the build were originally written by Kristian Høgsberg, and modified by EricAnholt. Wikified by JimGettys.
buildone libdrm
jhbuild command.