Porting chdk to the G9 - DryOS Development - CHDK Forum  

Porting chdk to the G9

  • 245 Replies
  • 105026 Views
Porting chdk to the G9
« on: 19 / April / 2008, 10:27:38 »
Advertisements
Hello all,
this topic is aimed to concentrate the effort in order to have a working chdk for the canon powershot G9.

I'm a total newbie in this things like: assembling, disassembling, reverse engeenering, compiling etc., so I hope some of the developers could take to heart the issue and help us (G9 users interested in the porting) coordinating the job.

What we have/know:

1) G9 works with DryOs

2) G9 P-id

- should be 315A according to P-ID - CHDK Wiki

3) Fimware dumps:

- a complete dump made by Titan_G9 - Firmware G9 1.00D (from 0xFF810000 created by Titan_G9)
- 2 partitial dump of the Firmware G9 1.00f, one made by dew (not uploaded, at least as I know) and one made by me (avaible). Dew wrote that our two dumps are different.

The links to those firmwares can be found in G9 - CHDK Wiki

Useful links:

1) Knowledge

- G9 chdk wiki page at G9 - CHDK Wiki
- Loading dump to IDA at Loading dump to IDA - CHDK Wiki
- Dryos porting page at DryOS Porting - CHDK Wiki
- ADDING SUPPORT FOR NEW CAMERA at HDK/Adding support for new camera - chdk - Trac
- Property case list: PropertyCase - CHDK Wiki
- Modifying the CHDK Sources at Modifying the CHDK Sources - CHDK Wiki
- For Developers For Developers - CHDK Wiki
- Trunk /trunk - chdk - Trac

2) Video tutorials

- Happy dumping with IDA:

 - How to load dump in IDA 1:  "ida_load_g9"- Director: GrAnd
 - How to load dump in IDA 2: the  data offset method:
"ida_load_g9_with_offset"
- Director: GrAnd
 

3) Tools

- udumper at
- Winmerge at WinMerge
- Notepad++ and Hex Plug-in at .:: NOTEPAD++ ::.

4) Files

- Signatures and idc for Dryos at DryOS - some success
- Auto-generated Dryos signatures.h for CHDK at /trunk/tools - chdk - Trac - file signatures_dryos.h

Hope this helps
« Last Edit: 20 / April / 2008, 12:10:44 by bongo_bingo »

Re: Porting chdk to the G9
« Reply #1 on: 19 / April / 2008, 10:44:13 »
What I'm doing at the moment:

I've loaded my dump in disassembler this way:

1) switched to Arm processor

2)- Rom start address: 0x00000000
   - Rom size: 0x003FFFFF

It seems that the instructions starts at ROM:0009BE00

I'm trying to apply the Dryos Signature:
 

- searching in the forum I've found this DryOS - some success
 GrAnd made IDA-signature file for DryOS firmwares (based on functions from A720 dump), wil this work for the G series?
 I'm trying
« Last Edit: 19 / April / 2008, 11:04:33 by bongo_bingo »

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: Porting chdk to the G9
« Reply #2 on: 19 / April / 2008, 11:04:07 »
Hi,

have you already seen the signatures.zip in this message?

http://chdk.setepontos.com/index.php/topic,234.msg3146.html#msg3146

Best regards,
tommi


Re: Porting chdk to the G9
« Reply #3 on: 19 / April / 2008, 11:09:44 »
Hi,

have you already seen the signatures.zip in this message?

http://chdk.setepontos.com/index.php/topic,234.msg3146.html#msg3146

Best regards,
tommi



which differences with DryOS - some success ?


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Porting chdk to the G9
« Reply #4 on: 19 / April / 2008, 11:17:31 »
which differences with DryOS - some success ?

This is signatures for IDA, "official" release is here: http://grandag.nm.ru/hdk/CanonFW_A-Series_Signatures_for_IDA.rar (for all cameras, VxWorks and DRYOS).

Auto-generated signatures.h for CHDK build already in trunk: http://tools.assembla.com/chdk/browser/trunk/tools -  signatures_dryos.h and signatures_vxworks.h files.
« Last Edit: 19 / April / 2008, 11:24:31 by ewavr »

perhaps I am too much insufficient in order to help
« Reply #5 on: 19 / April / 2008, 11:23:23 »
which differences with DryOS - some success ?

This is signatures for IDA, "official" release is there: http://grandag.nm.ru/hdk/CanonFW_A-Series_Signatures_for_IDA.rar

Auto-generated signatures.h for CHDK build already in trunk: http://tools.assembla.com/chdk/browser/trunk/tools - file signatures_dryos.h

thanks ewavr

But should I compile signatures_dryos.h before using it in Ida?
« Last Edit: 19 / April / 2008, 11:26:56 by bongo_bingo »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Porting chdk to the G9
« Reply #6 on: 19 / April / 2008, 11:25:44 »
But should I compile signatures_dryos.h before using it in Ida?

No. This signatures not for IDA.

Re: Porting chdk to the G9
« Reply #7 on: 19 / April / 2008, 12:14:49 »
But should I compile signatures_dryos.h before using it in Ida?

No. This signatures not for IDA.

Ok!
how should I use it?

Loaded CanonFW_DryOS_A-Series.sig, running CHDK.idc -> 17:18:26
It takes a lot of time! :o (turion 64 tl 50, 2.5 Gb ram)
« Last Edit: 19 / April / 2008, 12:55:55 by bongo_bingo »


*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Porting chdk to the G9
« Reply #8 on: 19 / April / 2008, 13:53:46 »
No. This signatures not for IDA.

how should I use it?

They are used automatically during the compilation.


I've loaded my dump in disassembler this way:
1) switched to Arm processor
2)- Rom start address: 0x00000000
   - Rom size: 0x003FFFFF

Incorrect.
Before loading, you should strip zeros at least in the beginning of file. Then load it from 0xFF810000 in the way shown at Loading dump to IDA - CHDK Wiki


- 2 partitial dump of the Firmware G9 1.00f, one made by dew (not uploaded, at least as I know) and one made by me (avaible). Dew wrote that our two dumps are different.

Just have checked. There are no differences between them, of course in part you dumped.
« Last Edit: 19 / April / 2008, 14:08:38 by GrAnd »
CHDK Developer.

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Porting chdk to the G9
« Reply #9 on: 19 / April / 2008, 14:32:25 »
Loaded CanonFW_DryOS_A-Series.sig, running CHDK.idc -> 17:18:26
It takes a lot of time! :o (turion 64 tl 50, 2.5 Gb ram)

4m 45s with all my actions from choosing the file to the readiness.
See flash movie - Loading G9 dump into IDA
« Last Edit: 19 / April / 2008, 14:59:07 by GrAnd »
CHDK Developer.

 

Related Topics