---+!! Gmini Hacking for Not So Dummies %TOC% ---++ The big picture Basically, there's no "big picture". Here an (edited) excerpt of a conversation where I explain why: <verbatim> _alx_ How long did it take for you to get inside this project jyp What do you mean ? _alx_ I mean to get confirm with all the routines and programm stuff and hardware details jyp I'm not confirm with "everything" jyp What I mean is, this is not a project where you go top down from specs to implementation jyp The very goal of the project is to understand what's going on jyp implementing bits here and there until you get the picture _alx_ So you take the existing firmaware code and try to understand? I thought you were doing a new firmware! jyp Both are done at the same time, in parallel. jyp But... the implementation part is perhaps 1% of the work _alx_ so, how long did it takes you to make the first step? I mean understanding the code doing your first modification and get a result? jyp We're basing our work on Rockbox. jyp Actually the implementation part equals porting rockbox. jyp The first thing implemented was the lcd driver... It was done in a few hours jyp ... because our lcd is very similar to another lcd already supported by Rockbox _alx_ lcd-driver: I guess you got the modification that are needed to be done out of the original archos firmware!? jyp Mostly, yes. (Also by running little test programs on the Gmini) _alx_ ok, I understand. _alx_ so there are little parts that can be done by different persons and the parts don't depend on each other (mostly)? jyp true </verbatim> ---++ How do I start? Best is to pick a task you'd like to do. Please, ask out on irc (#gmemu, or #rockbox, on freenode); we'll give you directions on how to start, and it will avoid duplicating work too. Before you start, you will also need the tools... ---++ Tools This page describes how to setup a full environnement for contributing to the Gmini port. This includes * A compiler for to generate Code on the gmini * Tools to create your own firmware upgrades * A Gmini Emulator * An environment for reverse-engineering of the Archos firmware * Various test programs to run on Gmini devices. First you'll need a unix-like OS, (preferably linux), with gcc, QT and QT tools (moc) Then you'll need a compiler for the CalmRISC16 architecture. See CrossCompiler for instructions. Fetch gemoss from sourceforge cvs. <verbatim> cvs -d:pserver:email@example.com:/cvsroot/gemoss login cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/gemoss co gemoss </verbatim> Compile it: <verbatim> cd gemoss aclocal autoconf automake -a autoheader ./configure GMINIMODEL=.... LOADADDRESS=... make </verbatim> GMINIMODEL is either GMINISP, GMINI100 or GMINI200. LOADADDRESS is the address where code will be flashed in the gmini, don't do anything stupid like putting a generated aaz file onto your device without triple-checking the address is correct. As of today we have NO WAY to recover a badly flashed gmini. I repeat: flashing at a bad address will overwrite Archos' code, making it impossible to flash back the original firmware. This said, the following table will tell you what to put: After publication of the wiki and a couple bricked gminis, here's a table of load addresses tested correct by users: | *Model* | *Firmware version* | *Flashing target address* | | 120 | <nop>FirmwareGmini100_v1100 | 0x77000 | | SP | <nop>FirmwareGminiSP_V130 | 0x70000 | | Other | Other | UNKNOWN! ASK! | In any case, you'd better understand very well what this means and why you should put the addresses above. After all someone might just have edited this wiki page with incorrect information. At this point, you can try to run the archos firmware inside the emulator. Don't worry if the display is reversed. <verbatim> cd reverse make gui run </verbatim> You can also run some of our own code inside the emulator <verbatim> cd testbed make adc.emu run </verbatim> You are now ready for serious hacking. You'll need to setup a hook inside your gmini in order to run code on it. This is explained here: http://www.donat.org/archos/wiki/doku.php?id=hook_setup At this point, you should know which address to put as LOADADDRESS. Reconfigure and remake. Remember what it said about no recovery? Then you're ready to flash your gmini. NOTE: As of today we don't have a LCD driver for the 200 series. There's probably no point to go further if you have a 2xx. Otherwise... Plug the usb... <verbatim> mount /mnt/usb/ make adc.aaz cp adc.aaz /mnt/usb/whatever.AAZ umount /mnt/usb/ </verbatim> WAIT for the unmount to finish. Plug the DC in. This is the point of no-return. Instead of unplugging the usb, you can always remove the AAZ file from the gmini disk. Back to business... while whatching the gmini display, unplug the usb. It says something gets updated. Battery guy... Switch on; play a .wav file... Your code should run. * If this doesn't work as expected, come tell us on IRC, #gmemu (freenode), we can help you, hopefully ;) * If you made it here alone, come tell us on IRC, #gmemu (freenode), you can help us, hopefully ;)
r11 - 30 Sep 2007 - 18:10:39 -
Copyright © by the contributing authors.