SX520HS Porting thread. - DryOS Development - CHDK Forum

SX520HS Porting thread.

  • 209 Replies
  • 82916 Views
SX520HS Porting thread.
« on: 02 / April / 2015, 04:32:51 »
Advertisements
I've waited around for some time now for any development in porting CHDK to SX520HS. Seems it's a no go.
I've decided that I'll try initiating the porting process(with very little knowledge of coding).

I'm following this article.

Question: I tried to load the fw dump to IDA which went well up until where I have to click the "Execute a IDC file" tool button which I cant find on my IDA toolbar cause my IDA's toolbar is a mess. I would like to have some help with this thing. Also please tell if this is the right method to port or if there's any easier way or if this is right at all. As you can see it's my first time. Thanks


Theo.
« Last Edit: 02 / April / 2015, 04:35:01 by itz_theo »

Re: SX520HS Porting thread.
« Reply #1 on: 02 / April / 2015, 08:59:15 »
Welcome to CHDK.   I think we all wish you good luck with the porting process and will help you as much as possible.

My first thought would be to ignore all the stuff about IDA  (at least for now).   It's quite old information that during the early days of CHDK  was a valuable tool (although expensive)

CHDKs'  own tools have become much better in the meantime.

So for a "standard" port  of a regular camera  ( i.e. one not using a DIGIC6 processor) the steps are basically :

  • Obtain a firmware dump for your camera and firmware versions
  • Create a "build environment" on your PC
  • Make sure you can compile any of the existing CHDK ports with the build environment
  • Identify which CHDK ports you are going to use as a referece  model for your port.
  • Create a folder for your camera model in the CHDK loader folder by copying the loader folder for your reference camera.
  • Create an additional folder for your camera model in the CHDK platform folder by copying the platform folder and subfolders for your reference camera (rename the firmware version subfolder to suit).
  • Copy the firmware dump to your firmware folder and run the sigfinder to create the stubs_entry.S file.
  • You will need to go through every file for your camera in the loader & platform folders and convert for your firmware version.
  • If your reference camera used codegen for the assembler files,  copy the firmware dump to your firmware folder and start working on that.

Obviously, there are a lot of things to do in each of the steps listed above and there may be a better description of each step.  But it's a place to start.

If you just want to look at the firmware dump (and possibly play with the codegen stuff) then chdk-pt is a little easier to use than IDA  and it creates source code correctly formatted for CHDK's build process.

Edit :  the CHDK IRC channel is a good place to obtain help in "real time".  However, it's mostly only active from about 9 PM to midnight ( USA West Coast time).

« Last Edit: 02 / April / 2015, 09:01:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX520HS Porting thread.
« Reply #2 on: 02 / April / 2015, 13:59:27 »
Thanks for the response. This helps.

Re: SX520HS Porting thread.
« Reply #3 on: 03 / April / 2015, 16:59:08 »

CHDKs'  own tools have become much better in the meantime.

      Could you suggest a chdk tool that I could start with


    run the sigfinder to create the stubs_entry.S file.

      I have no idea what this means.


Re: SX520HS Porting thread.
« Reply #4 on: 03 / April / 2015, 18:06:26 »
CHDKs'  own tools have become much better in the meantime.
      Could you suggest a chdk tool that I could start with
    run the sigfinder to create the stubs_entry.S file.
      I have no idea what this means.
To help me understand at what level to best answer you questions, can you give us a little personal back about your programming experience and knowledge?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX520HS Porting thread.
« Reply #5 on: 06 / April / 2015, 11:00:28 »
Well I'm finishing my bachelors in computer science and engineering.
Though programming isn't my domain I can manage.
Hope this helps.

*

Offline srsa_4c

  • ******
  • 4451
Re: SX520HS Porting thread.
« Reply #6 on: 06 / April / 2015, 19:52:46 »
      I have no idea what this means.
Sigfinder (signature finder) is a tool that locates many addresses (functions, variables) needed by a CHDK port. It's tools/finsig_dryos(.exe) for DryOS. If you have placed the firmware dump in platform/(yourport)/sub/(rev)/PRIMARY.BIN, it will be executed automatically during the build process and create stubs_entry.S (plus 2 .csv files with a lot of addresses). You can also call it manually.
BTW, since you have IDA, getting familiar with (and using) code_gen can be the last porting step.
code_gen is also one of the utilities in the tools directory.

Oh, and I don't expect much from those old idc scripts on a new firmware such as your cam's.
Getting IDA to use the addresses found by the sigfinder would make more sense.
« Last Edit: 06 / April / 2015, 20:21:07 by srsa_4c »

Re: SX520HS Porting thread.
« Reply #7 on: 07 / April / 2015, 01:58:49 »
Thanks for explaining that. Although I have IDA, it seems a bit heavy for me. Do I have any other option here?


Re: SX520HS Porting thread.
« Reply #8 on: 07 / April / 2015, 08:03:54 »
Thanks for explaining that. Although I have IDA, it seems a bit heavy for me. Do I have any other option here?
There are a few other choices :
CHDK-PT
GPL Tools
arm-linux-gnu-objdump
ARM tool (assembler, disassembler, emulator) developing
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX520HS Porting thread.
« Reply #9 on: 07 / April / 2015, 12:47:03 »
Thanks for explaining that. Although I have IDA, it seems a bit heavy for me. Do I have any other option here?
There are a few other choices :
CHDK-PT
GPL Tools
arm-linux-gnu-objdump
ARM tool (assembler, disassembler, emulator) developing

Appreciate the links. Thanks

 

Related Topics