segunda-feira, 21 de outubro de 2013

Motorola line, MIP sel 16 Bits with no Support in China

I dont understand the peoples from OpenWrt project ! they are not concert about their project !
i was trying serveal days to compile my souce code for MIPsel processor ! but, neve run in by
hardware with OpenWrt and MIPs processor.

Discovering how the byte are assembled in Binary File:

The binary Image from my Compiled Code:
7F 45 4C 46 01 02 01 00 01 00 00 00 00 00 00 00 
00 02 00 08 00 00 00 01 00 40 06 F0 00 00 00 34 
00 00 0B 94 70 00 10 05 00 34 00 20 00 08 00 28
00 20 00 1D 00 00 00 06 00 00 00 34 00 40 00 34

Them, i found the mistake ! the compiler has making the MIPSel Big Endian format !

Next Step, search the Little Endian Format ! because my processor only runs Litle Endian
format and ..... i found nothing at OpenWrt:
http://downloads.openwrt.org/backfire/10.03.1/ar71xx/

Them, lonely i try to arrange my Bytes:
7F 45 4C 46 01 01 01 00 01 00 00 00 00 00 00 00  Replace 02 with 01 
 02 00 08 00 00 00 01 00 40 06 F0 00 00 00 34 00  make RolL Left (shl x,1) until end of file


And ....

BAD RUN !

What do now ?

Search a lot of times ! and i found one site with the compiler ... 

I FOUND HERE MY CROSS COMPILER FOR MIPS 16 Bits ( Little Endian )
http://www.streamboard.tv/oscam/wiki/crosscompiling

And this is the Compilar:
http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_MIPS-Router-uclib-0.9.28.bz2

This Compiler Works Fine !

7F 45 4C 46 01 01 01 00 01 00 00 00 00 00 00 00 
02 00 08 00 01 00 00 00 80  4E 40 00 34 00 00 00

this position where the number 02 are, is fine ! and now run very well.

Bellow, how my file cmpiled is, and run pretty good.



MIP Sel, 16 bITS - Little Endian