Building and installing tools on Motorola's system
Development tools
- strace
The most popular tool for analysing the system is "strace" a system call tracer
You can get it from http://sourceforge.net/projects/strace/ and crosscompile for the OABI motorola system. (man page: http://www.linuxmanpages.com/man1/strace.1.php )
- lsof
Another useful tool developers used for reverse engineering the original linux system is "lsof", (for LiSt Opened Files).
You can get it from http://people.freebsd.org/~abe/ and crosscompile for the OABI motorola system. (man page: http://www.linuxmanpages.com/man8/lsof.8.php )
Getting tools for the original software
- "Doit" is an handy tool, a colection of Makefiles and scripts to build a set of GNU tools that our phone's stock system is lacking...
You can get Doit and the separated package it builds here, or in our svn here.
Doit includes busybox, dropbear, and GNU coreutils, more details here.
To build these tools for an EZX stock system, you need an OABI toolchain (like ezx-crosstools).
After building these tools, you can choose to install them using the MPKG method, by creating a package.
Note that you could also copy them by hand on your phone's filesystem or in the memory card and make them work that way too. You can use telnet or ssh for this.
Also take a look at the NEO-installer (from Rhizods), an alternative "user-friendly package system".
Getting drivers and modules for the original software
Every linux 2.4.17 or 2.4.20 linux kernel's module should be installable on your original phone's system.
Sometimes, there are not in the released kernel tree at motorola sourceforge site, but you can add them in the tree buy copying them from a "vanilla" 2.4.20 kernel, and make them compile. Take also a look at the modules sources on E680's sourceforge project.
Look here to learn how you can compile these modules (you will also need the right toolchain,like ezx-crosstools).
The necessary tools are in the phones stock OS to load modules and install new devices (insmod, mknod...).
NEO-installer can also be used to load the drivers at boot time, installing them on /ezxlocal folder is necessary though. With NEO-installer, you can put any number of scripts in the directory /ezxlocal/download/QTDownLoad/Startup and they will be executed when NEO-Installer starts. Note that they are only called once each time the phone boots even if you run the NEO-Installer script multiple times.
This is what my /ezxlocal/download/QTDownLoad/Startup/modules script looks like:
#!/bin/bash # Load modules for ext2 and ext3 cd /ezxlocal/modules insmod /ezxlocal/modules/jbd.o insmod /ezxlocal/modules/ext2.o insmod /ezxlocal/modules/ext3.o # Mount main Transflash partition mount /dev/mmca1 /mmc/mmca1 # Create device for swap partition and turn it on. mknod /tmp/mmca2 b 243 2 swapon /tmp/mmca2
Note that Neo-installer is not really necessary for this, it's just user-friendly, but is what we could call a "dirty fix" :). You could also backup your root filesystem, then edit the cramfs codegroups and reflash the file (be carefull to not make the cramfs raw image bigger than it was...), this way you could get rid of any workaround and load the drivers properly (the right way, but require to backup and flash your rootfs's mtd).