18 12
发新话题
打印

[教程] E770v的ELF--PortKit移植教程中文版(附上770所用ELF文件)

本主题由 daibiao1984 于 2008-8-2 13:10 解除置顶

E770v的ELF--PortKit移植教程中文版(附上770所用ELF文件)

原贴:http://code.google.com/p/rainbowelfloader/wiki/PortKitTutorial
由于大家看不懂英文,我就草草的翻译了下:
2楼为我们770用的ELF文件,希望高手能把它们移植到77上来!

    下面这个英文教程就是移植ELF到自己所用CG1版本的教程(比如,可以移植E0R的ELF了). 英文不算太难,很好理解.
教程里需要的文件可以从   http://rainbowelfloader.googlecode.com/svn/trunk/          下载到
=======================================================================

     PortKitTutorial   
How-to use the PortKit.
Needed things


First of all, we need:
GCC for M*Core (check repository for win32 version, to install GCC extract the archive and add the path to gcc's bin dir to "PATH" environment var)
portkit.php or .exe (check repository)
functions.pat (check repository)
RSA free CG1 from the firmware in which you intend to use the elfloader (named in this tutorial CG1.smg)
ElfLoader source code (check repository)
ElfLoader Spawner source code (check repository)


Let's start
Put portkit.exe or .php and functions.pat in the same folder of CG1.smg.

Execute one of these commands:
portkit.exe -sf functions.pat CG1.smg if you are in win
php ./portkit.php -sf functions.pat CG1.smg if you are in linux

Then run the created file and a file named newlib.sym will be created.

Open the file and check the all functions have been found, if not you will have to look for them.

Porting ElfLoader Spawner
Copy newlib.sym and portkit into elf_loader_spawner\SDK and execute:

portkit.exe -fl old_library.def newlib.sym
php ./portkit.php -fl old_library.def newlib.sym

Open CG1.smg and check where the file ends and you want to put the ElfLoader Spawner code, for example, if file end is located at 0x1145AB6F you will have to write into linker.ld this code:

INPUT("main.o")
OUTPUT_FORMAT("binary")
ENTRY(_main)
SECTIONS
{
. = 0x1145AB70;  
.text :
  {   
     *(.text)
  }
}


Now go into elf_loader_spawner, compile the elf_loader_spawner and paste the content of "out.bin" at the address you wrote in linker.ld.

Copy portkit into elf_loader_spawner and run:

portkit.exe -install cg1.smg ADDRESS_OF_SPWNER (example: 1145AB70)

Porting ElfLoader
As for the spawner copy newlib.sym and portkit into elfloader\SDK and execute:

portkit.exe -fl old_library.def newlib.sym
php ./portkit.php -fl old_library.def newlib.sym

then goto elfloader and compile it, ElfLoader is ported.

End
The last thing you have to do is to rename newlib.sym to library.def and upload library.def & ldr.bin to /a/ into your mobile, then flash the modified CG1 and you will have the elf loader running!

[ 本帖最后由 daibiao1984 于 2008-7-27 21:53 编辑 ]
附件: 您所在的用户组无法下载或查看附件

TOP

大家看见没?

教程已经出来了,有这方面技术人才的快点动手DIY啊,希望77早日实现啊,我相信我们77还是有人才的!



下面是ELF文件,77的高手们加油,祝你们早日移植成功!

[ 本帖最后由 daibiao1984 于 2008-7-27 21:52 编辑 ]
附件: 您所在的用户组无法下载或查看附件

TOP

好东东需要大家努力!

TOP

没机器咋办?
我买个去?

TOP

去买啊。

兄弟我是不会移植这个高科技东西,靠你了。

TOP

高手去研究啊。。

小7的未来靠你们了啊!

TOP

期待高手了加入,这方面俺就不懂了.......

TOP

写的撒子哦.

根本就是完全不懂
没事的时候回来逛逛的

TOP

我看不懂,请懂的高手出山,谢谢.再顶一下

[ 本帖最后由 yewenhou83 于 2008-7-27 21:19 编辑 ]

TOP

可以翻译成中文撒。。

呵呵。。。我已经翻译和更新了ELF文件了,期待高手出山!

TOP

 18 12
发新话题