The Development of native SoftWare under MotoMagx
HowTo - MMNSWD (MotoMagxSWDev)
Version v0.1.0r
2008-05-22
by Abram
For those who are alien to the Development of native SoftWare for our Motorola Z6 Mobiles - here is the Howto. To
be able to start we need to have Linux and Z6 SDK. It should be no Problem to use any Linux Distribution, but the
SDK is 32Bit and wasn't tested on any 64Bit-Distribution, so better use a 32Bit-Linux. Windows-Users can use, for
example, andLinux: >>http://www.andlinux.org/<< My self will examine Ubuntu, Debian and andLinux. Differences with
other Distributions are essentially mounting-Methods to the Program.
The 32Bit-SDK can get taken by a SVN-Client that should be avaible in atmost every Distribution. My self do, for
example, sometimes change something for the Compatibility with ROKR E2. Patches, corrected Variables and Extensions
are Welcome! *cheer* Who make Changes to his SDK can share them with others by uploading them. Who doesn't know what
SVN is should ask Wiki or google for it.
Download and install svn and ncftp:
Code:
#> sudo apt-get install subversion ncftp
Download the SDK:
Code:
#> svn co https://ezx.darktech.org/svn/trunk/arm-eabi
Upload the SDK:
From this Point i presuppose that you have already installed any Linux Distribution and the Network is ready, 'svn'
and 'ncftp' are installed and the SDK is downloaded and extracted to your Home-Directory.
Now let us examine native Programming the Z6 based on the example Z6SnesX (emulator SNES for Z6).
[url]svn co https://ezx.darktech.org/svn/trunk/projects/Z6SnesX[/code]
Here we go! At first let us examine the Makefile. These Lines are very related to the SDK:
Code:
TOOLPREFIX: = /home/abram/z6/arm-eabi
#TOOLPREFIX:= /arm-eabi
#Remember to set TOOLPREFIX to your own specific Path!
QTDIR := $(TOOLPREFIX)/lib/qt-2.3.8
EZXDIR := $(TOOLPREFIX)/lib/ezx-z6
UPLOAD_PATH := /mmc/mmca1/bin/
CC = $(TOOLPREFIX)/bin/arm-linux-gnueabi-gcc
CXX = $(TOOLPREFIX)/bin/arm-linux-gnueabi-g++
LD = $(TOOLPREFIX)/bin/arm-linux-gnueabi-g++
CFLAGS = -pipe -Wall -W -O2 -DNO_DEBUG $(INCPATH)
CXXFLAGS = -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG $(INCPATH)
INCPATH = -I$(QTDIR)/include -I$(EZXDIR)/include -I $(TOOLPREFIX)/arm-linux-gnueabi/include
LDFLAGS = -s
LINK = $(TOOLPREFIX)/bin/arm-linux-gnueabi-gcc
LFLAGS =
LIBS = $(SUBLIBS) -L$(TOOLPREFIX)/arm-linux-gnueabi/lib -L$(QTDIR)/lib -L$(EZXDIR)/lib -lm -lqte-mt -lezxpm -ljpeg -lezxappbase -lezxtapi-xscale-r -llog_util -llighting
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
TAR = tar -cf
GZIP = gzip -9f = gzip -9f
…let us pass…
install: i (TARGETS)
ncftpput - u of root - p "" 192.168.16.2 i (UPLOAD_PATH) i (TARGETS)
For the Compilation it's only necessary to edit the Variable TOOLPREFIX. Replace the Path of TOOLPREFIX (SDK) to
your own Installation matching Value!
Let us examine in greater detail the Makefile-Rule install. It copies everything needed to the Mobile through FTP and
it depends on the Purposes of Compilation. If we call 'make install', if necessarily this Call will compile the whole
Program and will get installed on the Mobile in UPLOAD_PATH. For that you will need the Utility of 'ncftpput'. The
Installation is aided by your Distribution's Package-Manager.
Starting the Program
--------------------
We have to connect to the Mobile by telnet, establish the necessary Environments, change into the
Upload-Folder, here /mmc/mmca1/bin/, and start the Programm.
Prepare the Environment:
Code:
#> /etc/initservices/services/ezxenv.sh
Start the Emulator:
Thus we start and - voila! - we should see on the Mobile's Screen our Program - Successes!
Errors and Bugs
---------------
.. or we don't! May be we are seeing instead a Segmentation-Fault - nothing unusually to those who write Programs.
Other MotoMagx-Mobiles
----------------------
At Moment i don't know for V8 and others MotoMagx-Mobiles. There should atmost all the same as with Z6.
Any Feedback about programming these Mobiles are Welcome, too!
Libraries
---------
About the Selection of the libraries read here: https://ezx.darktech.org/wiki/ReverseSo
Finishing this Project!(MotoMagx Package Manager)
-------------------------------------------------
A Package Manager for MotoMagx would be the Finishing of the Mind of this Project.
Support this Project by checking out this Source and help developing this Manager!
Code:
svn co https://ezx.darktech.org/browser/trunk/projects/regman
Attachments
-----------
- ezxenv.sh
- Makefile
File-Listings
-------------
File-Content /etc/initservices/services/ezxenv.sh (Z6)
Code:
#! /bin/sh
# Revision History:
#
# CR date coreid description
# ---------------------------------------------------------------------------
# LIBll22439 01-Jan-2006 w5770c add Java variables redefinition
# LIBkk81142 14-Dec-2006 e13456 add LJ_VISIBLE_DATA LJ_PRIVATE_DATA
# LIBll14192 22-Jan-2007 csw000 Add LOCPATH for locale stuff
# LIBkk44190 03-Nov-2006 w5770c Add backup font path in root image
# LIBkk43029 01-Nov-2006 csw000 java updates
# LIBkk30402 19-Oct-2006 e13456 Move data to mass storage
# LIBjj71117 28-Aug-2006 jharvey3 Add export of LD_HWCAP_MASK
# LIBjj10638 18-Jul-2006 csw000 update search path order for faster load
# LIBii76566 23-May-2006 csw000 update LD_LIBRARY_PATH for libsahara
# LIBii73311 23-May-2006 csw000 add EZX_RES_SOUNDS_SLIDERTONE_PATH
# LIBii72021 18-May-2006 csw000 change EZX_RES_FONT_PATH
# LIbii33259 12-May-2006 csw000 add TPA_HOME export
# LIBii64904 12-May-2006 csw000 initial version for runtime_env component
# environment-setup
export QTDIR=/usr/lib/ezx
export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib:/lib:/usr/language/vui/english/lib:/usr/language/vui/mandarin/lib:/usr/language/vui/common/lib:/usr/local/lib
export LD_HWCAP_MASK=
export EZX_PLUGINS_DIR=/hatcreek/plugins
# font path
if test -f /usr/language/fonts/fontdef.cfg;
then
export EZX_RES_FONT_PATH=/usr/language/fonts
else
export EZX_RES_FONT_PATH=$QTDIR/lib/fonts
fi
# slidertone path
export EZX_RES_SOUNDS_SLIDERTONE_PATH=/usr/data_resource/sound/slider_tones
# icon path
export EZX_RES_ICON_PATH=/usr/data_resource/icon
# string path
export EZX_RES_STRING_PATH=/usr/language/string
export EZX_NATIVE_APP_PATH=/usr/SYSqtapp
export EZX_PRELOAD_APP_PATH=/usr/data_resource/preloadapps
export AM_SYS_STATE_SHM_PATH=/usr/SYSqtapp/am
# per LIBll14192, set LOCPATH
export LOCPATH=/usr/language/string
export PREF_LANGUAGE_PATH=${LOCPATH}
export EZX_LANG=/usr/language/
export EZX_LOCAL_PATH=/ezxlocal/
export EZX_LOCAL_DOWNLOAD_PATH=${EZX_LOCAL_PATH}download/
export EZX_LOCAL_APP_WRITE_PATH=/ezxlocal/download/appwrite
export EZX_APP_WRITE_PATH=/ezxlocal/download/appwrite
export LJ_DATA_VISIBLE=/ezxlocal/download/mystuff/.system
export LJ_DATA_PRIVATE=/ezxlocal/download/appwrite
export LJ_CONFIG=/ezxlocal/download/appwrite
export TPA_HOME=${EZX_LOCAL_PATH}
#sound path
export EZX_RES_SOUNDS_PATH=/usr/data_resource/sound
export EZX_RES_SOUNDS_UISOUNDS_PATH=/usr/data_resource/sound/ui_sounds
export EZX_RES_SOUNDS_RINGTONES_PATH=/usr/data_resource/sound/ringtones
#dm
export dm_setting_root=${EZX_APP_WRITE_PATH}/setup
export dm_setting_plugin=/usr/lib/ezx/lib/dm_plugin
export EZX_EXTRA_SYS_DATA_PATH='/ezxlocal/.system/'
#java
export J2ME_SECURITY_DIR='/ezxlocal/download/java'
export JAVA_HOME_CARD1='/mmc/mmca1/.system/java'
export JAVA_HOME_CARD2='/mmc/mmcb1/.system/java'
export J2ME_SYSDATA_DIR=${LJ_DATA_VISIBLE}/java
export JAVA_HOME_FLASH=${LJ_DATA_VISIBLE}/java
export MIDP_SYSDIR='/ezx_user/download/appwrite/java'
export J2ME_POLICY_DIR='/usr/securesetup'
export MYSTUFF_DATA_PATH='/ezxlocal/download/mystuff/'
#browser
export BROWSER_FS_ROOT=/ezxlocal/download/browser
export FLASH_MOUNT_PATH=/ezxlocal
export EZX_INSTALLED_QT_PATH=/ezxlocal
export MYSTUFF_DATA_PATH=/ezxlocal/download/mystuff/
(gorgoyle):
Vielen dank an Abram für dieses HowTo!
Eine Übersetzung in deutsch ist derzeit in Arbeit!
mfg
thnx Abram!