welcome: please sign in
Differences between revisions 6 and 7
Revision 6 as of 2012-06-08 08:13:14
Size: 2793
Editor: jerry.tk
Comment: Troubleshooting missing header files, some cleanup
Revision 7 as of 2012-06-11 19:58:39
Size: 3015
Editor: jerry.tk
Comment: vchiq permissions mod
Deletions are marked like this. Additions are marked like this.
Line 49: Line 49:
 * If you get an error like "'''failed to open vchiq instance'''" you'll need to:  * If you get an error like "'''failed to open vchiq instance'''" you'll need to do as root:
 {{{
    echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules
    usermod -a -G video [your_username]
}}}
  . Or as one time temporary solution (until reboot):

Building Quake 3 in Raspbian

Documentation below pulled from the Raspbian Forum. Please update this page if errors in the build process are discovered.

  1. Make sure you're up-to-date with everything (aptitude update; aptitude upgrade)
  2. As root:
        aptitude install git gcc build-essential libsdl1.2-dev
  3. Download the Quake 3 source code:
        git clone https://github.com/raspberrypi/quake3.git
  4. Edit build.sh in quake3 directory:

        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-
  5. Do a ./build.sh

  6. Wait for compilation to finish, takes about 1 hour on RasPi.

  7. 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

  8. 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.

  9. If you do not intend to keep Quake 3 source code, you may reorganize files as suggested by this thread on RasPi Forum.

  10. As root: rpi-update 192, reboot.

  11. 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

  • Compiling fails, complaining about missing vcos_platform_types.h file. See this issue in RasPi repository: https://github.com/raspberrypi/firmware/issues/34

  • Game cannot find Broadcom libraries. As root do:
    cd /etc/ld.so.conf.d/
    echo /opt/vc/lib >broadcomlib.conf
    ldconfig
  • If you get an error like "failed to open vchiq instance" you'll need to do as root:

        echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules
        usermod -a -G video [your_username]
    • Or as one time temporary solution (until reboot):
        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.