SD870 porting - first steps? - DryOS Development - CHDK Forum supplierdeeply

SD870 porting - first steps?

  • 65 Replies
  • 42043 Views
*

Offline RyeBrye

  • **
  • 73
  • SD-870
SD870 porting - first steps?
« on: 28 / January / 2008, 17:29:34 »
Advertisements
What are the first steps that I can take to help the porting of CHDK to the SD870?

Here's what I've already done:
 - Dumped firmware
 - Loaded dumped firmware into IDA
 - In IDA, applied the signatures
 - Ran GrAnd's chdk.idc file for DryOS

I assume I have to download the chdk source somewhere, and start a port for the SD870 where I input the mappings of the various functions... and I assume I'll have to locate certain functions that aren't already mapped out for me by the signatures file or the idc script.

With the firmware dumping process, things are mapped out by logical milestones (i.e. 1: get camera to hang with a .bin file, 2: find LED, 3: blink firmware, 4: decode firmware... etc)

What are some milestones I should be working towards in this port?

I will do as much as I can to help push things along. Although ARM is new to me, assembly is not - and neither is C.

At this point in my learning curve I'm mostly becoming familiar with the tools and "best practices" of CHDK developers / porters.

Is there an easy way to divide up labor between several of us? (Assuming some of the other eager SD870 owners want to help in the porting process also)

« Last Edit: 28 / January / 2008, 17:32:00 by RyeBrye »

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: SD870 porting - first steps?
« Reply #1 on: 28 / January / 2008, 17:51:42 »
Quote from: RyeBrye
What are some milestones I should be working towards in this port?
I will do as much as I can to help push things along. Although ARM is new to me, assembly is not - and neither is C.

The large thing that has to be fitted is the platform-dependent part. A few minor parts outside platform can be fixed later. The basic procedure is listed here. Note that you will probably not need anything from S2/3/5 but rather from some other SD-series camera. Also CHDK trunk has been updated and now contains Allbest's build and also includes the A720 so you don't need the outdated code from the other posting. The information about how CHDK starts and works is still true, though.

If you need a start with arm assembly, look at the arm-specific parts here as well as the "ARM7 TDMI", the "ARM ARM" and the "ARM Assembler Guide" linked at the end of the wiki page.

Good luck with your port.

*

Offline RyeBrye

  • **
  • 73
  • SD-870
Re: SD870 porting - first steps?
« Reply #2 on: 28 / January / 2008, 23:51:37 »
Thanks for the info...

I'm testing my toolchain out - but don't have anything to compare my output .bin files to... Can you tell me what the md5 of the main.bin in the trunk/loader/a720 is?

(I'm building on a Mac - which is pretty close to Linux... Although if I can't get it to work on my mac, I can just get use my Linux box to build it)

*

Offline intrinsic

  • *
  • 29
  • S5IS
Re: SD870 porting - first steps?
« Reply #3 on: 29 / January / 2008, 07:50:32 »
I'm testing my toolchain out - but don't have anything to compare my output .bin files to... Can you tell me what the md5 of the main.bin in the trunk/loader/a720 is?

If you built the toolchain from source following the steps in the "Compiling CHDK under Linux" page I should think you will be OK.

If the build (of the A720 version) completes that's a good indication that your toolchain is fine (Under windows building the DryOS code goes into an infinite loop and eventually crashes the shell)


*

Offline RyeBrye

  • **
  • 73
  • SD-870
Re: SD870 porting - first steps?
« Reply #4 on: 29 / January / 2008, 09:57:31 »
If you built the toolchain from source following the steps in the "Compiling CHDK under Linux" page I should think you will be OK.

If the build (of the A720 version) completes that's a good indication that your toolchain is fine (Under windows building the DryOS code goes into an infinite loop and eventually crashes the shell)

Well... It builds - but my toolchain setup is quite a bit simpler than the instructions for the linux toolchain. I'm using arm-elf-gcc -4.1.1 and I didn't apply any custom patches to it. Everything builds fine (it seems) and I get a main.bin out the other end - but because of my different gcc version I'm wondering if it produces the same output...

Actually... come to think of it... the output will probably be different even if it is still functional because of the different version of GCC.

I'll probably just build up the linux toolchain on my linux machine following the same instructions and use that as my build box until I get to the point where I can verify that my Mac (very simple) toolchain works.

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: SD870 porting - first steps?
« Reply #5 on: 29 / January / 2008, 11:10:28 »
Quote from: RyeBrye
Well... It builds - but my toolchain setup is quite a bit simpler than the instructions for the linux toolchain.

The rule is actually pretty simple: Use the official build.

You may (or better: will) experience all kinds of strange behaviour if you use something else. So use your linux-box and compile there. The official compiler is built in less than an hour - far less time than you will spend for your actual work (and far less time than you will spend hunting for bugs resulting from an incompatible compiler).

Cheers.

Re: SD870 porting - first steps?
« Reply #6 on: 05 / February / 2008, 05:19:02 »
Hi,

Any news on this port?

Cheers

*

Offline RyeBrye

  • **
  • 73
  • SD-870
Re: SD870 porting - first steps?
« Reply #7 on: 05 / February / 2008, 17:11:03 »
Well...

No.

I have the dump loaded into IDA - but my free time has evaporated for a while with my real job being busy and my paying freelance projects piling up.

Anyone who wants to take a stab at it is more than welcome to :)


*

Offline dodgersp

  • *
  • 9
  • Ixus 860is - SD 870is
Re: SD870 porting - first steps?
« Reply #8 on: 17 / March / 2008, 08:59:12 »
I have Firmware loaded on IDA and signed and chdk.idc aplied. I also have svc chdk and i have copied a720 platform and loader into new ixus860is_sd870is directory. I've changed camera.h and makefile.inc to include new camera and it compiles perfectly...
What should I do next? and how? :)

*

Offline dodgersp

  • *
  • 9
  • Ixus 860is - SD 870is
Re: SD870 porting - first steps?
« Reply #9 on: 18 / March / 2008, 10:40:05 »
I've changed all mem. dirs from boot.c and stubs_entry_2.S from a720 to its correspondences at sd870 firmware and compiles... but I don't know how to try in my camera? Can anyone tell me what should I write to only test that the firmware works?

 

Related Topics