supplierdeeply

g1x mk2 porting

  • 8 Replies
  • 2634 Views
g1x mk2 porting
« on: 04 / November / 2014, 12:33:23 »
Advertisements
Hello,
is someone working on the topic?
greetz,
Sem

Re: g1x mk2 porting
« Reply #1 on: 04 / November / 2014, 18:39:36 »
link> CHDK FAQ : My camera isn't ported yet

In addition to the above,  the G1 X MK2 uses the new DIGIC6 processor, which makes porting to CHDK even more difficult and time consuming.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 3686
Re: g1x mk2 porting
« Reply #2 on: 04 / November / 2014, 18:46:51 »
... and if you can't get this script to work, that might be a sign that Canon has changed something (perhaps they don't want the camera's fw to go public...)

Re: g1x mk2 porting
« Reply #3 on: 05 / November / 2014, 08:02:18 »
Hey, the script to dump the fw works... i've got a dump here: http://we.tl/dHbG5I8Umi
someone can help me with porting? I'm familiar with C but not Assembler..
I really want to get CHDK to run on the Camera...

Greetz,
Sem


Re: g1x mk2 porting
« Reply #4 on: 05 / November / 2014, 08:28:20 »
Hey, the script to dump the fw works... i've got a dump here: http://we.tl/dHbG5I8Umi
Thanks for that.  Good new that Canon still supports Canon BASIC !

Quote
someone can help me with porting? I'm familiar with C but not Assembler..
You probably want to do a little reading first.  Then we can help either here or in the CHDK IRC channel (evenings in North America is best).
Start half way down this page - the "Common Articles" section : http://chdk.wikia.com/wiki/For_Developers

Pay particular attention to : http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11487
Re: g1x mk2 porting
« Reply #5 on: 06 / November / 2014, 01:37:15 »
Also, as waterwingz mentioned earlier, Digic 6 uses a new CPU architecture which is not currently supported in the main CHDK source. You'll want to follow srsa_4c's sx280 thread http://chdk.setepontos.com/index.php?topic=11550.0 and the digic 6 thread http://chdk.setepontos.com/index.php?topic=11316

From the dump, the OS is DRYOS version 2.3, release #0054+p3, which has been seen on a number of 2014 cameras.
Don't forget what the H stands for.

Re: g1x mk2 porting
« Reply #6 on: 06 / November / 2014, 09:30:27 »
Hello reyalp,

where did you got this information from? I tried to dissassemble the primary.bin but i don't get how to find the entry point for chdk.

I read the recommended pages but have still no idea where to start (?)

Greetz,
Semjon

*

Offline reyalp

  • ******
  • 11487
Re: g1x mk2 porting
« Reply #7 on: 06 / November / 2014, 23:28:49 »
where did you got this information from? I tried to dissassemble the primary.bin but i don't get how to find the entry point for chdk.
I just opened it in vim and searched for DRY and GM1. That won't help you with actual porting of course.
Quote
I read the recommended pages but have still no idea where to start (?)
If you don't have a fair bit of assembly experience, porting a Digic 6 is going to be extremely difficult. The best advice I can give you is to look at srsa's sx280 port.
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 11487
Re: g1x mk2 porting
« Reply #8 on: 07 / November / 2014, 16:29:19 »
Replying to question sent in PM.
i have successfuly disassembled the firmware dump but i dont know how to search for the right names for the functions.
Generally speaking, you won't have names. The exception is "event procedures" which are function that are exported to the firmwares own scripting system. CHDK uses some of these, and you can sometimes also use them as landmarks to find other code. To find eventprocs, you find the string name, and then find references to the name that are also associated with a reference to a code pointer. Often there are tables in the firmware of a pointer to the name and a pointer to the function.

For stuff that doesn't have names, you have to find other landmarks in the code. These can be other strings, like log messages or task names or calls to functions that you've already identified by other means.

Since srsa has created a working digic 6 port, your best approach is probably to work form that. First you have to understand the general organization and the startup process (this begins in the cameras loader subdirectory). After that, to find specific functions you can look at the disassembly of his firmware and then try to find the equivalents in your firmware.

This is going to require a fair bit of reverse engineering knowledge, there is no way around it. You can teach yourself what you need to know, but it will not be an easy project. You will definitely need to learn thumb2 assembler.
Don't forget what the H stands for.

 

Related Topics