Update README for xf86-video-freedreno and fbterm

This commit is contained in:
crondog 2014-03-15 18:45:16 +11:00
parent 5b47e73b6a
commit 26eaa7becc
6 changed files with 229 additions and 8 deletions

47
PKGBUILD.libdrm Normal file
View file

@ -0,0 +1,47 @@
# $Id: PKGBUILD 204511 2014-01-21 18:58:35Z lcarlier $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=libdrm
pkgver=2.4.52
pkgrel=1
pkgdesc="Userspace interface to kernel DRM services"
arch=(i686 x86_64)
license=('custom')
depends=('glibc' 'libpciaccess')
makedepends=('valgrind')
checkdepends=('cairo')
replaces=('libdrm-new' 'libdrm-nouveau')
#options=(debug !strip)
options=(!strip)
url="http://dri.freedesktop.org/"
source=("libdrm::git://anongit.freedesktop.org/mesa/drm"
COPYING)
sha256sums=('SKIP'
'9631d4f694952e3e6ae5a05534c2e93e994e47d3413677a3a00e45c8cef6db93')
pkgver(){
cd $pkgname
git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}
build() {
cd $pkgname
# pthread is useless in Linux
sed -i "/pthread-stubs/d" configure.ac
autoreconf --force --install
./configure --prefix=/usr --enable-freedreno-experimental-api
make
}
check() {
cd $pkgname
make -k check
}
package() {
cd $pkgname
make DESTDIR="$pkgdir" install
install -m755 -d "$pkgdir/usr/share/licenses/$pkgname"
install -m644 ../COPYING "$pkgdir/usr/share/licenses/$pkgname/"
}

104
PKGBUILD.mesa Normal file
View file

@ -0,0 +1,104 @@
# $Id: PKGBUILD 205069 2014-02-04 11:01:18Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase=mesa
pkgname=('freedreno-dri' 'mesa' 'mesa-libgl')
pkgver=10.0.3
pkgrel=1
arch=('i686' 'x86_64')
makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'libxxf86vm' 'libxdamage'
'libvdpau' 'wayland' 'elfutils' 'systemd')
url="http://mesa3d.sourceforge.net"
license=('custom')
options=(debug !strip)
#source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
source=("Mesa-10::git://github.com/freedreno/mesa.git"
LICENSE)
md5sums=('SKIP'
'5c65a0fe315dd347e09b1f2826a1df5a')
prepare(){
cd ${srcdir}/?esa-*
echo $(cat VERSION | tr "-" "_").$(git rev-list --count HEAD)
}
build() {
cd ${srcdir}/?esa-*
autoreconf -vfi # our automake is far too new for their build system :)
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-dri-drivers= --with-gallium-drivers=freedreno,swrast \
--with-egl-platforms=x11 --enable-gles2 --enable-gles1 \
--enable-gallium-egl --disable-gallium-llvm --enable-xa --disable-dri3 \
--enable-gbm
#--enable-debug
make
# fake installation
mkdir $srcdir/fakeinstall
make DESTDIR=${srcdir}/fakeinstall install
}
package_freedreno-dri() {
pkgdesc="Mesa drivers for AMD/ATI Radeon"
depends=('mesa-libgl' 'libtxc_dxtn' "mesa=${pkgver}")
conflicts=('xf86-video-ati<6.9.0-6')
install -m755 -d ${pkgdir}/usr/lib/dri
mkdir -p ${pkgdir}/usr/lib/xorg/modules/dri/
mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/{kgsl,msm}_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/
}
package_mesa() {
pkgdesc="an open-source implementation of the OpenGL specification"
depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 'elfutils' )
optdepends=('opengl-man-pages: for the OpenGL API man pages')
provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
replaces=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
mv -v ${srcdir}/fakeinstall/* ${pkgdir}
# rename libgl/EGL/glesv*.so to not conflict with blobs - may break .pc files ?
mv ${pkgdir}/usr/lib/libGL.so.1.2.0 ${pkgdir}/usr/lib/mesa-libGL.so.1.2.0
mv ${pkgdir}/usr/lib/libEGL.so.1.0.0 ${pkgdir}/usr/lib/mesa-libEGL.so.1.0.0
mv ${pkgdir}/usr/lib/libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/mesa-libGLESv1_CM.so.1.1.0
mv ${pkgdir}/usr/lib/libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/mesa-libGLESv2.so.2.0.0
rm ${pkgdir}/usr/lib/lib{GL,EGL,GLESv1_CM,GLESv2}.so*
install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}
package_mesa-libgl() {
pkgdesc="Mesa 3-D graphics library"
depends=("mesa=${pkgver}")
provides=("libgl=${pkgver}")
replaces=('libgl')
# See FS#26284
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
#ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so
#ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1
#ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1.2.0
ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so
ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1
ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1.2.0
ln -s mesa-libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so
ln -s mesa-libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so.1
ln -s mesa-libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so.1.0.0
ln -s mesa-libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so
ln -s mesa-libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so.1
ln -s mesa-libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so.1.1.0
ln -s mesa-libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so
ln -s mesa-libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so.2
ln -s mesa-libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so.2.0.0
install -m755 -d "${pkgdir}/usr/share/licenses/mesa-libgl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-libgl/"
}

View file

@ -10,8 +10,6 @@ If you cannot get it booting you will need to
reboot into recovery and check /proc/last_kmsg for the errors. Or try and build
the UART cable (which I failed at)
There is only xf86-video-fbdev working and no DRM or anything fancy
The Software Refresher in the kernel does not work. You will need to run my
refresher app or fix the kernel :)
@ -23,6 +21,8 @@ kgsl_bo_gpuaddr comes back a 0
https://github.com/borh/nexus-7-2013-arch-scripts to get a working chroot
first.
1a: remove trimslice packages from chroot
2: Edit the init script to point to your arch.img or partition
3: Edit and Run makebootimage.sh
@ -56,13 +56,17 @@ details
Note: Disable the wpa_supplicant hook in /etc/dhcpcd.conf
## To get X working
Since there is no framebuffer console you cannot start X manually (unless you
are able to get ssh working, see above) Auto login is your friend.
## To get fbterm console
Copy fbterm/getty@.service to /etc/systemd/system/ and fbterm/fbterm-login to
/opt/fbterm-login and then systemctl enable getty@tty1.service
Be sure to install a window manager or something first and then follow
https://wiki.archlinux.org/index.php/Automatic_login_to_virtual_console and
https://wiki.archlinux.org/index.php/Start_X_at_Login
ln -s getty@.service autovt@.service to get it on all vt's
## To get X working
Install xf86-video-freedreno-git (aur) Use the xorg.conf included
Instead of filling the AUR with crap you can use the mesa and libdrm PKGBUILDs
included. Always use the git versions as they have the latest freedreno fixes
Your .xinitrc should contain something like
~/refresher &

4
fbterm/fbterm-login Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
# example: fbterm-login fb1 tty1
export FRAMEBUFFER=/dev/$1
exec /usr/bin/fbterm -r 1 -s 24 -- /usr/bin/login < /dev/$2

45
fbterm/getty@.service Normal file
View file

@ -0,0 +1,45 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
After=systemd-user-sessions.service plymouth-quit-wait.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
ExecStart=-/opt/fbterm-login fb0 %I
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
[Install]
WantedBy=getty.target

17
xorg.conf Normal file
View file

@ -0,0 +1,17 @@
Section "Device"
Identifier "Video Device"
Driver "freedreno"
# Uncomment for addition debug traces in xorg log:
Option "Debug" "true"
# The below two options are not needed if you are using the
# msm drm/kms driver:
Option "fb" "/dev/fb0"
Option "SWCursor" "true"
Option "SWRefresher" "false"
Option "NoAccel" "true"
EndSection
Section "Screen"
Identifier "Screen"
Monitor "Monitor"
Device "Video Device"
EndSection