This project is part of the Google Summer of Code 2010 project.
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 (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 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
- Play sound Write drivers using JNI calls where needed
- Write drivers Play sound using JNI calls where needed
- 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: http://repo.or.cz/w/kugel-rb.git I probably will be posting bigger patches for reviewing at FS#11234
I'm working on the android port now. I've implemented an lcd and tick task driver already, but there's still a lot of work to do. Currently I'm working with some sort of bootloader that acts as a playground and allows me to add missing stuff in steps.
- 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?.
-- ThomasMartitz - 2010-05-01
Copyright © by the contributing authors.