This project is part of the Google Summer of Code 2010 project Abstract

Project Plan

Currently working on

Achievements Project name Student Mentor Backup mentor Build Rockbox as an application to run under a host platform Thomas Martitz (kugel) Frank Gevaerts (gevaerts) Peter D'Hoye (petur) Abstract This Google Summer of Code project aims to enable Rockbox to be build and used as an application. It shall run under a hosted platform, preferably a mobile one like Android. Before, to achieve this goal, a lot of changes have to be made to the application be an actual port, most importantly building a framework (including getting rid of the need to use SDL) to enable easy & rapid porting of the application to any platform. This Google Summer of Code project aims to enable Rockbox to be build and used as an application. It shall run under a hosted platform, preferably a mobile one like Android. Before, to achieve this goal, a lot of changes have to be made to the application be an actual port, most importantly building a framework (including getting rid of the need to use SDL) to enable easy & rapid porting of the application to any platform. In 2008, there has been an attempt for this task ( In 2008, there has been an attempt for this task ( RockboxAsAnApplication ). Even though it didn't succeed, the achievements of it will help this year's attempt. The ultimative goal is to lay the ground work for Rockbox to function as an application. The ground work is the part which makes this task difficult as it means resolving some assumptions throughout the Rockbox source, making Rockbox work together with an underlying OS better and to integrate the integration port into the source as if it would be a an actual port (which it in fact is). The ultimative goal is to lay the ground work for Rockbox to function as an application. The ground work is the part which makes this task difficult as it means resolving some assumptions throughout the Rockbox source, making Rockbox work together with an underlying OS better and to integrate the integration port into the source as if it would be a an actual port (which it in fact is). Project Plan The first milestone has a more priority. It's considered the main achievement of this project would be laying the ground work for an application framework. Depending on that, porting to a mobile device should be relatively painless, but still rather challenging as there can always be unknown hurdles that one cannot imagine now and that are hard to overcome, so there's a possibility the port to a mobile platform will not succeed. So, the success of project as a whole is not depending on that if the main milestone is considered good enough. The first milestone has a more priority. It's considered the main achievement of this project would be laying the ground work for an application framework. Depending on that, porting to a mobile device should be relatively painless, but still rather challenging as there can always be unknown hurdles that one cannot imagine now and that are hard to overcome, so there's a possibility the port to a mobile platform will not succeed. So, the success of project as a whole is not depending on that if the main milestone is considered good enough. Build an SDL-based application with application-specific defaults Create an application target in configure

Move stuff from uisimulator to the target tree and split out target-simulator specific stuff

Revisit existing simulator-related conditional compilation, introduce it for the application where needed, i.e. make the application compile without defining simulator.

Link OS libraries (e.g. C library) instead of our replacement functions

Build and compile an SDL application based on an existing simulator target.

Create a SDL application with application specific settings and defaults. The SDL application can be built and provided as a downloadable zip file which can be unzipped and run on a PC/my mini2440 board (Note: For a proper application on the single zip approach in not suitable on all platforms. Work needs to be done to install it properly [e.g. the binary under /usr/local/bin and the config in $HOME]) Port to a mobile device (Android-based one) Compile and run the SDL application, unless it'd take too much time to make it work since it's not a primary objective to run it using SDL( - abandoned since getting it running without SDL went faster than expected)

- abandoned since getting it running without SDL went faster than expected) Write drivers using JNI calls where needed

Play sound

Replace SDL by operating system provided functions and libraries (might consider portable and lightweight 3rd party libraries if the operating system provided stuff is not sufficient; those would be possibly shipped with Rockbox) Currently working on My current status can always be viewed here: My current status can always be viewed here: http://repo.or.cz/w/kugel-rb.git I probably will be posting bigger patches for reviewing at FS#11234 Coding period is finished, and I personally consider it a full success. Now working on a bit of documentation. Achievements Coding period is finished, and I personally consider it a full success. Now working on a bit of documentation. I ported GNU Pth threads during the qualification task. This means we are not depending on our thread implementation which runs only on a few architectures. UPDATE: Will probably be committed into SVN soon.

I replaced the SDL-based pcm backend of the simulator with an alsa based one, which is very close to the Linux Kernel. Another SDL dependency removed.

r25843 and r25844 made Rockbox follow the posix API a bit more (though were not completely done yet). This makes the code more portable and easier to interwork with host system libraries.

r25850 moved standard library files into it's own folder, making it easier for RaaA to (dynamically) link the host's C library. UPDATE: Since r26019 the simulator uses the host's C library completely.

r26065 moved the SDL specific files of the simulator into the target tree (firmware/target/hosted/sdl), effectively creating an SDL port. The first RaaA version will use that port.

r27019 replaced some #ifdef SIMULATOR with #if CONFIG_PLATFORM PLATFORM_HOSTED (and equivalently) so that some code that's used in the sim can be used in RaaA as well (I made some assumptions to reduce the work needed for this task: RaaA will not act as simulator (so some debug code remains for the sim), will not have recording soon (no HAVE_RECORDING) even though it's a mid-term goal of course, will not imitate a target, and it will have a color bitmap lcd; this means I could ignore some #ifdefs that do not apply for RaaA)

r27310 added an 320x240 SDL target to svn. Compile it, and run it with --root . from the build dir.

I've implemented get_user_file_path() to evaluate suitable paths at runtime for RaaA.( r27656)

r27668: Committed the current android port. Rockbox is usable (plays music, saves configuration, touchscreen works too), but the commit message mentions a few problems that need to be tackled still

The most serious bugs are gone and with the two cabbiev2 ports (320x480 and 480x800), Rockbox on Android is quite usable. -- -- ThomasMartitz - 2010-05-01 Log In r13 - 14 Aug 2010 - 13:02:28 - ThomasMartitz Copyright © by the contributing authors.