+libdrm - userspace library for drm
-DRM README file
-
-
-There are two main parts to this package: the DRM client library/interface
-(libdrm.so) and kernel/hardware-specific device modules (such as i915.ko).
-
+This is libdrm, a userspace library for accessing the DRM, direct
+rendering manager, on Linux, BSD and other operating systems that
+support the ioctl interface. The library provides wrapper functions
+for the ioctls to avoid exposing the kernel interface directly, and
+for chipsets with drm memory manager, support for tracking relocations
+and buffers. libdrm is a low-level library, typically used by
+graphics drivers such as the Mesa DRI drivers, the X drivers, libva
+and similar projects. New functionality in the kernel DRM drivers
+typically requires a new libdrm, but a new libdrm will always work
+with an older kernel.
Compiling
---------
-By default, libdrm and the DRM header files will install into /usr/local/.
-If you want to install this DRM to replace your system copy, say:
-
- ./configure --prefix=/usr --exec-prefix=/
-
-Then,
- make install
+libdrm has two build systems, a legacy autotools build system, and a newer
+meson build system. The meson build system is much faster, and offers a
+slightly different interface, but otherwise provides an equivalent feature set.
+To use it:
-To build the device-specific kernel modules:
+ meson builddir/
- cd linux-core/
- make
- cp *.ko /lib/modules/VERSION/kernel/drivers/char/drm/
- (where VERSION is your kernel version: uname -f)
+By default this will install into /usr/local, you can change your prefix
+with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after
+the initial meson setup).
-Or,
- cd bsd-core/
- make
- copy the kernel modules to the appropriate place
+Then use ninja to build and install:
+ ninja -C builddir/ install
+If you are installing into a system location you will need to run install
+separately, and as root.
-Tips & Trouble-shooting
------------------------
-1. You'll need kernel sources. If using Fedora Core 5, for example, you may
- need to install RPMs such as:
+Alternatively you can invoke autotools configure:
- kernel-smp-devel-2.6.15-1.2054_FC5.i686.rpm
- kernel-devel-2.6.15-1.2054_FC5.i686.rpm
- etc.
+ ./configure
+By default, libdrm will install into the /usr/local/ prefix. If you
+want to install this DRM to replace your system copy, pass
+--prefix=/usr and --exec-prefix=/ to configure. If you are building
+libdrm from a git checkout, you first need to run the autogen.sh
+script. You can pass any options to autogen.sh that you would other
+wise pass to configure, or you can just re-run configure with the
+options you need once autogen.sh finishes.
-2. You may need to make a symlink from /lib/modules/VERSION/build to your
- kernel sources in /usr/src/kernels/VERSION (where version is `uname -r`):
+Next step is to build libdrm:
- cd /lib/modules/VERSION
- ln -s /usr/src/kernels/VERSION build
-
-
-3. If you've build the kernel modules but they won't load because of an
- error like this:
-
- $ /sbin/modprobe drm
- FATAL: Error inserting drm (/lib/modules/2.6.15-1.2054_FC5smp/kernel/drivers/char/drm/drm.ko): Invalid module format
-
- And 'dmesg|tail' says:
-
- drm: disagrees about version of symbol struct_module
+ make
- Try recompiling your drm modules without the Module.symvers file.
- That is rm the /usr/src/kernels/2.6.15-1.2054_FC5-smp-i686/Module.symvers
- file (or rename it). Then do a 'make clean' before rebuilding your drm
- modules.
+and once make finishes successfully, install the package using
+ make install
+If you are installing into a system location, you will need to be root
+to perform the install step.