Moto Hell - The Motorola Modding Community

Motorola Phone Models => Motorola E398/E790/E798/E1 => Topic started by: Exploited on November 22, 2007, 12:24:30 am



Title: Develop ELF applications
Post by: Exploited on November 22, 2007, 12:24:30 am
I mean "DO IT NOW" LOL

Here is required tutorial and compiller: http://www.e398mod.com/content/view/526/25/


Title: Re: Develop ELF applications
Post by: motomaniacs on November 22, 2007, 12:28:47 am
You are not authorised to view this resource. <<<< why??


Title: Re: Develop ELF applications
Post by: Jithin on November 22, 2007, 05:02:39 am
You are not authorised to view this resource. <<<< why??
yup,same here :(


Title: Re: Develop ELF applications
Post by: Exploited on November 22, 2007, 08:13:17 am
fixed


Title: Re: Develop ELF applications
Post by: motomaniacs on November 22, 2007, 06:54:53 pm
thx


Title: Re: Develop ELF applications
Post by: error398 on November 22, 2007, 07:20:26 pm
what for??


Title: Re: Develop ELF applications
Post by: Jithin on November 23, 2007, 05:37:47 am
@Raunamaxtor,
See the new patches thread for details..


Title: Re: Develop ELF applications
Post by: EOG on November 25, 2007, 04:22:52 am
can sb translate comments in SDK from russina to english?


Title: Re: Develop ELF applications
Post by: BruceLee on November 25, 2007, 05:07:49 am
here's the sdk with english comments


Title: Re: Develop ELF applications
Post by: Jithin on November 25, 2007, 05:11:06 am
here's the sdk with english comments
Thanks..Praised.. :)


Title: Re: Develop ELF applications
Post by: BruceLee on November 26, 2007, 01:10:31 am
i've tried to make an elf app when the sdk first appeared but i didn't successfully compiled the project.. it said i need some certain software and i skiped it... maybe if i'll have more time i'll try again.. i find this elf app thing very useful and also very fast


Title: Re: Develop ELF applications
Post by: pt1989 on November 28, 2007, 07:04:56 am
HI, i got the elfpack FPAs (for L7 ) from motofan.ru made by WhiteHotIce and Bullfrog... but they don't patch they give a "Read beyond file error"...
please somebody put up a guide as to how to load the fbrowser... thx

another thing i know C++ so can anybody give a detailed guide in English as how to setup the MotoSDK what tools are required. How do you start writing the elf programs in C++... the hello world sample given is sorta diff to understand


Title: Re: Develop ELF applications
Post by: Bullfrog on November 28, 2007, 09:39:10 am
HI, i got the elfpack FPAs (for L7 ) from motofan.ru made by WhiteHotIce and Bullfrog... but they don't patch they give a "Read beyond file error"...

That's because the patch, in fact, patch the "FF" zone...so, it increase the CG1, and F&B can't put the patch because there aren't offsets anough in your cg1 backup...
If you are facing this problem, you can patch it with a hex editor (is just one offset), or use a smp file to patch it with resman.

BTW: Use the W.H.I. patch, that's for L7, mine is for V360.

Regards!


Title: Re: Develop ELF applications
Post by: pt1989 on November 29, 2007, 12:31:07 am
thx bullfrog but there is another patch from WhiteHotIce and in the WinRAR package shows that it has a later date(23/11/07 compared to 2/11/07) and that one patches fine. but still fbrowser (or any other ELF) doesn't load . do the library files and other have to be diff for LTE2 phones? or do they have to be compiled seperately ??


Title: Re: Develop ELF applications
Post by: Bullfrog on November 29, 2007, 10:00:40 am
Both patches are for ACR_RB but, the difference between them, are the folowing:
- The first patch WHI did, patch the final part of the CG1. (so, this one give the "Read beyond file error")
- The second patch, patch the welcome bootscreen (replacing a part of the image).

It's important upload in "Elf" folder on tf the auto.run (with fbrowser on it); fbrowser.elf; and elfloader.lib. The elfloader.lib must be maded with the patch...libraries are differents between firmwares, so must be for your firm and platform.

Regards!


Title: Re: Develop ELF applications
Post by: pt1989 on November 30, 2007, 01:56:44 am
thanks you very much Bullfrog... I have now loaded Fbrowser properly with MotoMixer ( i was trying with Elfloader application but failed) what is the elfloader application for? but when i try to execute Test.elf cellphone restarts... does every elf have to be different as well so what compilers are required for the same?? I think on motofan they were discussing about using some ARM compilers used for GameBoy development or something... but the translated text was a bit confusing.. please guide me
Regards


Title: Re: Develop ELF applications
Post by: pt1989 on November 30, 2007, 02:46:59 am
ok so i compiled with GoldRoad the test.asm assembly file but when i launched it thro' Fbrowser it just exits (however phone doesn't restart ) and suprisingly the older test.elf also causes Fbrowser to quit but not the phone to restart...

the make.bat when launched gives me an error bigend not a valid option (P.S. i have turbo C++ installed is it because i have an older version)
I saw the commands and it launches an ARMlink program which i guess is another compiler.

i think it works like this it causes Turbo C++ to EDITproduce the object and then uses the arm compiler to produce the final executable binary. Am i right??


Title: Re: Develop ELF applications
Post by: EOG on December 01, 2007, 05:44:10 am
Yes I've found this another compiler at motofan.ru

DOWNLOAD HERE (http://iuforum.ovh.org/ads.7z)

IMPORTANT
Put files from asm folder to c:/asm
Rest fules can be anywhere


Title: Re: Develop ELF applications
Post by: pt1989 on December 02, 2007, 12:18:11 am
Thanks a lot EOG i wanted that armlinker program couldn't find it... are u sure it's not warez anyways i don't give a damn i got it now  ;)
i downloaded GNUarm mebbe that can help in the future... don't u think the it should be c:\arm instead of c:\asm
besides i also think that u should add c:\arm to the PATH variable. Cause the batch program directly calls the armlink file.... thanks a lot dude

Also how do u put the SDK into the compiler cause the helloworld.h has this
Code:
#include<apps.h>
and not
Code:
#include"SDK/apps.h"

means the SDK has to be integrated with the headers of the compiler, i guess


Title: Re: Develop ELF applications
Post by: pt1989 on December 04, 2007, 06:02:36 am
OK so i actually compiled everything but the helloworld program still doesn't work but it compiles... also i will tell you how to make an FPA ELF patch for *any* CG1 of a RSA removed motorola MP. The patch would have to applied manually cause as Bullfrog said it patches something beyond the normal CG1.
First download the following :
1. ADS
2. PortKit
3. MotoSDK 1.0a
4. GNUARM (optional alternative way i found of compiling useful if working from Linux)

Follow this procedure then
  • create a folder in root of C as PortKit (u can choose any)
  • extract SDK folder form MotoSDK into C:\PortKit
  • All files from ADS (the exe's and dll's ) into C:\PortKit
  • Copy the arm folder from the ADS archive into c. so u should have c:\arm . This need not contain the exe's and dll's
  • Extract PortKit into c:\Portkit
  • Add to the PATH variable C:\Portkit
? -> http://www.computerhope.com/issues/ch000549.htm
[/list]

OPTIONAL way setting up GnuArm
  • Install Gnuarm from gnuarm.com
  • Search for include folders in the Gnuarm install directory. There should be two of them. Copy header files from SDK folder in motoSDK to both
  • Compile with arm-elf-cpp


Creating FPA patches for any firmware.
  • Split the firmware using ShxCodec.
  • Copy the CG1 into the PortKit folder and rename it to CG1.smg
  • Edit make.cmd file with notepad search for 'set PLATFORM = NONE'. Replace none with your phone type e.g. E398 would be LTE L7 would be LTE2 and a special one for V3i
  • Edit file c:\PortKit\obj\sysinfo.c  with notepad. There replace the default settings with your phone settings. Remember if you are not aware of programming then do not delete the semi-colon at the end and also make sure the text is within the double quotes
  • Goto Start -> Run -> cmd. In the console type
Code:
cd c:\Portkit
make.cmd CG1.smg
    [/li]
  • Now in the build folder u will have the two fpa patches Register.fpa and elfpack.fpa Also u will have elfloader.lib and lib.o. Copy the elfloader.lib and lib.o into b/elf on your phone
  • For compiling u need to keep the lib.o

I have tried to make this as simple and correct as possible... please correct if there is anything wrong.
Regards


Title: Re: Develop ELF applications
Post by: EOG on December 04, 2007, 03:11:53 pm
HelloWorld is has no graphic it;s juzst system sound player. when you start it by fbrowser go back to walpaper(using 'red button') and press buttons on keypad(remember * unloads HelloWorld)


Title: Re: Develop ELF applications
Post by: pt1989 on December 05, 2007, 10:26:40 pm
yeah thanks it works now ...