At the end of February, Broadcom announced the release of full documentation for the VideoCore IV graphics core, and a complete source release of the graphics stack for the BCM21553 cellphone chip. To celebrate, we offered a $10k prize to the first person to port this codebase to the BCM2835 application processor that sits at the heart of the Raspberry Pi, and to get Quake 3 (which already runs on the Pi) running on the newly open ARM driver, rather on the closed-source VPU driver. Our hope was that the ported driver would be a helpful reference for anyone working on a Mesa/Gallium3D driver for VideoCore IV. I’m delighted to say that we have a winner. Simon Hall is a longtime Pi hacker, who also produced the first ARMv6-accelerated copies-and-fills library back in 2012 and wrote the DMA kernel module that we integrate in our Raspbian releases. The prize couldn’t have gone to a more fitting recipient. So, without further ado, here are Simon’s instructions for getting the driver up and running. SETTING UP THE DEVICE You will need:
We need plenty of space to build the kernel. Compiling will take around 12 hours, so it is helpful to overclock the Pi for this task. We also require the latest firmware, and the necessary packages we’re going to use to build the code. Note: We’re going to use gcc 4.7, as the code generated is 10% faster than with 4.6. 4.8 is 10% faster still, but this is not available on Raspbian. If you cross-compile you can get better frame times. Enter the raspi-config utility with: Expand the filesystem, set the overclock to at least medium (900 MHz), and reboot. Now perform an update with: and reboot again. We need to install several packages. Enter the following command to do this: FETCHING THE SOFTWARE Enter the following commands to retrieve the necessary software from GitHub: BUILDING THE KERNEL This will take around 10 hours with all kernel modules. Pruning the modules to the bare minimum can improve compile times if you wish. Enter the following commands: Enter “general setup”, select “local version”, enter the string “simon” and then exit to the main menu and save. Now build the kernel with: INSTALLING THE KERNEL Enter the following commands to install the new kernel: When the devices comes back up, verify that the new kernel is loaded with the following command: You should see something similar to this: BUILDING THE REST Enter the following commands to build the rest of the software: Next, verify that the module has installed with this command. You should see something similar to this: Now enter the following commands: SETTING UP THE GAME First of all you must ensure that you have the Quake 3 Arena data files on your Pi. You *require* the ‘point release’ pak files installed. There are various ways to do this but you could either transfer them from another machine with SCP, or copy them across on a USB stick. Copy the files into a folder called ‘baseq3′. This should now contain pak files numbered from 0 to 8 (eg pak1.pk3). Next, enter the following commands: RUNNING THE GAME Enter the game folder with the following command: Run the game using this command: If you wish to play the game after a reboot, you must run the following commands to re-load the necessary files: If you see multi-second pauses of the game, this is because the system is paging to swap! You can see this by running ‘top’ at the same time, and watch the swap usage jump during a spike. Close some running programs to alleviate this problem. Running the game without gdb and loading minimal kernel modules will prevent swapping. |
A Semi-automated Technology Roundup Provided by Linebaugh Public Library IT Staff | techblog.linebaugh.org
Monday, March 31, 2014
Quake III bounty: we have a winner!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment