Size: 1992
Comment:
|
Size: 2829
Comment: Added troubleshooting
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
Line 12: | Line 13: |
Line 18: | Line 20: |
Line 19: | Line 22: |
Line 20: | Line 24: |
Line 22: | Line 27: |
Line 23: | Line 29: |
Line 24: | Line 31: |
1. Depending on version of Raspbian you use, you may need to copy Broadcom libraries from /opt/vc/lib to /lib. | 1. Depending on version of Raspbian you use, you may need to copy Broadcom libraries from /opt/vc/lib to /lib or add them to LDPATH. |
Line 26: | Line 34: |
Line 29: | Line 38: |
== Troubleshooting == * If you get an error like "'''failed to open vchiq instance'''" you'll need to: {{{ chmod a+rw /dev/vchiq }}} * If running as a non-root user and running from the console (non X11), then quake3 may bomb out with an error message like ''''SDL_Init()'''' ''''Unable to open mouse''''. You'll need to fix permissions so that non-root user can access /dev/input/mice and /dev/input/mouse0. . Create new file {{{/etc/udev/rules.d/99-input.rules}}}: {{{ # file /etc/udev/rules.d/99-input.rules KERNEL=="mice", NAME="input/%k", MODE="664", GROUP="input" KERNEL=="mouse*", NAME="input/%k", MODE="664", GROUP="input" }}} . Add a new group and add your user(s) to it: {{{ groupadd input usermod -a -G input [your_username] }}} . Log out, log back in. |
Building Quake 3 in Raspbian
Documentation below pulled from the Raspbian Forum. Please update this page if errors in the build process are discovered.
I'm about to go to work in a minute, so please enjoy some terribly condensed instructions on how to build a superpowered Quake 3 in Raspbian, using Hexxeh's SD card image as a base. I've probably missed something important, but this should be a helpful start.
- Make sure you're up-to-date with everything (aptitude update; aptitude upgrade)
As root: aptitude install gcc build-essential libsdl1.2-dev
- Download the Quake 3 source code:
git clone https://github.com/raspberrypi/quake3.git
- Edit build.sh:
change line 8 to this: ARM_LIBS=/opt/vc/lib change line 16 to this: INCLUDE_DIR="/opt/vc/include" and comment out line 19: #CROSS_COMPILE=bcm2708-
Do a ./build.sh
Wait for compilation to finish, takes about 1 hour on RasPi.
Find copies of the following somewhere (other guides will show you) and place in build/release-linux-arm/baseq3:
pak0.pk3, pak1.pk3, pak2.pk3, pak3.pk3, pak4.pk3, pak5.pk3, pak6.pk3, pak7.pk3, pak8.pk3
As root: usermod -a -G video [your_username], log out, log back in. This will allow you to run game as non-root. Works with other directFB/SDL based stuff, too.
If you do not intend to keep Quake 3 source code, you may reorganize files as suggested by this thread on RasPi Forum.
- Depending on version of Raspbian you use, you may need to copy Broadcom libraries from /opt/vc/lib to /lib or add them to LDPATH.
As root: rpi-update 192, reboot.
Run ioquake3.arm. Shoot things.
Highly non-scientific testing (i.e. having played a normal-Debian build a few days ago) suggests framerate is quite dramatically improved. Go Raspbian!
Troubleshooting
If you get an error like "failed to open vchiq instance" you'll need to:
chmod a+rw /dev/vchiq
If running as a non-root user and running from the console (non X11), then quake3 may bomb out with an error message like 'SDL_Init()' 'Unable to open mouse'. You'll need to fix permissions so that non-root user can access /dev/input/mice and /dev/input/mouse0.
Create new file /etc/udev/rules.d/99-input.rules:
# file /etc/udev/rules.d/99-input.rules KERNEL=="mice", NAME="input/%k", MODE="664", GROUP="input" KERNEL=="mouse*", NAME="input/%k", MODE="664", GROUP="input"
- Add a new group and add your user(s) to it:
groupadd input usermod -a -G input [your_username]
- Log out, log back in.