dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Search | Go
Wiki > Main > DocsIndex > SimpleGuideToCompiling > LinuxSimpleGuideToCompiling

The Simple Guide To Compiling In Linux


This guide was written with Ubuntu users in mind, and can be performed as written in most versions of Ubuntu and Debian. Users of other Linux distributions may have to modify these instructions or perform additional steps in order to successfully compile Rockbox.


This guide was written for new users. Its purpose is to guide users through the steps to acquire a copy of the source code and build their own copy of Rockbox. It's written with the assumption that the user has virtually no familiarity with Linux at all, but that they do have a few basic computer skills in place.

A few remarks on notations: items in italics should be replaced with an appropriate entry. For example, username means to put your User Name there; most people make it their first name, without any capitalization. (Occasionally, username might not be in italics, but it should still be replaced.) If something is bold, it usually means you should type it in exactly as shown, punctuation and all. It may also be used to highlight the exact name of something, such as a menu.

A tip: If you highlight something in a window, then switch to the terminal window, clicking the mouse wheel will copy what you highlighted and put it on the terminal. This will make it easy to make sure you enter the right commands.

Getting Ready

First things first: make sure that you have at least a free gigabyte or so of space on your hard drive (or Linux partition, if you partitioned your hard drive). In Ubuntu, this is easy to check: open any file browser window and make sure no files are selected, then read the bottom of the window: "Free space: [some number]". You might also open a terminal and type df -h ~.

Once you've confirmed you have room, open a terminal window. In newer versions of Ubuntu, with Unity, search for the application "Terminal" and open it. You'll be presented with a simple prompt, reading something like "user@ubuntudesktop".

One more check. Type pwd and press Enter. It should say /home/username on the next line. If it doesn't, type cd and press Enter.

Getting Started

Okay, now the fun begins.

Get the git package, so that you can easily download the rockbox source from the git repository: sudo apt-get install git

Now type (or copy) this into the terminal and press Enter: git clone git://

Note: Use the --depth N command in git to only check out the last N commits. If you only want to build the tip of the master branch, use --depth 1. If you also want to check out the tip of the other branches in the repository, use --no-single-branch as using --depth defaults to --single-branch

Wait a while. This command will download the entire Rockbox source code, which can take a long time depending on the speed of your Internet connection. If you clone the entire repository, there's about 150 MB to download, so over a slower connection figure on it taking up to an hour. On faster connections it should only take a few minutes.

After that, we need to install a few more things. Type sudo apt-get install automake bison build-essential ccache flex libc6-dev libgmp3-dev libmpfr-dev libsdl1.2-dev libtool-bin texinfo and wait for a few more things to be downloaded.

Now, type cd rockbox/tools. Type chmod +x, then type sudo ./ You will be asked to choose the platform you want to compile for. Most users will want ARM and only need to compile a. If you are unsure, type s m a i r to compile all archs. This will prepare your computer to be able to build for all Rockbox targets. However, this will take much longer to prepare than a single platform, so if you know your target, just type the corresponding letter and continue.


Type cd ~/rockbox. The last line in your terminal should read username@computername:~/rockbox$ . Type mkdir build (mkdir means "make directory"), then type cd build . Your current line should say username@computername:~/rockbox/build$ Now type ../tools/configure - make sure you include those two periods.

A table of ALL the devices Rockbox supports will come up, and each device will have a number beside it. Simply type the number for the device you want to make a build for.

Next, you'll see a few choices for the type of build you'd like to make. Let's make a normal build: type n. Wait for a few seconds. When it says "Created makefile", type make (or make -j for a multicore system) and wait. Type make zip to prepare a and wait a little more. That's your build, ready to install onto a real device. Use it like you would for a manual update (that is, unzip its contents into the root of your device, overwriting old files if necessary). When it's done, congratulations! You've compiled your own copy of Rockbox, and made a .zip file like the one you download from the website!


If you receive the error:
  • "ROCKBOXDEV: libtool is required for this script to work."
  • "ROCKBOXDEV: Please install libtool and re-run the script."

Do: sudo ln -s /usr/bin/libtoolize /usr/bin/libtool

More information/ Going Further

When you're ready to take these skills further and apply patches, take a look at . Just be careful about which ones you add. Many patches break things.

You can consider compiling a simulator, too. Read more here:

If you want, you can read the tutorial at and learn how to use the command line to the fullest.

One last thing: It's a good idea to update your copy of the source tree every once in a while. Just open a terminal and type cd rockbox, then git pull --rebase. Your copy of the sources will be updated (and if you've applied patches, the program will try to keep them in, so you won't have to repatch).

Happy hacking!
r32 - 07 Nov 2017 - 06:38:28 - HaydenPearce?

Copyright by the contributing authors.