SX110IS - howto start porting - DryOS Development - CHDK Forum

SX110IS - howto start porting

  • 573 Replies
  • 237267 Views
SX110IS - howto start porting
« on: 26 / December / 2008, 14:19:13 »
Advertisements
Hi, I'm a newbie of CHDK with some knowledge of assembly (but not ARM assembly  :'( ).
I did the dump of the firmware of my SX110IS and I disassembled it with IDA, helped by some sigs and idc.
The problem is that I can't find in all the wiki a full and well structured tutorial on how to proceed with the porting of CHDK.

Can someone help me with a good link?

Until now I found the first two parameters for the porting of CHDK on this camera:

char *hook_raw_image_addr()
{
   //Found at ROM:FFE60B00
   //      ROM:FFE60B50                 LDR     R6, =0x10805040
   //      ...
   //      ROM:FFE60BA8                 MOV     R1, R6
   //      ROM:FFE60BAC                 ADR     R0, aCrawBuffP  ; "CRAW BUFF       %p"
   
   
   return (char*)0x10805040;
}

long hook_raw_size()
{
   //      Found at ROM:FFE60B00
   //      ROM:FFE60BB4                 LDR     R1, =0xEC04F0
   //      ROM:FFE60BB8                 ADR     R0, aCrawBuffSizeP ; "CRAW BUFF SIZE  %p"
   //      ROM:FFE60BBC                 BL      sub_FFCE7000
   
   return 0xEC04F0;
}

Thanks for any help.

=============
My camera info is:
--------------------------
Canon PowerShot SX110 IS
P-ID:3192   PAL D

Firmware Ver GM1.00B
NoError
Jun 25 2008   15:08:34
---------------------------
Adj Ver.009.006

IS Firm Ver. 3.00
IS Param Ver. 3.00
---------------------------

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: SX110IS - howto start porting
« Reply #1 on: 26 / December / 2008, 15:42:22 »
long hook_raw_size()
{
 return 0xEC04F0;
}

14 bit RAW?  :o

*

Offline reyalp

  • ******
  • 14118
Re: SX110IS - howto start porting
« Reply #2 on: 26 / December / 2008, 20:20:06 »
Hi, I'm a newbie of CHDK with some knowledge of assembly (but not ARM assembly  :'( ).
I did the dump of the firmware of my SX110IS and I disassembled it with IDA, helped by some sigs and idc.
The problem is that I can't find in all the wiki a full and well structured tutorial on how to proceed with the porting of CHDK.

Can someone help me with a good link?
Nope. Assuming you've already found For Developers - CHDK Wiki no better link exists. Nor is one likely to appear, because step by step tutorials aren't a substitute for understanding.

If you cannot figure out what you need to do based on examining the current sources and pages found under For Developers - CHDK Wiki you need to study them further or give up. Basically, you have to make everything under loader and platform for your camera, as described in Adding support of a new camera. You can refer to existing ports to verify that you've correctly identified the corresponding things in your port, and to understand what those files do in the first place.  There is no short cut, you have to actually understand how CHDK works to make a successful port. The best place to get this understanding is from the source. That's a lot of work, but only a small part of the effort needed to get your port running.

This thread: How does CHDK start running may help you get started.

If you are unfamiliar with ARM architecture and assembler, refer to the excellent documentation available freely from ARM. There's links to the most pertinent documents in Developer Technical Documents. Assuming you have sufficient general understanding of assembler and computer architecture, you can easily teach yourself everything you need to know about ARM from there.

If you have specific questions about particular aspects CHDK, there are people here who will gladly answer them.
Don't forget what the H stands for.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: SX110IS - howto start porting
« Reply #3 on: 28 / December / 2008, 07:42:00 »
you should also read the huge thread about the g9 porting (for example, there are more similar threads for different cameras)


Re: SX110IS - howto start porting
« Reply #4 on: 02 / January / 2009, 08:56:13 »
14 bit RAW?  :o

