Jump to content


- - - - -

Elfpack Compiling


  • Please log in to reply
234 replies to this topic

#1 OFFLINE   Timod

Timod
  • VIP
  • SVP

  • 1,055 posts
  • Gender:Male
  • Location:Brielle, The Netherlands
  • Mobile:Black Hikaru :ninja:
  • Tutorials Submitted:1

Posted 13 August 2010 - 09:29 AM

*
POPULAR

Compiling Elfpacks is a horrible thing to do, right?

Nah, it's not so bad.
There is a good tutorial for it.
Only problem, it's in Russian and the links are quite outdated.
We also have one over here, on SE-NSE, but that's even more outdated, and incomplete.
That's why I've decided to write a tutorial myself.

First things first: What tools do I need
• TortoiseSVN (Link) Just install it like you would install any program
• IAR Embedded workbench (link) thanks to Boysie. Unpack everything in
C:\Program Files\Embedded Workbench 4.0 Evaluation
Now we've got those things covered, let's get the files we need for compilation.
Easy things first:
• Your phone's .mbn, .raw, phone_app.cxc and when available phone_emp_app.cxc.*
It is important that db3xxx obtain these files using Read3150 v0.7.
http://justdanpo.cheb.ru/data/projects/gsm/read3150_0.7.rar
Next, we go to svn://svn.boba.su/SE and get the workspace files.
It'll ask for a username and password.
Username: guest
Password: guest
Don't forget to check the 'save authentication' box.
Posted Image
If all is correct, you'll get this screen
Posted Image
We need 4 of these files:
• C++
• ElfPack
• include
• Dlls
Download them by right clicking on them and use Export
Posted Image
Save them on a location that would seem suitable for you.
How about?
C:\Program Files\Embedded Workbench 4.0 Evaluation
So where it says "Export directory", we enter (for C++):
C:\Program Files\Embedded Workbench 4.0 Evaluation\C++
Posted Image
Do the same thing for 'Elfpack', 'include' and 'Dlls'
Now we should have something like this:
Posted Image

Next up, we're going to open IAR Embedded Workbench
If you followed the guide, you can copy-paste this directly into explorer to open it. If not, you'll have to find it yourself.
C:\Program Files\Embedded Workbench 4.0 Evaluation\IAR4\Embedded Workbench 4.0 Evaluation\common\bin\IarIdePM.exe
Now, the program will ask us what to do. Choose the option: Open Existing Workspace.
The workspace we're looking for is called ElfPack.eww and can be found here:
C:\Program Files\Embedded Workbench 4.0 Evaluation\Elfpack
Now, if everything went fine, you should be able to see this:
Posted Image
Next, go to Project -> Edit configuration
Posted Image
Choose your phone model + firmware (for the purpose of this guide, I'll compile W995_R1GA026)
Posted Image
Next, choose Project -> Rebuild all
Posted Image

Now if everything went correct, we've got some new stuff in the ElfPack folder, so go there:
You should now see the new folders:
Debug
Settings
W995_R1GA026 (or your own phone+firmware)
and the file:
ElfPack.dep
Posted Image
Now, go to folder PHONENAME_FIRMWARE\exe. There should be a file named elfpack.elf!
We're not done yet, so stick with me.
Create a folder named _Utils in your Elfpack folder.
C:\Program Files\Embedded Workbench 4.0 Evaluation\ElfPack\_Utils
Place in there the ElfPack.elf file, your phone_app.cxc and phone_emp_app.cxc. (when available)
Now, we need to get elf2vkpex.exe. Get that from here or here.
Finally, create a file named make.bat in there.
Open make.bat with notepad and in it, you paste the following (whatever applies to your platform.)
elf2vkpex -eELFPACK.ELF -fPHONE_EMP_APP.CXC -fPHONE_APP.CXC
elf2vkpex -eELFPACK.ELF -fPHONE_APP.CXC
elf2vkpex -fFILE.MBN -eELFPACK.ELF
elf2vkpex -fFILE.RAW -eELFPACK.ELF -v 
When done, your folder should look something like this
Posted Image
Once you're sure you've got the same files as above, double click make.bat and see, we've got two new files.
Posted Image
And we're done, it's as simple as that. :)
If you want to publish it, be sure to paste the following lines in the beginning of your patch
;PHONE_FIRMWARE
;ELFPack v1.999 (c) Hussein
;SWI_Hook (c) Rst7/CBSIE
;ElfLoader (c)2007 by Rst7/CBSIE, BoBa, Kren
So now we're done. :)
All we now need is the latest library. You could get it here or here, but it is of course way cooler to just get them from svn://svn.boba.su/SE/Library using tortoise. :)

We also need our dyn_const.bin and LibraryDLL.dll.
You could just get them here
http://justdanpo.cheb.ru/index.php?link=L3N1cHBvcnQvZWxmcGFjaw==
but you can also easily create them yourself.

First up, LibraryDLL.dll
You might, or might not know it, but you've already downloaded all the necesary tools. They're all in the Dlls folder.
C:\Program Files\Embedded Workbench 4.0 Evaluation\Dlls\LibraryDLL
Posted Image
We see a file there named 'LibraryDLL.eww'.
Do you still recognize the .eww extenstion?
It's the IAR workbench extension, so open up IAR.
C:\Program Files\Embedded Workbench 4.0 Evaluation\IAR4\Embedded Workbench 4.0 Evaluation\common\bin\IarIdePM.exe
Choose 'open existing workspace', go to the 'LibraryDLL folder' and choose 'LibraryDLL.eww'
Choose your own phone + firmware via Project -> Edit Configurations and 'rebuild all'.
If everything is correct you'll find your 'LibraryDLL.dll' in
C:\Program Files\Embedded Workbench 4.0 Evaluation\Dlls\LibraryDLL\phone_firmware\Exe
Creating dyn_const.bin is very similar, only difference being the fact that we still need to download the necessary files.
To do so, go to svn://svn.boba.su/SE and export the folder called dynconst to
C:\Program Files\Embedded Workbench 4.0 Evaluation\dynconst
Open IAR again:
C:\Program Files\Embedded Workbench 4.0 Evaluation\IAR4\Embedded Workbench 4.0 Evaluation\common\bin\IarIdePM.exe
Open the file 'dynconst.eww' in the 'dynconst folder'.
Posted Image
Now here is the tricky part.
When choosing phone + firmware, you'll notice that not all phones are listed.
If your phone is not listed (like my W995), pick one that is from 'the same generation'.
For me, this would be a db3210 and a walkman phone (like W705, W715), so I pick one of those.
To know which one to pick look below the spoiler to find a full list of all phones (as of 16-8-2010)
Spoiler
Once picked, click rebuild all and you will find your dyn_const.bin in
C:\Program Files\Embedded Workbench 4.0 Evaluation\dynconst\phone_firmware\Exe
That's it. We're done. Compress your Elfpack using winrar or winzip, and upload it in the elfpack topic, for other users to use.

I'd like to say thanks some people for helping me with this guide.
-First off, Boysie. He helped me compile my first ElfPack, answered the most silly questions, and uploaded his IAR. Without him, I wouldn't have been able to do it.
-Next the other people helping me in the A2 Elfpack topic, thanks guys.
-Thomassafca, for being a pain in my ass and pushing me into writing this guide. Thanks.
-Den Po, IronMaster, Husein for releasing Elfpack
-Blacklizard, for being one of the greatest creators/porters out there. (Also for providing Boysie with the link to IAR, apparantly :lol:)
-And last, but certainly not least, awg, over at mobilefree.ru. Without his guide, I would have come nowhere.

Hope you'll enjoy using it. Any questions can be posted here.


Edit:
Notes and advanced tips:
- phone_emp_app.vkp is obviously not needed for db3150 (quote)
- How to remove / modify elf icon. By Boysie (Link)
- Or, a more sofisticated way to remove / modify elf icon. :lol: By NKLS (Link)
- Expanding phone_app.cxc and phone_emp_app.cxc By Crazysharath / Maxidimov (Link)
- Advanced make.bat with auto rename function. By Tobi@s (Link)
- New Elf2VKP By Den Po. Thanks to Crazysharath (Link)

Edited by Timod, 02 March 2011 - 06:49 PM.

Proud owner of SE W995 Brown R1HA035
Posted ImagePosted Image
Elf catalogue's update log: Last catalogue update: 23-05-2011
Tutorial: Elfpack Compiling


#2 OFFLINE   Boysie

Boysie
  • Super Moderators
  • Mrs Miggins

  • 37,214 posts
  • Gender:Can't decide
  • Location:Between a rock and a hard place
  • Mobile:X10 - K800
  • Tutorials Submitted:One or two

Posted 13 August 2010 - 09:37 AM

Excellent!  :good:

I tend to export everything from the root "SE" folder though.

I'd also like to thank if I may, Blacklizard who provided me with the IAR link and helped me learn to compile.

Personal messages that have no need to be private will not be answered. We have a forum for asking questions so please use it.


#3 OFFLINE   Timod

Timod
  • VIP
  • SVP

  • 1,055 posts
  • Gender:Male
  • Location:Brielle, The Netherlands
  • Mobile:Black Hikaru :ninja:
  • Tutorials Submitted:1

Posted 13 August 2010 - 09:39 AM

Yeah, I'll add some more people to the thanks list. I was eager to post the tut though. :p
Edit:
I'd like to download as few items as possible, but it is of course possible to download the entire SE folder. ;)

Edited by Timod, 13 August 2010 - 10:39 AM.

Proud owner of SE W995 Brown R1HA035
Posted ImagePosted Image
Elf catalogue's update log: Last catalogue update: 23-05-2011
Tutorial: Elfpack Compiling


#4 OFFLINE   thomassafca

thomassafca
  • VIP
  • ★★★

  • 3,843 posts
  • Gender:Male
  • Location:The Netherlands
  • Mobile:HTC One, Nexus 4, Xperia™ PLAY, Galaxy Ace

Posted 13 August 2010 - 09:40 AM

Great job! :good:

#5 OFFLINE   Boysie

Boysie
  • Super Moderators
  • Mrs Miggins

  • 37,214 posts
  • Gender:Can't decide
  • Location:Between a rock and a hard place
  • Mobile:X10 - K800
  • Tutorials Submitted:One or two

Posted 13 August 2010 - 09:43 AM

Obviously if you're compiling for DB3150 then phone_emp_app.vkp isn't needed.

Personal messages that have no need to be private will not be answered. We have a forum for asking questions so please use it.


#6 OFFLINE   Krazy D

Krazy D
  • VIP
  • Retired Moderator

  • 3,376 posts
  • Gender:Male
  • Tutorials Submitted:5

Posted 13 August 2010 - 09:47 AM

Good Work.

#7 OFFLINE   Boysie

Boysie
  • Super Moderators
  • Mrs Miggins

  • 37,214 posts
  • Gender:Can't decide
  • Location:Between a rock and a hard place
  • Mobile:X10 - K800
  • Tutorials Submitted:One or two

Posted 13 August 2010 - 09:49 AM

A little tip: To remove the annoying elf icon, remove these lines from regfile.c and compile.

#ifdef EP_EXTICON14x14
#include "exticons\14x14.inc"
#endif

#ifdef EP_EXTICON16x20
#include "exticons\16x20.inc"
#endif

#ifdef EP_EXTICON24x24
#include "exticons\24x24.inc"
#endif

#ifdef EP_EXTICON42x32
#include "exticons\42x32.inc"
#endif

#ifdef EP_EXTICON48x36
#include "exticons\48x36.inc"
#endif

#ifdef EP_EXTICON56x42
#include "exticons\56x42.inc"
#endif

Personal messages that have no need to be private will not be answered. We have a forum for asking questions so please use it.


#8 OFFLINE   maxidimov

maxidimov
  • VIP
  • sixth se-nse

  • 1,191 posts
  • Gender:Male
  • Location:Bulgaria
  • Mobile:Sony Ericsson Sofia, Samsung Galaxy Europa
  • Tutorials Submitted:1

Posted 13 August 2010 - 10:12 AM

But what if we want to change the elf icons? :unsure:

#9 OFFLINE   Kaosblade

Kaosblade
  • LBL
  • the one and only se-nsei

  • 2,641 posts
  • Gender:Male
  • Mobile:HTC Wildfire S

Posted 13 August 2010 - 10:14 AM

Awesome stuff. +1

#10 OFFLINE   Boysie

Boysie
  • Super Moderators
  • Mrs Miggins

  • 37,214 posts
  • Gender:Can't decide
  • Location:Between a rock and a hard place
  • Mobile:X10 - K800
  • Tutorials Submitted:One or two

Posted 13 August 2010 - 10:15 AM

Then you compile ep without the embedded icons as above and change the animal icon it uses by patch.

Personal messages that have no need to be private will not be answered. We have a forum for asking questions so please use it.


#11 OFFLINE   Tobi@s

Tobi@s
  • Members
  • PipPipPipPipPipPip
  • Se-nse-ual

  • 830 posts
  • Gender:Male
  • Location:Germany
  • Mobile:Xperia T |TouchPad

Posted 13 August 2010 - 10:21 AM

Thanks for the tutorial. I'll try it :D


Quote

Then you compile ep without the embedded icons as above and change the animal icon it uses by patch.

Sorry. but I don'T understand this.

Edited by Tobi@s, 13 August 2010 - 10:22 AM.

XPERIA T | deBranded | LiveView | DockingStation | Rooted | BL unlocked | Advanced Stock Kernel

Gsues waht i ahve bad snytax


#12 OFFLINE   Boysie

Boysie
  • Super Moderators
  • Mrs Miggins

  • 37,214 posts
  • Gender:Can't decide
  • Location:Between a rock and a hard place
  • Mobile:X10 - K800
  • Tutorials Submitted:One or two

Posted 13 August 2010 - 10:26 AM

View PostTobi@s, on 13 August 2010 - 10:21 AM, said:

Sorry. but I don'T understand this.
Whats not to understand. Elfloader has embedded icons in the patch if compiled without removing the lines I stated above. These cannot be changed by GFX patch.

Removing those lines means you can replace the icon by GFX patch by replacing "CALE_LUNAR_12ANIMALS_1ST_MOUSE_ICN" (Small) and "CALE_LUNAR_12ANIMALS_10TH_ROOSTER_ICN" (Large) with IMGTool.

Edited by Boysie, 13 August 2010 - 10:28 AM.

Personal messages that have no need to be private will not be answered. We have a forum for asking questions so please use it.


#13 OFFLINE   Timod

Timod
  • VIP
  • SVP

  • 1,055 posts
  • Gender:Male
  • Location:Brielle, The Netherlands
  • Mobile:Black Hikaru :ninja:
  • Tutorials Submitted:1

Posted 13 August 2010 - 10:36 AM

So like you would change any icon in your system. ;)

Proud owner of SE W995 Brown R1HA035
Posted ImagePosted Image
Elf catalogue's update log: Last catalogue update: 23-05-2011
Tutorial: Elfpack Compiling


#14 OFFLINE   Boysie

Boysie
  • Super Moderators
  • Mrs Miggins

  • 37,214 posts
  • Gender:Can't decide
  • Location:Between a rock and a hard place
  • Mobile:X10 - K800
  • Tutorials Submitted:One or two

Posted 13 August 2010 - 10:39 AM

Yes. :)

Personal messages that have no need to be private will not be answered. We have a forum for asking questions so please use it.


#15 OFFLINE   Tobi@s

Tobi@s
  • Members
  • PipPipPipPipPipPip
  • Se-nse-ual

  • 830 posts
  • Gender:Male
  • Location:Germany
  • Mobile:Xperia T |TouchPad

Posted 13 August 2010 - 11:31 AM

When I try to open ElfPack.eww with IAR the application crashes. I opened it as Administrator and normal with doubleclick. Nothing works...

My OS is Windows 7 Professional...

XPERIA T | deBranded | LiveView | DockingStation | Rooted | BL unlocked | Advanced Stock Kernel

Gsues waht i ahve bad snytax


#16 OFFLINE   Timod

Timod
  • VIP
  • SVP

  • 1,055 posts
  • Gender:Male
  • Location:Brielle, The Netherlands
  • Mobile:Black Hikaru :ninja:
  • Tutorials Submitted:1

Posted 13 August 2010 - 11:35 AM

Runtime error blabla etc. ? I've had that too. Just try reinstalling everything. Start from the bottom. (remove the entire content of embedded workbench folder)
Edit:
Although it could also be a compatibility problem. I'm using Vista here, so I can't know that for sure. :confused:(although I doubt it. ;) )  

Edited by Timod, 13 August 2010 - 11:37 AM.

Proud owner of SE W995 Brown R1HA035
Posted ImagePosted Image
Elf catalogue's update log: Last catalogue update: 23-05-2011
Tutorial: Elfpack Compiling


#17 OFFLINE   Tobi@s

Tobi@s
  • Members
  • PipPipPipPipPipPip
  • Se-nse-ual

  • 830 posts
  • Gender:Male
  • Location:Germany
  • Mobile:Xperia T |TouchPad

Posted 13 August 2010 - 11:41 AM

New Visual Studio 2008 Instance blabla... error.

XPERIA T | deBranded | LiveView | DockingStation | Rooted | BL unlocked | Advanced Stock Kernel

Gsues waht i ahve bad snytax


#18 OFFLINE   Shifter

Shifter
  • New Members
  • PipPipPipPipPip
  • Se-nse-ible

  • 694 posts
  • Gender:Male
  • Location:Sri Lanka
  • Mobile:K750@W800 | K530@W660 | W760 | W595
  • Tutorials Submitted:1

Posted 13 August 2010 - 01:45 PM

Good job timod. :good:

Posted Image
Respect : The_Laser | Den_Po | Blacklizard | Brazzuka | Cchaos | Boysie | Corman
Gallery : Satio GFX Patch [W595 R3EJ001]


#19 OFFLINE   crazysharath

crazysharath
  • VIP
  • human.setType(crazy narcoleptic);

  • 2,756 posts
  • Gender:Male
  • Location:God's Own Country
  • Mobile:Xperia Sola,C510
  • Twitter:crazysharath

Posted 13 August 2010 - 01:51 PM

Clear and easy tutorial.  :good:

Posted Image


#20 OFFLINE   Timod

Timod
  • VIP
  • SVP

  • 1,055 posts
  • Gender:Male
  • Location:Brielle, The Netherlands
  • Mobile:Black Hikaru :ninja:
  • Tutorials Submitted:1

Posted 13 August 2010 - 02:17 PM

View PostTobi@s, on 13 August 2010 - 11:41 AM, said:

New Visual Studio 2008 Instance blabla... error.
I don't know about that one. Never had it before.
Found this on system requirements.
System requirements
To install and run the IAR Embedded Workbench, you need the following:

	* A Pentium-compatible PC with Microsoft Windows XP(SP3), Vista(SP2), or Windows 7. Both 32-bit and 64-bit variants of Windows are supported.
	* Internet Explorer 7 or higher
	* At least 1 Gbyte of RAM, and 2 Gbytes of free disk space.
	* Adobe Acrobat Reader to access the product documentation

Proud owner of SE W995 Brown R1HA035
Posted ImagePosted Image
Elf catalogue's update log: Last catalogue update: 23-05-2011
Tutorial: Elfpack Compiling



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users