Assuming you have already built the toolchain and are able to build rockbox from the command line. If not see
http://www.rockbox.org/wiki/DevelopmentGuide Install Eclispe and CDT pluginInstall eclispe
http://www.eclipse.org/install CDT plugin
http://www.eclipse.org/cdt/downloads.phpor
Install C/C+ flavor eclipse
http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr1Creating working directories for EclispeCreate a working directory i.e. ~/working/
mkdir ~/working
Download the rockbox sources into ~/working/rockbox/cd ~/working
git clone git://git.rockbox.org/rockbox
Creating build directories for EclispeWe want to create a build directory outside of the rockbox sources directory, this is contrary to what is stated on
http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling , but doing it outside will keep our eclispe projects nice, clean and neat. Also it gives us the ability to have more than one target across multiple directories.
Lets assume we want to build the sansa e200 target. We would create a directory and execute the configure script in a directory just outside of the rockbox sources and inside our working directory.
cd ~/working
mkdir sansa-e200
cd sansa-e200
../rockbox/tools/configure
We would choose option "50" for target Sansa e200 then "N" for a normal build. This sets up the Makefile we need to build the target in eclipse.
Import the rockbox sources into eclipseOpen eclipse and choose a directory for your workspace NOT the working directories we made earlier i.e. "~/workspace"
Once eclipse has started up completely, choose "File > Import", and at the next dialog window navigate to C/C++. Then choose "Existing Code as Makefile Project" and click Next. On the next window give the project a name i.e. "Rockbox". Then click Browse, next navigate into the "~/working/rockbox/" directory and click OK. Now, uncheck the C++ box under languages, only leaving C checked. Then under Toolchain for "Indexer Settings" leave it as <none>. Finally click Finish, this will pull the rockbox project into eclipse.
Import the build directory and Makefile into eclipseNow to import our targets build directory. Once again choose "File > Import" and again at the next dialog window navigate to C/C++. Then choose "Existing Code as Makefile Project" and click Next. On the next window give the project a name i.e. "SANSA-e200" then click Browse. Next navigate into the "~/working/sansa-e200/" directory then click OK. Now uncheck the C++ box under languages, leaving only C checked. Then under Toolchain for "Indexer Settings" leave it as <none>. Finally click Finish, this will pull the target build directory into eclipse.
These last two steps create a build target for eclipse to work withIn the package explorer inside eclipse, Right click the target project i.e. SANSA-e200 and choose "Make Targets > Create..". On the "Create Make Target" dialog fill in a name "sansa-e200". Under Make target uncheck "Same as the target name" and remove the text from the "Make Target:" box so that it is blank. Leaving all other options at default, click OK.
Once again in the package explorer from eclipse, Right click the target project i.e. SANSA-e200 and choose "Make Targets > Create..". On the Create Make Target dialog fill in a name "zip". Leaving all other options at default, click OK.
Building rockboxNow to build, Right Click your target and choose "Make Targets > Build.." highlight SANSA-e200 and click Build. The output is shown in the console. Once that has been completed successfully, once again Right Click your target and choose "Make Targets > Build.." this time choose "zip" and click Build. Once that has completed successfully your rockbox.zip file can be found in your targets directory. i.e. ~/working/sansa-e200
This method can be used to create multiple target directories to be imported and built with eclipse just create them all with different target names and directories.