The SX100IS digicam has:
long hook_raw_size()
{
   return 0x9DCCE0;
}

It's a 8Mpixels, so .... 10 bit RAW???   :blink:

I don't know...  :xmas

Re: SX110IS - howto start porting
« Reply #5 on: 02 / January / 2009, 09:16:24 »
Nor is one likely to appear, because step by step tutorials aren't a substitute for understanding.
I hope to be able to explain my point without misunderstanding due to my bad english.
I know that you are right about the necessity to understand all the process. And I know that all GPL software are done by the efforts of volunteers with no obligation.
So I'm really grateful to all of you.
But.... hey boys.... this is the most hard way!  :)
In my perspective, a tutorial could be useful only to organize some little information as:
1) The list of functions that anyone must find into a disassembled firmware;
2) The list of hardware pointers (leds, keyboard,free RAM ecc..)

Anyway, why I can find only few IDA database (idb) of disassembled firmware? For example it will be useful for me to find the SX100IS firmware fully disassembled.

Thanks again and happy new year!  :xmas

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: SX110IS - howto start porting
« Reply #6 on: 02 / January / 2009, 09:38:42 »
It's a 8Mpixels, so .... 10 bit RAW???   :blink:

Yes, 10 bit RAW for all CHDK ported cameras.

Quote
Anyway, why I can find only few IDA database (idb) of disassembled firmware?

Do it yourself in 10-20 minutes from dump using IDA scripts and signatures for CHDK (Loading dump to IDA - CHDK Wiki).

Quote
For example it will be useful for me to find the SX100IS firmware fully disassembled.
Maybe not only SX100, but also A650, A720 (it seems that these CHDK ports are complete and bug-free).

Re: SX110IS - howto start porting
« Reply #7 on: 02 / January / 2009, 10:16:43 »
Yes, 10 bit RAW for all CHDK ported cameras.

Sorry, I can't understand:
10 bits for every channel (R, G and B) for a total of 30 bits or a total of 10 bits?
In the second case is the sensor able to record 1024 colours only??   :'(

Thanks
« Last Edit: 02 / January / 2009, 10:29:52 by nomi_68k »


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: SX110IS - howto start porting
« Reply #8 on: 02 / January / 2009, 11:09:39 »
10 bits for every channel (R, G and B) for a total of 30 bits or a total of 10 bits?
In the second case is the sensor able to record 1024 colours only??   :'(

10 bits for each channel, but we don't have RGB pixels; it's a Bayer matrix: http://en.wikipedia.org/wiki/Bayer_filter.

And the sensor is analog, there's just usually too much noise in point&shoot cameras to bother using more than 10 bits (considering more bits require more processing power and memory i.e. time and money) so Canon doesn't even though the A/D converter in some schematic snippet was actually a 12-bit chip.

*

Offline reyalp

  • ******
  • 14118
Re: SX110IS - howto start porting
« Reply #9 on: 02 / January / 2009, 22:13:15 »
In my perspective, a tutorial could be useful only to organize some little information as:
1) The list of functions that anyone must find into a disassembled firmware;
2) The list of hardware pointers (leds, keyboard,free RAM ecc..)
If you look through an existing ports platform/<camera>/sub/<firmware version>/*.S these things are pretty obvious. See also include/lowlevel.h and platform/generic/*, and be sure you understand Signature finder - CHDK Wiki
The list of addresses you want is right there, and unlike a tutorial, it's never out of date!

You need to understand these things anyway. If you don't have the time/skill/energy to understand this part of CHDK, you won't make a successful port.

Quote
Anyway, why I can find only few IDA database (idb) of disassembled firmware? For example it will be useful for me to find the SX100IS firmware fully disassembled.
For any camera with a dump available, load the bin, apply the vxworks or dryos FLIRT, run the idc scripts. I suggest doing this with all the reference firmwares, and whatever camera is most similar to your own. You can also work backwards from the sig_ref*.txt or stubs_entry.S/stubs_entry_2.s from any camera.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal