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

Search | Go
Wiki > Main > RockboxDevelopment > InterixDevelopment (r2)

Setting up a Rockbox development environment using Interix


This is a description of how to set up a development environment using Interix. Interix is also known as Microsoft Services for Unix (SFU) resp. Microsoft Services for Unix Applications (SUA).

%W% WARNING: This method is not recommended for users unfamiliar with the Unix command line. It is meant as an alternative to using Cygwin for users who want to experiment. Also, this method is only usable on the Windows versions stated in step 1, other versions won't work.

Note that this environment is currently limited to making target builds. No simulator support, SAPI voice file build support, or manual build support yet. SAPI support will be added soon (requires adapting

Step 1: Download the SFU main package and required hotfixes

For Windows 2000 Professional, Windows 2000 Server, Windows XP Professional, and Windows Server 2003 (non-R2) you will need to download SFU 3.5 from Microsoft. SFU 3.5 is what this description is based on.

Windows Server 2003 R2 includes SUA 5.2, which can be enabled via Software->Add/Remove Windows features. It will prompt to download the tools package after enabling the basic functionality. You will need to adjust the following steps a bit, but the basic method should be the same. Likewise, Windows Vista Business and Ultimate include SUA 6.0.

For SFU 3.5, you will also need to request and download the following hotfixes (they're provided free of charge, but you need to give a valid email address):

Step 2: Install the basic environment

infoThe following steps need to be performed as a local administrator!

Run the SFU installer. You need to perform a custom installation, and select the following components:

  • Utilities/Base Utilities.
  • Interix GNU Components/Interix GNU Utilities
  • Interix GNU Components/Interix GNU SDK

Deselect all others. Not selecting UNIX Perl here is on purpose. It's oudated, and we'll install a newer one later.

  • Enable the 2 options "Enable setuid behavior for Interix programs" and "Change the default behavior to case sensitive."
  • User name mapping: just accept the defaults (2 pages)
  • Installation location: it can be installed anywhere, but avoid spaces in the path. This guide assumes C:\SFU
  • Reboot as requested

Now install the 3 hotfixes, in the order given above. Each hotfix requests a reboot after installation. After installing the hotfixes, check whether the following directories exist on the volume where you installed SFU: C:\<long-hexadecimal-number> , C:\temp\ext<NNNN> (there will be two ext<NNNN> folders in temp). These exist because the hotfixes do not clean up properly. Delete them.

Now you need to check and (very likely) fix /etc/resolv.conf to point to your DNS server, otherwise the following steps won't work.

Step 3: Download and install the Interopsystems developer bundle

  • Download the developer bundle from into a directory with no spaces in the path.

infoThe following steps need to be performed as a local administrator!

  • Install the package. It will take some time, and ask a few questions during the process:
    • "An update for this bootstrap contents may be available now... would you like to update now?" Choose "yes"
    • "Would you like to install the X-Server now?" If you do not have Xming installed and want to, install it. It's not needed for rockbox builds, and probably won't be needed for simulator builds once that's supported (we'll probably build native Win32 SDL simulators).
  • Using Windows explorer, go to <C:\Documents and Settings>\All Users\<Start menu>\<Programs>\Windows Services for UNIX (replace parts in <> with the correct values for your language version of Windows), and duplicate the "Korn Shell" shortcut
  • Rename the duplicate shortcut to "Bourne Again Shell", and edit the following properties:
    • Target: C:\WINDOWS\system32\posix.exe /u /c /usr/local/bin/bash -l
    • Comment: Runs the Interix Bource again shell

Step 4: Configure and fix up the environment

infoThe following steps need to be performed as a local administrator! You can use "su" to become Administrator within bash. Since the default shell in Interix is ksh, but you probably want bash, use the following command: su Administrator -c bash

  • Start bash
  • Check whether perl is properly installed: which perl
    If perl isn't found (happened reproducably during my tests) the bundle installer goofed, and you need to fix it: pkg_update -Lr perl
  • Make a symlink so that perl is found where many scripts expect it: ln -s /usr/local/bin/perl /usr/bin/perl
r2 - 06 Oct 2008 - 18:43:19 - MaurusCuelenaere

Copyright by the contributing authors.