Pinebookpro gaming part 2

Next chapter in PinebookPro gaming would be for OpenArena

Following was tested on the Manajaro Linux (aarch64 with the latest updates) and the Panfrost driver (mesa-git)

In order to use the Panfrost drivers please do the following

pacman -R xf86-video-fbturbo-git 
pacman -S mesa-git
sudo mv /etc/X11/xorg.conf.d/99-fbturbo.conf /etc/X11/xorg.conf.d/99-fbturbo~

And make sure you reboot the PinebookPro for the driver to get loaded.

Check that the drivers are working by verifying

glxinfo | grep Panfrost

You should see

 Vendor: Panfrost (0xffffffff)
Device: Mali T860 (Panfrost) (0xffffffff)
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali T860 (Panfrost)

Lets move on to the OpenArena build (assuming we have all the build tools installed)

How to build/compile OpenArena on the PinebookPro Manjaro linux aarch64

We start by creating a working directory

Make sure you have SDL1, SDL2 and openal libraries installed 
# pacman -S openal sdl sdl_net sdl_image sdl_mixer sdl2 sdl2_image sdl2_net sdl2_mixer 


mkdir ~/OPENARENA
cd ~/OPENARENA
git clone https://github.com/cmatsuoka/libxmp
wget https://fossies.org/linux/misc/xmp-4.1.0.tar.gz

cd libxmp
autoconf
./configure 
make -j4 
su 
# make install 
# exit 
cd ~/OPEARENA
gunzip xmp-4.1.0.tar.gz
tar -xvf xmp-4.1.0.tar
rm xmp-4.1.0.tar

cd xmp-4.1.0 
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:../libxmp/ LDFLAGS=-L../libxmp/lib CFLAGS=-I../libxmp/include ./configure
make -j4 
su
# make install 
# exit 

Dont forget to load ldconfig after installing libraries into /usr/local 
And make sure you have /usr/local/lib defined in your /etc/ld.so.conf.d/

Just put /usr/local/lib  into /etc/ld.so.conf.d/local.conf  
and run ldconfig as root  
cd ~/OPENARENA
git clone https://github.com/OpenArena/engine
git clone https://github.com/OpenArena/gamecode

cd engine

Now we need to edit the code/qcommon/q_platform.h to include aarch64 support

Add the following just below #define ARCH_STRING "arm"

vi code/qcommon/q_platform.h

#elif defined __aarch64__
#define ARCH_STRING "aarch64"


make -j4

cd ~/OPENARENA
cd gamecode
make -j4

cd code/game
./extract_entities.sh > openarena.def

cd ~/OPENARENA
cd gamecode/linux_scripts

Next we need to create a supermake.local build file 
Make sure to include the full path to the openarena.aarch64 here

BINNAME=/path_to/OPENARENA/engine/build/release-linux-aarch64/openarena.aarch64
ARCH=aarch64

Now in order to run the game you just execute the ./supermake from the 
OPENARENA/gamecode/linux_scripts

./supermake

It wont work because we need to get the OpenArena PAK files
- get the files
In your home directory there is .openarena directory

cd ~/.openarena/baseoa

total 400688
drwxr-x--- 2 user user 4096 Jan 17 22:45 .
drwxr-x--- 4 user user 4096 Jan 26 15:27 ..
-rw-rw-r-- 1 user user 8192 Jan 19 18:59 challenges.dat
-rw-r----- 1 user user 230 Jan 17 00:13 crashlog.txt
-rw-rw-r-- 1 user user 156 Jan 17 22:29 oax.pk3
-rw-r--r-- 1 user user 38138505 Jan 17 22:29 pak0.pk3
-rw-r--r-- 1 user user 38421794 Jan 17 22:29 pak1-maps.pk3
-rw-r--r-- 1 user user 26754265 Jan 17 22:29 pak2-players-mature.pk3
-rw-r--r-- 1 user user 74389371 Jan 17 22:29 pak2-players.pk3
-rw-r--r-- 1 user user 97077243 Jan 17 22:29 pak4-textures.pk3
-rw-r--r-- 1 user user 2907315 Jan 17 22:29 pak5-TA.pk3
-rw-r--r-- 1 user user 24912892 Jan 17 22:29 pak6-misc.pk3
-rw-r--r-- 1 user user 36972040 Jan 17 22:29 pak6-patch085.pk3
-rw-r--r-- 1 user user 70645224 Jan 17 22:29 pak6-patch088.pk3
-rw-rw-r-- 1 user user 10716 Jan 19 18:56 q3config.cfg
-rw-rw-r-- 1 user user 230 Jan 18 23:30 q3history

So we need to get the pak0 pak1-maps pak2-players-mature pak2-players pak4-textures
pak5-TA pak6-misc pak-patch085 pak6-patch088

I have used the https://sourceforge.net/projects/oarena/files/latest/download

cd ~/OPENARENA
mkdir DATA
cd DATA
wget https://svwh.dl.sourceforge.net/project/oarena/openarena-0.8.8.zip
unzip openarena-0.8.8.zip
cd openarena-0.8.8/baseoa
cp *.pk3 ~/.openarena/baseoa

We don't need the DATA directory anymore now and it can be deleted

cd ~/OPENARENA 
rm -rf DATA

To play OpenArena

cd ~OPENARENA/gamecode/linux_scripts
./supermake

OpenArena gets about 70 FPS on the PinebookPro with the Panfrost driver and is really well playable, you should try the Pine64 community OpenArena server ;)

Enjoy

About astr0baby

Please run Adblock or similar... we have been told to do so since Carl Sagan wrote the Contact .
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to Pinebookpro gaming part 2

  1. Daniel says:

    After I do [PKG_CONFIG_PATH=$PKG_CONFIG_PATH:../libxmp/ LDFLAGS=-L../libxmp/lib CFLAGS=-I../libxmp/include ./configure] I get the message [You need libxmp version 4.4 or later to build this package]. Then when I attempt to run [make -j4] I get [make: *** No targets specified and no makefile found. Stop.] That is where I am currently stuck. Any suggestions?

    • astr0baby says:

      Please make sure you include a proper path to the freshly compiled LIBXMP binaries during XMP comfigure !

      If your LIBXMP directory is in ~/OPENARENA/libxmp and your xmp-4.1.0 is in ~/OPENARENA/xmp-4.1.0
      Then you can do -> cd xmp-4.1.0
      PKG_CONFIG_PATH=$PKG_CONFIG_PATH:../libxmp/ LDFLAGS=-L../libxmp/lib CFLAGS=-I../libxmp/include ./configure

      If libxmp is in another dir you need to adjust the above command accordingly

    • nrj5k says:

      If you have followed the steps here, directories etc, try
      “`
      PKG_CONFIG_PATH==$PKG_CONFIG_PATH:../libxmp/ libxmp_LIBS=-L../libxmp/lib libxmp_CFLAGS=-I../libxmp/include ./configure
      “`
      it worked for me.

  2. fsfboy says:

    Thank you so much for the tutorial. I enjoy now to play my first game on Manjaro =D

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.