ELPH 340 (IXUS 265) - page 6 - DryOS Development - CHDK Forum

ELPH 340 (IXUS 265)

  • 134 Replies
  • 49515 Views
Re: ELPH 340 (IXUS 265)
« Reply #50 on: 27 / July / 2015, 06:11:01 »
Advertisements
Hi, is there any news on IXUS 265HS / Elph 340 HS?

thanks

Re: ELPH 340 (IXUS 265)
« Reply #51 on: 27 / July / 2015, 09:17:45 »
Hi, is there any news on IXUS 265HS / Elph 340 HS?

link> CHDK FAQ : My camera isn't ported yet
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline d27_

  • *
  • 10
Re: ELPH 340 (IXUS 265)
« Reply #52 on: 09 / August / 2015, 23:26:27 »
I did a firmware dump and according to the strings it is version 1.00C - https://www.dropbox.com/s/50t1v44th2wp5cn/PRIMARY.BIN\?dl\=0

I also started a port and got to the point where it compiles, but I'm struggling to test the compiled binary (just to see if I'm on the right track, atm it won't really do a lot since most stuff isn't done yet). I tried getting the fi2 offsets to use the firmware upgrade method of loading CHDK, but couldn't find them or make them work :(

*

Offline reyalp

  • ******
  • 12586
Re: ELPH 340 (IXUS 265)
« Reply #53 on: 10 / August / 2015, 00:27:36 »
The dancingbits should be 12 (the one marked dryos r54 in dancingbits.h)

The FI2 key should be at FF014364 and the IV is probably the same as all the other d4 and later.
Don't forget what the H stands for.


*

Offline d27_

  • *
  • 10
Re: ELPH 340 (IXUS 265)
« Reply #54 on: 11 / August / 2015, 02:43:36 »
I think the IV key is at 0xff7bd290. I copied the 4 consecutive values I got from 0xff014364 and 0xff7bd290 and put them in fi2.inc and recompiled, but when I try to run the firmware update I get a "file error". May I ask how you determined the address for the FI2 key? I tried following the instructions from http://chdk.setepontos.com/index.php/topic,2995.msg28117.html#msg28117, but 0xFFFF0004 looks like this:

> ffff0004:   ffffffff            ; <UNDEFINED> instruction: 0xffffffff

I disassembled the firmware dump that I attached using http://chdk.wikia.com/wiki/GPL:disassemble.pl using the offset 0xFF010000.

I don't know if it matters, but I've set up my dev environment as follows on Ubuntu 14.04 64 bit:

> apt-get update && apt-get install build-essential && apt-get install gcc-arm-none-eabi

*

Offline srsa_4c

  • ******
  • 4229
Re: ELPH 340 (IXUS 265)
« Reply #55 on: 11 / August / 2015, 11:08:58 »
I think the IV key is at 0xff7bd290. I copied the 4 consecutive values I got from 0xff014364 and 0xff7bd290 and put them in fi2.inc and recompiled, but when I try to run the firmware update I get a "file error".
The address seems correct (0xf7, 0xc1, ...). Note that you need to copy the bytes as is, so one possibility is that you changed byte order due to endianness. The other possibility is that this camera generation has another member in the fi2_rec_s struct (see tools/packfi2/fi2enc.c. If that's the case, see the updated fi2dec source. These will need to be changed:
- the fi2_rec_s struct
- fi2rec_size()
- and perhaps there will be alignment issues: the blocks need to start at 128 bit-aligned offsets.

Quote
May I ask how you determined the address for the FI2 key? I tried following the instructions from http://chdk.setepontos.com/index.php/topic,2995.msg28117.html#msg28117, but 0xFFFF0004 looks like this:
The bootloader in DIGIC 4+ cameras starts at (ROM START)+0x10000, that's 0xFF010000 for you.

*

Offline d27_

  • *
  • 10
Re: ELPH 340 (IXUS 265)
« Reply #56 on: 11 / August / 2015, 12:34:39 »
I think I got the endianess wrong, but still doesn't work. How do I know if the struct is supposed to have an extra field?

*

Offline srsa_4c

  • ******
  • 4229
Re: ELPH 340 (IXUS 265)
« Reply #57 on: 11 / August / 2015, 12:54:58 »
I think I got the endianess wrong, but still doesn't work. How do I know if the struct is supposed to have an extra field?
If you have better asm skills, look around "iterate through blocks of the update package" of this slightly annotated file, as that part of the code goes through the header that consists of an array of fi2_rec_s structs. I did not try to interpret that part yet.
Note that the the addresses are for the 100a firmware.

edit:
If I'm interpreting the code correctly, the struct has not changed, it still has 9 fields.
Are you using the correct PLATFORMID in makefile.inc?
« Last Edit: 11 / August / 2015, 17:54:42 by srsa_4c »


*

Offline d27_

  • *
  • 10
Re: ELPH 340 (IXUS 265)
« Reply #58 on: 11 / August / 2015, 22:55:12 »
Thanks for the annotated code - I've been trying to remember assembler, but only made out the very basics.

Are you using the correct PLATFORMID in makefile.inc?

I'm using PLATFORMID=12937 - I got that from stubs_entry.S

*

Offline srsa_4c

  • ******
  • 4229
Re: ELPH 340 (IXUS 265)
« Reply #59 on: 12 / August / 2015, 18:22:46 »
Are you using the correct PLATFORMID in makefile.inc?

I'm using PLATFORMID=12937 - I got that from stubs_entry.S
I'm out of new ideas for the moment.

If somebody with one of the working DIGIC 4+ cameras (ixus160 for example) could try loading CHDK with the "firmware update" method, that would help.

 

Related Topics