MyMPx.org

MyMPx.org (http://mympx.org/forum/)
-   General Discussion (http://mympx.org/forum/general-discussion/)
-   -   Hooray!!! Rockchip SDK! (http://mympx.org/forum/general-discussion/43348-hooray-rockchip-sdk.html)

makd511 9th Mar 2009 1:18 pm

this is getting really good
we are seeing success here with the rockchip stuff and we have success in running linux with almost full operation on ingenics ship, with all this going on maybe it will be possible to add some decent functionality to the hardware that is so let down by the lazy chinese companies .. and yes i said lazy as this has been proven to be the case ... they actually cant be bothered .. nless cash is involved

good luck to all of you in this

AleMaxx 9th Mar 2009 5:37 pm

Quote:

Originally Posted by exec";p=&quot (Post 58630)
[...] I've found that in /appdata folder in hidden partition there is a file named "base.rkw", which contains ARM code [...]

I have a "base.rkw" in the "SYSTEM" and "SYSTEM00" folders of my player, but both files start with "KRDL" fourcc and no vector table (there seems to be valid code from pos 0x30 onwards). I think for ARM processors there should be 8 branch instructions right at the beginning with the first one being the reset-vector (where the cpu starts execution after poweron/reset). Ive been working on the SPMP305x recently and that one has an ARM9 with MMU. Im sure youre referring to another base.rkw. I found this additional partition by copying rkusb.tag to one of the usb drive but there doesnt seem to be any startup-code.

lolita 9th Mar 2009 11:24 pm

Re: Hooray!!! Rockchip SDK!
 
"KRDL" is big-endian "LDRK" -- suggesting "kernel loader", so that is most likely the boot code.

Manufacturers can customize the processor core to start from whatever address they want, e.g. Z80 normally boots up from 0000 but the Actions ATJ209x boots from 8000.

AleMaxx 10th Mar 2009 7:52 am

having a quick look at "startup.s" in "system/cpu/arm/boot" it seems like they're not using any branch instructions but instead explicitly change the PC so one has to look for opcodes like "ldr pc, SomeHandler" which translates (i compiled with gnu assembler) to "ldr pc, [pc, #offs_of_addr_to_handler]" and (always?) to something like 0xE59F for the upper 16bits of the opcode.
i actually found this:
Code:

SystemReset:
  14de74:        e59ff018        ldr        pc, [pc, #24]        ; ResetAddr
  14de78:        e59ff01c        ldr        pc, [pc, #28]        ; DBG_Addr
  14de7c:        e59ff01c        ldr        pc, [pc, #28]        ; DBG_Addr
  14de80:        e59ff014        ldr        pc, [pc, #20]        ; DBG_Addr
  14de84:        e59ff010        ldr        pc, [pc, #16]        ; DBG_Addr
  14de88:        e59ff00c        ldr        pc, [pc, #12]        ; DBG_Addr
  14de8c:        e59ff004        ldr        pc, [pc, #4]        ; IRQ_Addr
  14de90:        e59ff004        ldr        pc, [pc, #4]        ; DBG_Addr

  14de94:        00000030        ResetAddr
  14de98:        00000040        IRQ_Addr
  14de9c:        600f3390        DBG_Addr
  14dea0:        600f3390        DBG_Addr

ResetAddr:
  14dea4:        e59fd004        ldr        sp, [pc, #4]        ; 0x14deb0  -> sp = 60e00000
  14dea8:        e51ff004        ldr        pc, [pc, #-4]        ; 0x14deac        goto __main
 
  14deac:        6000f940        __main
  14deb0:        60e00000        ||Image$$REALTABLE_SDRAM$$ZI$$Limit||

IRQ_Addr:
  14deb4:        e24ee004        sub                lr, lr, #4        ; 0x4
  14deb8:        e92d500f        stmdb        sp!, {r0, r1, r2, r3, ip, lr}
  [...]

I filled in the names of "startup.s" where appropriate. So seems like the "main()" resides at @ 0x6000f940 in memory.

WIZARD 11th Mar 2009 6:13 am

Re: Hooray!!! Rockchip SDK!
 
@knob:
I haven't a firmware backup.
And because there're no programs that can make backup,
I can't take part in modifying the firmware.
Don't want to kill my player.

AleMaxx 11th Mar 2009 6:24 am

I actually was able to find some references to "LDRK" files in the source though it currently only partly makes sense.

Quote:

Originally Posted by knob";p=&quot (Post 58632)
[...] even if you do a small change to base.rkw the player doesn't boot up [...]

knob, have a look at "ISetupGetFwOffset" in "system/os/setup/setup.c", there is a file header (KNL_SECINFO) with a CRC32 value that needs to be updated if you make any changes to the file i guess. Maybe changing the dword at fileoffset 0x24 to 0x80000000 will work to (this disables some CRC32 checks).

knob 11th Mar 2009 11:48 am

Re: Hooray!!! Rockchip SDK!
 
Quote:

Originally Posted by WIZARD";p=&quot (Post 58708)
@knob:
I haven't a firmware backup.
And because there're no programs that can make backup,
I can't take part in modifying the firmware.
Don't want to kill my player.

Hopefully now we have the SDK a firmware backup program can be developed.
I have a working backup for my 2" rockchip so I can test firmware out and I will try to add new features, I just need to sort the screen drivers out in the source code

@AleMaxx thanks for the info, I thought the CRC must be in the source somewhere.

WIZARD 11th Mar 2009 1:40 pm

Re: Hooray!!! Rockchip SDK!
 
Please, anybody, compile the emulator!
I've tried for many times without any luck. :cry: :cry: :cry:
Maybe I was doing something wrong... :roll:

Also, could you answer some of my questions? :roll:
:arrow: Can I decompile a firmware? (if I'll get it from the manufacturer)
:arrow: Can I decompile a rockchip game/application?
:arrow: Can I modify a fimware/rockchip game/rockchip application without decompiling?

knob 12th Mar 2009 5:33 am

Re: Hooray!!! Rockchip SDK!
 
Quote:

Originally Posted by WIZARD";p=&quot (Post 58716)
Please, anybody, compile the emulator!
I've tried for many times without any luck. :cry: :cry: :cry:
Maybe I was doing something wrong... :roll:

I have tried to compile the emulator, but no luck yet, I think it will only be good for RK2706 players, but I plan to keep trying, not much time at the moment I'd afraid.

Quote:

Also, could you answer some of my questions? :roll:
:arrow: Can I decompile a firmware? (if I'll get it from the manufacturer)
:arrow: Can I decompile a rockchip game/application?
:arrow: Can I modify a fimware/rockchip game/rockchip application without decompiling?
We don't have any decompiler so we can't decompile anything.
Best chance for you WIZARD is an extractor run as a .rkp application from the game menu to create a backup.
You can mod firmware, but you need a working backup first.

Safest for you is to learn .rkp appliction programming and leave the firmware alone unless an extractor can be made.

WIZARD 12th Mar 2009 6:19 am

Re: Hooray!!! Rockchip SDK!
 
Thanks! :wink:
However, at the moment I'm not developing anything for player.
Making the new version of Gilraen! :P It's nearly completed.
You'll be able to create the awesome styles, settings, and more... 8)

AleMaxx 12th Mar 2009 9:26 am

My player is compatible with the Ramos T8 and I was able to flash it with the T8 firmware (its called Shoktec x5005) but that model sadly doesnt support rkp-games. Btw, has somebody verified that this firmware for rk2706 does support rkp-games? I havent yet found anything in the source that looks like a rkp-loader. I think the games are part of the firmware ("/application/game/gameselect.c").
WIZARD, I dont know of any decompiler that would produce actuall c-code thats close to the original source nor have I tried to use one (I was replying to a similar question before in this thread). I once read that there exists a "decompiler" for the apple iphone which is based on ARM too but couldnt find a download, there also seems to be a "Decompiler" plugin for IDA. Im using arm-elf-objdump -D -m arm -b binary <file>(assuming youre using windows) to disassemble code, but thats asm not c.

WIZARD 12th Mar 2009 11:41 am

Re: Hooray!!! Rockchip SDK!
 
However, it would be easier to compile another parts of Rockchip SDK to get the full SDK
than trying to remake the Apple SDK.

Maybe you should take some elements from RK26XX firmware,
and then try to port. I think it's possible. :P

AleMaxx 12th Mar 2009 12:39 pm

Maybe you misunderstood me WIZARD, I wasnt talking about an Apple SDK at all and I dont see any reason to port parts of the RK26xx SDK.
In my opinion the first step has to be to run some own code on the device and that doesnt seem to be an easy task to me atm. If that has been achieved one can easyly dump the whole internal memory space to a file or install a custom bootloader.

Regards Ale

Benjy 12th Mar 2009 2:00 pm

i tried to compile the emulator today again but it asked for debug.h i dindnt have! i created one and now im getting many errors in source code!

BTW: HELP ME WIN A MIZU M8 AND FOLLOW THE INSTRUCTIONS IN MY SIGNATURE!

AleMaxx 13th Mar 2009 2:47 am

I think i once compiled the r7dll vc-project and changed the output from .dll to .exe and indeed it compiled and ran but it didnt show up any window only some text on the console about initializing different things and then repeatedly an error message.
Quote:

initio() (DUMMY)
Enter Main!
Sys Disk Writable[0]User Disk Writable[0]OS Task Switch Error!OS Task Switch Error!OS Task Switch Error!OS Task Switch Error!OS Task Switch Error!
The problem was that there is no source for this specific code, its part of the precompiled stuff in iSource.o/iGlobals.o..., I dont remeber that exactly. Btw, i didnt get many errors but only a few with the other messages just being warnings about using deprecated string functions etc..

Regards

WIZARD 14th Mar 2009 10:18 am

Re: Hooray!!! Rockchip SDK!
 
Sorry. There was my silly question... :oops:

knob 14th Mar 2009 10:42 am

WIZARD
Look at this:-
http://mympxplayer.org/2-vt10186.htm...=asc&&start=15

wiRe was working on an extractor for Rockchip!

WIZARD 15th Mar 2009 5:08 am

Re: Hooray!!! Rockchip SDK!
 
I think that it's not finished.
Also this program could damage my firmware, and I don't have a backup.

Knob, if you have a backup for your player, then test, please! :roll:

I'll try Acronis, maybe it can do backup for the hidden partitions.

-------------------------------------------------------------------------------------------
Link to sources of the Rockchip Extractor is HERE
Link about SDK is HERE

knob 15th Mar 2009 12:02 pm

I tried to compile it but It isn't complete enough to compile, not sure how the extractor was intended to work. :(

It would be easier if it ran as a rkp application, then no problems with getting into Rockusb mode, but such an extractor would only work for players with a game menu.

WIZARD 16th Mar 2009 6:35 am

Re: Hooray!!! Rockchip SDK!
 
As I know, all the RK26xx-based players have the game menu.
RK27xx doesn't have, however, there's an application for this purpose.

So, the fact that RK27xx haven't the game menu doesn't make sense!

Benjy 16th Mar 2009 7:55 am

on my nationite OS-43 which is a rk2708 player its possible to access the hidden partition by copying a file called rkusb.tag to the root of my memory! then i have to reconnect it via usb and i can access the firmware partition and can access the APPDATA, RESOURCE, SYSTEM and so on folders! maybe it works on yours too?!

makd511 16th Mar 2009 8:02 am

Quote:

Originally Posted by WIZARD";p=&quot (Post 58870)
As I know, all the RK26xx-based players have the game menu.
RK27xx doesn't have, however, there's an application for this purpose.

So, the fact that RK27xx haven't the game menu doesn't make sense!

no

some 26 series have game but no game menu so can not access and pick specific game, it just loads a game by defaullt, player with game menu go to a screen first where you can select a game

some 27 series player have game menu, but not many, the s:flo has a firmware with games menu but its an old one, others do to like vx787 etc etc

WIZARD 16th Mar 2009 12:53 pm

Re: Hooray!!! Rockchip SDK!
 
No it's not possible to do the same thing with RK26xx,
because they're different. :cry: :cry: :cry:

WIZARD 17th Mar 2009 9:22 am

Something interesting...
http://group.zol.com.cn/12/19_111270.html

johnyboyhajabaja 18th Mar 2009 9:01 pm

I was able to find the download link to the program if you would like me to upload it, please tell me here. It seems like it would be for the 27 series only but i dont know.

knob 19th Mar 2009 12:04 pm

Re: Hooray!!! Rockchip SDK!
 
Can someone download this? :-
http://translate.google.com/translat...hl=en&ie=UTF-8

http://bbs.mydigit.cn/attachment/Typ...eab1e191b4.jpg

makd511 19th Mar 2009 4:21 pm

Re: Hooray!!! Rockchip SDK!
 
Quote:

Originally Posted by knob";p=&quot (Post 58999)

link

http://www.sendspace.com/file/m1nh82

1. Access to USB devices which are driven to obtain the information.

2. Read device version of it is to read device's firmware version and the version of boot code.

3. To obtain the version of the document I have not test out the usefulness of its functions.

4. To obtain disk information access to the machine it is the information storage capacity.

5. RKUSB switch to the status it is useful to put the machine to switch to direct repair status of the USB drive, this function is very useful, replacing the repair 拆机 upgrade troubles.

6. Upgrade features I have not test out the usefulness of its functions.

7. Delete is the Safely Remove Hardware equipment.

8.MSC types of unknown function.

9. See system disk goes without saying that this feature is very useful function, it can be directly transferred out of the machine drive system, which will help us to repair the internal firmware upgrade, and extraction of the original machine's firmware file.

10. Output OUTPUT should be understood as a direct export firmware files, but I did not test out.

WIZARD 20th Mar 2009 3:42 am

Re: Hooray!!! Rockchip SDK!
 
What I can do with this program?
Can I backup the firmware from my RK26xx? :roll:

EDIT: Look at the http://www.mpnbbs.com/ -
It's the home site from this screenshot.
Maybe there're some another programs...
Please, click HERE.

Dancemammal 20th Mar 2009 2:36 pm

RockChip extractor
 
Quote:

Originally Posted by knob";p=&quot (Post 58819)
WIZARD
Look at this:-
http://mympxplayer.org/2-vt10186.htm...=asc&&start=15

wiRe was working on an extractor for Rockchip!

I was also working on an extractor, I did look at Wire's code, although it was similer to my own.
Wire says he did manage to extract the first few bytes, but my code seems to fail when reading the firmware from the player.

The extractor can find the Player, and access the player, only the reading of the firmware needs a look at.

If anyone wants the Delphi source to this, and maybe run a fresh pair of eyes over it, then get in touch (PM), I will release as freeware should we ever get it working.

Dancemammal

knob 22nd Mar 2009 12:53 pm

Here is RKPlayer that I just started on, it's just a demo for now:-

http://www.sendspace.com/file/fon6xz

freddyzdead 23rd Mar 2009 9:04 pm

Hey Wizard:
Can I have some of whatever you're on?

WIZARD 24th Mar 2009 6:04 am

Re: Hooray!!! Rockchip SDK!
 
Interesting. I have ran threw the code. :shock:
Maybe it'll grow to a cool program for Rockchips! :P
Want to test this sample program, e.g. the navigation. (the only thing it can)
However, I don't know how to compile the .out file. :roll:

knob 24th Mar 2009 10:44 am

It's easy to compile, just open config "player.ini"
in FWTools and hit the compiler button to compile "RKPlayer.out"

WIZARD 24th Mar 2009 12:03 pm

Re: Hooray!!! Rockchip SDK!
 
However, after I've launched the compiled .rkp with icon,
I saw the black screen, and after a few clicks
there was a picture for 0.1 second (maybe exit.bmp) and then the exit. :(
Unfortunately, I have a lot of homework, :cry:
and will be unavailable to develop anything for a long term,
was lucky to complete the new version of Gilraen,
because must prepare for the big tests. :roll:
Have some of time only for launching something compiled,
and compile the source code, but not for something more difficult.

Can you launch it on your player, and see the pictures?
Was hardware configuration SDRAM 0x16bit & CPU 48 MHz,
or another? LCD size = 320x240 ? Orientation = X axis?

If your settings were different, please tell me,
maybe my settings were wrong
and that's why I have some problems.

knob 24th Mar 2009 12:43 pm

Here are the settings:-
http://i203.photobucket.com/albums/a...a/RockGDK1.jpg

no SDRAM setting.

WIZARD 25th Mar 2009 7:18 am

Re: Hooray!!! Rockchip SDK!
 
Don't know why I had the problems,
because was compiling with the same settings
(if SDRAM is default, then it is 0)
However, I have compiled again, and now it's working! :)
Strange, because the size in bytes for old and new files was the same! :roll:

After I've pressed the >|| button when music selected,
saw the black window with the border. Good.
But I can't go to settings:
while the <key> button, the program will exit.

P.S. Guys, have you downloaded the new version of Gilraen HERE ?
A lot of new features, create the awesome, nice and spooky styles,
and save them to the settings file... :P

WIZARD 1st Apr 2009 5:04 am

Have you any news?

AleMaxx 2nd Apr 2009 1:50 am

Well, so far I wrote a tool that lets me include code into the existing firmware or create a new firmware file from some binary code. I also did a little research on the firmware of my player and could identify some functions. Actually I wasnt able to do sth useful except for verifying that my code actually gets executed and fried the player twice. Happily I was able to repair it using the RK27 Device Manager. Well, thats it.

knob 4th Apr 2009 10:30 am

hi AleMaxx

That's good. have you finished the tool yet?
Could you upload it someplace, I have a couple of base.rkw files I would like to merge but need something to fix the checksum with.

AleMaxx 4th Apr 2009 6:18 pm

Yes, its more or less finished. I uploaded it here together with a little bit of documentation. I dont give any guarantee though that it works as expected, check the output with IDA or some disassembler of your choice. It cannot repair checksums, but that could be added if needed. What do you mean by merging btw, knob?

Regards


All times are GMT -7. The time now is 7:34 am.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 RC 2