have a look at:
http://www.mkezx.org/
i hope this is what you are looking for.
if you do need the content from the website you posted, i have to digg deep in my harddisks.
I want to start with build a toolchain and can't find ezx-devkit and ezx-crosstool becource the site http://lsb.blogdns.net/ezx-devkit is offline.
Where can I get this?
Rolf
have a look at:
http://www.mkezx.org/
i hope this is what you are looking for.
if you do need the content from the website you posted, i have to digg deep in my harddisks.
here is a samr7 ezx-crosstool and dev-ezx package.
and here is a build instruction from samr7
Welcome to samr7's unofficial EZX development kit!
This kit is intended to support the creation of native GUI applications
for Motorola E680i and A780 Linux phones.
Materials:
- This development kit archive
- Cross-compiler (see below)
- A Motorola A780 or E680i Linux phone
Procedure:
1. Set up an Xscale/iWMMXt cross-compiler based on GCC 3.3.
This is quite tedious, and I'm not going to document the whole procedure
here. If you use some version of Linux, the best recommendation is to
download the ezx-crosstool package from:
http://lsb.blogdns.net/ezx-crosstool/
This includes all of the required patches, including VFP soft-float and
iWMMXt CPU support, and should most closely approximate the conventions
and ABI used by the compiler Motorola used to build the firmware.
Other toolchain-related resources:
Leprechaun's guide to E680 programming: http://marcus.bluetroll.se/e680/
Dan Kegel's crosstool: http://kegel.com/crosstool/
2. Copy the EZX library binaries to your development system.
Copy the full contents of /usr/lib from your phone to dev-ezx-0.2.0/lib.
When finished, you should have the following files:
dev-ezx-0.2.0/lib/ezx/lib/libqte-mt-xscale-r.so.2.3.6
dev-ezx-0.2.0/lib/ezx/lib/libezxappbase-xscale-r.so.1.0.0
dev-ezx-0.2.0/lib/ezx/lib/libezxjpeg-xscale-r.so.1.0.0
These can be found on the root filesystem of your A780 or E680i, in the
/usr/lib directory. There are no sources available, and distributing
binaries would infringe upon Motorola's copyrights. As an owner of one
of these phones, you would exercise your fair use rights to copy these
libraries to your PC for development purposes. If you need help acessing
/usr/lib on your phone, search around the MotorolaFans.com forum.
3. Build the "moc" program for your host platform.
This is the meta-object compiler, used for building Qt applications
that make use of signals and slots. This program is specific to
Qt 2.3.6. If you have one that came with your OS, it probably won't
suffice. I have attempted to simplify this. In the "moc" directory you
will find the sources from Qt/Embedded 2.3.6 for the moc program, and a
Makefile that should build it. This has been tested on Fedora Linux and
on Cygwin, but is unlikely to work on all platforms.
Build the "moc" program, and ensure that the resulting binary is located
at dev-ezx-0.2.0/moc/moc.
4. Build helloworld using "make" in the helloworld directory.
Add the directory that contains your cross-compiler to $PATH. If your
cross-compiler has a prefix other than arm-linux-{gcc,g++}, edit the
Makefile to reflect this.
The makefile is a terrible mess, but should suffice. You might need
to edit the Makefile in other ways depending on how your environment is
set up.
When finished, you should have a helloworld/helloworld binary. You
should be able to copy this binary to the filesystem on your phone and
execute it from a telnet session. If it complains about missing
directories, perhaps you need to set up the environment? Type the
following:
. /home/native/.profile
This is useful for debugging. For more casually distributing and running
the program, you'll want to package it.
5. Package
To create the installable .mpkg, just "make dist" from the helloworld
directory. You can copy the mpkg file to your phone and install it by
tapping it from the "Files" application.
Some firmware revisions have the Qt application installer disabled. If
this is the case, tapping the helloworld.mpkg will do absolutely nothing.
We guess that this feature is enabled by flex bit 0xA2 in
/usr/setup/ezx_flexbit.cfg. You can't edit this file by hand, but you
might be able to find a setup flash on the MotorolaFans.com board.
Good luck!
Visit my Blog here.http://my.opera.com/eakrin
EZX-devkit from Sam Revich is again offline so I decided to write down the contents of the page and add the files.
Furtheremore I write down some additonal informations.
EZX-crosstool
This is my tool for building a cross-compiler toolchain for Motorola A780/E680i EZX phones. It is an adaptation of Dan Kegel's crosstool system, with only the relevant portions extracted, and some custom patches added. It should produce a toolchain built from gcc-3.3.6/glibc-2.3.2/binutils-2.15. It can be compared to Leprechaun's E680 toolchain system, but offers improved floating point compatibility.
Current version: 0.6
Instructions:
I will report success building a toolchain on Fedora Core 4 x86 and Gentoo 2005.1 x86. There is an inconsequential hiccup at the end, attempting to build hello.c, where it fails because PATH_MAX is undefined. This can be safely ignored.
- Download ezx-crosstool, current version 0.6
- Extract
- Possibly edit the "build.sh" script's RESULT_TOP variable to reflect where you would like the toolchain to be placed when complete.
- Invoke the "build.sh" script.
Evidence suggests that Motorola used a thoroughly hacked Montavista compiler to build the EZX firmware. This compiler was supposedly based on GCC 3.3, but with a number of advanced features added pertaining to the Intel PXA270 processor. These include support for the newer VFP floating point coprocessor, a software VFP implementation -- PXA270 lacks an FPU -- and support for the "Intel Wireless MMX Technology" iWMMXt coprocessor that is present on the PXA270. All of these were eventually adopted by core GCC, but in much later versions.
ezx-crosstool contains three major GCC patches, to try to most closely replicate the Montavista compiler:
The iWMMXt patch contained within ezx-crosstool is a backport of the initial public submission of the iWMMXt support patch by Nick Clifton, plus a handful of bug fixes.
- VFP-softfloat support
- iWMMXt coprocessor support + bug fixes
- Little endian bug fix
Why is this seemlingly frivolous iWMMXt feature so important? Can't GCC function without something with such a marketing-oriented name? Apparently, building for -mcpu=iwmmxt alters the calling conventions in ways that render code incompatible with that built with -mcpu=armv5te.
Rather than performing a messy backport of the iWMMXt support, or searching for simpler options to get binary compatibility, why not just go to GCC 3.4? This is difficult because the EZX libraries are linked against libstdc++.so.5. GCC 3.4 includes a different C++ ABI, libstdc++.so.6. The older C++ library would need to be ported forward to GCC 3.4 in order to use it, and that seemed like a much more complicated task than backporting the iWMMXt CPU support.
Disclaimer: I am not a GCC maintainer, and am not competent to maintain any particular backend or frontend. In this task, I am acting as a patch monkey. The set of patches contained within ezx-crosstool are what seemed to work for my purposes, which included building many complicated C++ Qt applications that link against Motorola's libqte.
SDK
This is my attempt at an unofficial SDK for Motorola EZX phones. This kit was created with the A780 in mind, but resulting applications reportedly work with E680i as well. It includes all required components from Trolltech Qt/Embedded 2.3.6 with appropriate patches applied, and a helloworld example program.
Current version: 0.2.0
To use this, you need:
Please see the incldued file BUILD-INSTRUCTIONS.
- A GCC 3.3 ARM/Xscale/iWMMXt compiler. There aren't very many binary packages of this, as it would be extremely difficult to support all the environments that people want to use. This can be built from source on a Linux machine using ezx-crosstool.
- An A780 or E680i, as a source of library binaries.
Documentation
The EZX version of Qt/Embedded is not substantially different from Trolltech Qt/Embedded 2.3.6. This package therefore includes no documentation specifically for Qt/Embedded other than the header files. For good documentation on Qt/Embedded, consult the Trolltech site.
This work was derived through unpleasant reverse-engineering of the firmware from a Motorola A780 phone. While the Qt library is well-documented and exemplified, the changes made by Motorola are not, and neither are any of Motorola's other proprietary EZX libraries. Determining proper use of the other libraries is the burden of the developer, at least at present.
Installation & usage
Link: german tutorial
Needed packages:
Libraries from phoneCode:bison flex patch wget byacc build-essential (gcc, g++, make) [autoconf automake libtool]
Extract crosstool to opt.Code:cd /usr/lib tar zcvf /mmc/mmca1/ezx-lib.tar.gz *
Build the crosstool.Code:tar xfvj ezx-crosstool-0.6.tar.bz2
Extract devkit and libraries to optCode:./build.sh
Build the moc binary.Code:tar xfvz dev-ezx-0.2.0.tgz tar xfvz ezx-lib.tar.gz -C /opt/dev-ezx-0.2.0/lib/
(optional) Install qmake and qmake conf from blackhawkCode:cd /opt/dev-ezx-0.2.0/moc make
http://www.motorolafans.com/forums/d...x-working.html
Install qt3-dev-tools and copy and rename /usr/bin/qmake-qt3 to /opt/dev-ezx-0.2.0/qt/binCode:cp dev-ezx-0.2.0-qmake.tar.gz /opt/dev-ezx-0.2.0 cd opt/dev-ezx-0.2.0 tar xfvz dev-ezx-0.2.0-qmake.tar.gz
Helloworld example from blackhawk with qmake.
Maybe you need to tweak the setenv.sh for your environment.
Copy Helloworld to the phone and open a terminal.Code:source setenv.sh qmake helloworld.pro make arm-linux-strip helloworld
(optional) tmake instead of qmakeCode:. /home/native/.profile ./helloworld
Move tmake and progen from /opt/dev-ezx-0.2.0/qt/tmake-1.13/bin/ to /opt/dev-ezx-0.2.0/qt/binCode:cp tmake-1.13.tar.gz /opt/dev-ezx-0.2.0/qt cd /opt/dev-ezx-0.2.0/qt tar xfvz tmake-1.13.tar.gz
Tweak the tmake.conf in /opt/dev-ezx-0.2.0/qt/tmake-1.13/lib/qws/linux-ipaq-g++ like this example
Add tmake path to setenv.shCode:# # $Id: tmake.conf,v 1.1 1999/11/08 03:06:27 warwick Exp $ # # tmake configuration for linux-g++ using the arm-linux-g++ crosscompiler. # TEMPLATE = app CONFIG = qt warn_on release TMAKE_ARM_INCDIR = $(CROSSTOOL_DIR)/gcc-arm-iwmmxt/gcc-3.3.6-glibc.2.3.2/arm-linux/arm-linux/include TMAKE_ARM_LIBDIR = $(CROSSTOOL_DIR)/gcc-arm-iwmmxt/gcc-3.3.6-glibc.2.3.2/arm-linux/arm-linux/lib TMAKE_CC = arm-linux-gcc TMAKE_DASHCROSS = -arm TMAKE_CFLAGS = -pipe TMAKE_CFLAGS_WARN_ON = -Wall -W TMAKE_CFLAGS_WARN_OFF = TMAKE_CFLAGS_RELEASE = -O2 -mcpu=iwmmxt -mtune=iwmmxt TMAKE_CFLAGS_DEBUG = -g TMAKE_CFLAGS_SHLIB = -fPIC TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses TMAKE_CFLAGS_THREAD = -D_REENTRANT TMAKE_CXX = arm-linux-g++ TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -DQWS -fno-exceptions -fno-rtti TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC TMAKE_CXXFLAGS_THREAD = -D_REENTRANT TMAKE_INCDIR = $$TMAKE_ARM_INCDIR TMAKE_LIBDIR = $$TMAKE_ARM_LIBDIR TMAKE_INCDIR_X11 = TMAKE_LIBDIR_X11 = TMAKE_INCDIR_QT = $(QTDIR)/include $(EZXDIR)/include TMAKE_LIBDIR_QT = $(DEVDIR)/lib -L$(EZXDIR)/lib TMAKE_INCDIR_OPENGL = /usr/X11R6/include TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib TMAKE_LINK = arm-linux-g++ TMAKE_LINK_SHLIB = arm-linux-g++ TMAKE_LFLAGS = -Wl,-rpath-link,$(EZXDIR)/lib,-rpath-link,$(EZXDIR)/lib/inputmethods TMAKE_LFLAGS_RELEASE = TMAKE_LFLAGS_DEBUG = TMAKE_LFLAGS_SHLIB = -shared TMAKE_LFLAGS_SONAME = -Wl,-soname, TMAKE_LFLAGS_THREAD = TMAKE_RPATH = -Wl,-rpath-link,$(EZXDIR)/lib,-rpath-link,$(EZXDIR)/lib/inputmethods TMAKE_LIBS = TMAKE_LIBS_X11 = TMAKE_LIBS_X11SM = TMAKE_LIBS_QT = -lezxappbase-xscale-r -lqte-mt-xscale-r -lezxjpeg-xscale-r -lezxnotification-xscale-r TMAKE_LIBS_QT_THREAD = -lezxappbase-xscale-r -lqte-mt-xscale-r -lezxjpeg-xscale-r -lezxnotification-xscale-r TMAKE_LIBS_OPENGL = TMAKE_LIBS_THREAD = -lpthread LIBS += -L${DEVDIR}/lib -lezxappbase-xscale-r -lqte-mt-xscale-r -lezxjpeg-xscale-r -lezxnotification-xscale-r TMAKE_MOC = $(QTDIR)/bin/moc TMAKE_UIC = $(QTDIR)/bin/uic TMAKE_AR = arm-linux-ar cqs TMAKE_RANLIB = TMAKE_TAR = tar -cf TMAKE_GZIP = gzip -9f
Build example with tmakeCode:export TMAKEPATH=$QTDIR/tmake-1.13/lib/qws/linux-ipaq-g++
Content from samr7_crosstool_sdk.zipCode:source setenv.sh progen -o helloworld.pro tmake -o Makefile helloworld.pro
dev-ezx-0.2.0.tgz
dev-ezx-0.2.0-qmake.tar.gz
ezx-crosstool-0.6.tar.bz2
tmake-1.13.tar.gz
-------------------------------------
In any apple is a worm. Through each window flies a bug.
That's why I take Linux, because what does not fly can not crash.
Very great work Halftux!!
Much appreciate this guide
I know that by these days our EZX phones are kind of an antiqueBut it is awesome to still being able to squeeze more juice out of them!
But I am having some issues building the crosstool in Ubuntu 10.04. I will post today the error I get on the console in case somebody can help me solve the problem.
Thank you
With ubuntu there is a common gcc error.
I think since ubuntu 9.x there is gcc 4.3.2 installed you can keep this but also install gcc 4.1 with synaptic. After that make a new symlink.
sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc
Another point is /bin/sh points maybe to dash and not to bash.
check: ls -la /bin/sh
change:
sudo mv /bin/sh /bin/sh.old
sudo ln -sf bash /bin/sh
Now you can try to build the crosstool again. If this will not fix you problem please post your error message.
Error reports:
http://blog.csdn.net/keensword007/ar...9/4835569.aspx
http://magyar-a780.blogspot.com/2010...-forditas.html
-------------------------------------
In any apple is a worm. Through each window flies a bug.
That's why I take Linux, because what does not fly can not crash.
Thank you very much for these tips. I also asked the guy who built Cherokee web server for the ming using the crosstool and pointed me to the GCC version issue too.
I will try this one as well.
Anyway I will paste here part of the compilation output including the error, so if somebody else searches for it can find this post
Is there any way I can avoid replacing the symlink to gcc? Some environment variable I could set or the like?Code:In file included from /usr/include/fcntl.h:205, from /opt/samr7_crosstool_sdk/ezx-crosstool-0.6/build/arm-linux/gcc-3.3.6-glibc-2.3.2/gcc-3.3.6/gcc/system.h:208, from /opt/samr7_crosstool_sdk/ezx-crosstool-0.6/build/arm-linux/gcc-3.3.6-glibc-2.3.2/gcc-3.3.6/gcc/collect2.c:30: In function ‘open’, inlined from ‘collect_execute’ at /opt/samr7_crosstool_sdk/ezx-crosstool-0.6/build/arm-linux/gcc-3.3.6-glibc-2.3.2/gcc-3.3.6/gcc/collect2.c:1575: /usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments make[1]: *** [collect2.o] Error 1 make[1]: Leaving directory `/opt/samr7_crosstool_sdk/ezx-crosstool-0.6/build/arm-linux/gcc-3.3.6-glibc-2.3.2/build-gcc-core/gcc' make: *** [all-gcc] Error 2
I would also want to know how can I build (once crosstool be working) new kernel modules. Like the ext3, af_packet, etc, that mkezx project built and fit perfectly with the sotck kernel that came with the phone original firmware. I know it might not be a trivial task...but I would love to try.
BTW cherokee for the ming works also for A780. I compiled also the latest version with the admin tool and different python versions. But the admin tool is not fully working and I dont know why.
I dont know but when you compiled the crosstool successful, you can exchange the gcc symlink to the original one.
In principle you need to change the .config file to your needs and compile. In some cases you need to add some code or patch the source (like for bluez).
Howto and link to files (24mb Kernel):
http://wiki.openezx.org/Kernel_hacking_-_linux-2.4
Mini Howto (maybe you need to change some folders in the patches):
tar xfvj a780-e680-linux.tar.bz2
source setenv-a780.sh
patch -p0 < mux_cli-for-2.4.20.patch
patch -p0 < fix-ezx-button-includes-for-2.4.20.diff
patch -p0 < fix-make-dpm-compile.patch
patch -p0 < fix-ptrace-include-for-2.4.20.diff
patch -p0 < ezx-mmc_driver.diff
copy .config to the directory of the kernel
make ARCH=arm CROSS_COMPILE=arm-linux- oldconfig
make ARCH=arm CROSS_COMPILE=arm-linux- dep
make ARCH=arm CROSS_COMPILE=arm-linux- zImage
make ARCH=arm CROSS_COMPILE=arm-linux- modules
Make modules are only needed if you want to compile new modules.
The small-framebuffer-logo.patch removes the boot animation.
The usb-rootfs.patch can be useful when booting from external flash storage.
Some additions to my post from llg:
For mkezx:
In mkezx you can find rules, config and patches. You can use these method also on samr7 crosstool.
mkezx-0.9.20\packages\linux-source-a780
mkezx-0.9.20\packages\linux-headers-2.4-ezx
mkezx-0.9.20\packages\linux-headers-2.4-ezx\patches
But here it uses an other Kernel source. However I had problems with the kernel source on an A780 with GPS (maybe I did something wrong who knows).
(30mb Kernel) http://heanet.dl.sourceforge.net/sou...ernel_2.tar.gz
-------------------------------------
In any apple is a worm. Through each window flies a bug.
That's why I take Linux, because what does not fly can not crash.
Hey it worked!
But I'm stucked againWhen I try to compile the helloworld-qmake example, I followed all the steps but get this output:
I had to edit setenv.sh to fit my paths. It seems to me that it is not finding some library. So I added to $PATH this dirCode:christo@Drusilla:/opt/samr7_crosstool_sdk/dev-ezx-0.2.0/helloworld-qmake$ make arm-linux-g++ -Wl,-rpath-link,/opt/samr7_crosstool_sdk/ezx-crosstool-0.6/gcc-arm-iwmmxt/gcc-3.3.6-glibc-2.3.2/arm-linux/arm-linux/lib -Wl,-rpath-link,/opt/samr7_crosstool_sdk/dev-ezx-0.2.0/helloworld-qmake/../qt/lib -o helloworld helloworld.o -L/opt/samr7_crosstool_sdk/dev-ezx-0.2.0/helloworld-qmake/../qt/lib -L/opt/samr7_crosstool_sdk/dev-ezx-0.2.0/helloworld-qmake/../ezx/lib -lezxappbase-xscale-r -lqte-mt-xscale-r -lezxjpeg-xscale-r -lezxnotification-xscale-r -lqte-mt /opt/samr7_crosstool_sdk/ezx-crosstool-0.6/gcc-arm-iwmmxt/gcc-3.3.6-glibc-2.3.2/arm-linux/lib/gcc-lib/arm-linux/3.3.6/../../../../arm-linux/bin/ld: cannot find -lezxappbase-xscale-r collect2: ld returned 1 exit status make: *** [helloworld] Error 1
cause it is full of libs and thought maybe the compiler was not seeing it. But still no luck, the same output.Code:/opt/samr7_crosstool_sdk/dev-ezx-0.2.0/lib/ezx/lib
This is my setenv.sh file:
Thanks again!Code:#!/bin/bash export WORKING_DIR=`pwd` export EZXDIR=$WORKING_DIR/../ezx export QTDIR=$WORKING_DIR/../qt export QMAKESPEC=$QTDIR/mkspecs/qws/linux-ipaq-g++ #for leprechaun's toolchain user #export TOOLCHAIN_DIR=/opt/toolchain #export PATH=$TOOLCHAIN_DIR/arm-linux/gcc-3.3.2-glibc-2.3.2/bin:$QTDIR/bin:$PATH #export LFLAGS_EXTRA=" -Wl,-rpath-link,$TOOLCHAIN_DIR/arm-linux/gcc-3.3.2-glibc-2.3.2/arm-linux/lib " #for samr7's crosstool user export CROSSTOOL_DIR=/opt/samr7_crosstool_sdk/ezx-crosstool-0.6 export PATH=$CROSSTOOL_DIR/gcc-arm-iwmmxt/gcc-3.3.6-glibc-2.3.2/arm-linux/bin:$QTDIR/bin:/opt/samr7_crosstool_sdk/dev-ezx-0.2.0/lib/ezx/lib:$PATH export LFLAGS_EXTRA=" -Wl,-rpath-link,$CROSSTOOL_DIR/gcc-arm-iwmmxt/gcc-3.3.6-glibc-2.3.2/arm-linux/arm-linux/lib "![]()