pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Guide to mesa 13.0.2 on DragonFly FreeBSD modular NetBSD



mesa 13.0.2 has been tested for DragonFly 4.7,
FreeBSD 11-release, FreeBSD 11.0-STABLE, FreeBSD 12-current,
and current modular xorg NetBSD amd64.  Glamor / egl appears
to function on a Sapphire Radeon HD6450, and SNA acceleration
appears to function with Intel IvyBridge integrated graphics.

Download pkgsrc-wip.  I use CVS current pkgsrc.  Copy the
directories with suffix -dfbsd to replace their counterparts in pkgsrc.
(I actually move the original pkgsrc ports to have suffix .orig and
have scripts to move them back for updates.)

/usr/pkgsrc/wip/dbus-dfbsd
/usr/pkgsrc/wip/libpthread-stubs-dfbsd
/usr/pkgsrc/wip/libdrm-dfbsd
/usr/pkgsrc/wip/MesaLib-dfbsd
/usr/pkgsrc/wip/modular-xorg-server-dfbsd
/usr/pkgsrc/wip/xf86-video-ati-dfbsd
/usr/pkgsrc/wip/xf86-video-intel-dfbsd
/usr/pkgsrc/wip/xf86-input-mouse-dfbsd
/usr/pkgsrc/wip/firefox-dfbsd

Can build modular-xorg, xfce4, git-base, vim-gtk2, firefox, emacs24,
glx-utils, enough to continue developing pkgsrc and mesa-13.0.2.
(pkgsrc emacs25 does not build on DragonFly at the moment.)

I build pkgsrc to have pkgdbdir /var/pkgsrc/db/pkg and with
PREFER_PKGSRC=yes

Extra entries in etc/mk.conf resemble:

PKG_DBDIR=        /var/pkgsrc/db/pkg
...
PREFER_PKGSRC=        yes
...
# FETCH_USING=curl

CURSES_DEFAULT=ncurses
READLINE_DEFAULT=readline

CFLAGS+=-g
INSTALL_UNSTRIPPED=yes
USE_DESTDIR=yes
X11_TYPE=modular
ACCEPTABLE_LICENSES += vim-license lame-license vera-ttf-license
ALLOW_VULNERABLE_PACKAGES=yes

PKG_OPTIONS.MesaLib = llvm glamor debug xvmc
PKG_OPTIONS.xf86-video-ati = debug
PKG_OPTIONS.xf86-video-intel = debug xvmc
PKG_OPTIONS.modular-xorg-server = debug

PKG_DEFAULT_OPTIONS=dri
PKG_OPTIONS.xfce4-thunar = -gvfs
PKG_OPTIONS.firefox = oss dbus -pulseaudio -alsa

DBUS_USER=bdbus
DBUS_GROUP=bdbus
DBUS_SYSTEM_PID_FILE=dbus.pid

For DragonFly and FreeBSD one can copy the resulting dbus from
/usr/pkg/share/examples/rc.d/
to /etc/rc.d
and enable dbus in /etc/rc.conf with
dbus_enable=YES

For Radeon glamor / egl on DragonFly, FreeBSD, NetBSD,
I use
/usr/pkg/share/X11/xorg.conf.d/20-glamor.conf:

Section "Module"
    Load "dri2"
    Load "glamoregl"
EndSection
Section "Device"
    Identifier "Radeon Graphics"
    Driver "radeon"
    Option    "AccelMethod"    "glamor"
EndSection

Also on DragonFly and FreeBSD remember to use bmake instead of make.
Move /usr/local to say /usr/local.orig.  Never have both /usr/pkg /usr/local;
instead making sure to move one of them before using the other.
Add /usr/pkg/sbin and /usr/pkg/bin to paths in .cshrc and .profile both
root and regular user.
Edit .xinitrc to use
exec /usr/pkg/bin/startxfce4
and move .config to say .config.ports
Build devel/scmcvs on FreeBSD since cvs was removed from base.

On DragonFly and FreeBSD
mozilla-rootcerts install
to help git work with https sites.

For NetBSD X11_TYPE=modular for glamor / egl use kernel patches from:
kernel/51786
(mesa 13.0.2 libdrm 2.4.74 Radeon needs kernel support, new ioctl or sysctl)

On DragonFly may need to move /usr/include/openssl, especially if one is
foolish enough as I was to prematurely remove old system openssl components.

For DragonFly 4.7 Intel integrated graphics may need kernel patch:

diff --git a/sys/dev/drm/i915/i915_gem.c b/sys/dev/drm/i915/i915_gem.c
index b89988a..b81639d 100644
--- a/sys/dev/drm/i915/i915_gem.c
+++ b/sys/dev/drm/i915/i915_gem.c
@@ -1703,8 +1703,9 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
     vm_size_t size;
     int error = 0, rv;

-    if (args->flags & ~(I915_MMAP_WC))
-        return -EINVAL;
+/* Linux scatterlist reversion */
+//    if (args->flags & ~(I915_MMAP_WC))
+//        return -EINVAL;

     obj = drm_gem_object_lookup(dev, file, args->handle);
     if (obj == NULL)
-- 
2.10.1

If one has a second machine, one can ssh into the first
export LIBGL_DEBUG=verbose
startx

to debug in particular libdrm and glamor / egl.  However this will
completely mess up keyboard event handling on modular NetBSD.


Home | Main Index | Thread Index | Old Index