A silly question about the firmware update method - General Discussion and Assistance - CHDK Forum

A silly question about the firmware update method

  • 4 Replies
  • 1713 Views
*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
A silly question about the firmware update method
« on: 24 / October / 2022, 20:16:08 »
Advertisements
Hi,guys.
This is my first post,if I placed it wrong pls move it,thanks.
When I load CHDK in firmware method,I got something like "Update firmware version? 1.0.0.0 -> 1.1.0.0"
In this,I know the 1.0.0.0 is my firmware version,but what is the 1.1.0.0? Is that the CHDK encoding process's  information? Can we modifiy it to something else(like the CHDK version,etc)
Any answer is appreciated!
Thx
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

*

Offline reyalp

  • ******
  • 14126
Re: A silly question about the firmware update method
« Reply #1 on: 25 / October / 2022, 01:16:33 »
Hi,guys.
This is my first post,if I placed it wrong pls move it,thanks.
When I load CHDK in firmware method,I got something like "Update firmware version? 1.0.0.0 -> 1.1.0.0"
In this,I know the 1.0.0.0 is my firmware version,but what is the 1.1.0.0?
It's just a field that needs to be set in the firmware file.
Code: [Select]
Is that the CHDK encoding process's  information? Can we modifiy it to something else(like the CHDK version,etc)
[/quote]
For PS.FI2 files, the version is set in tools/packfi2/fi2enc.c
[code]
 hdr.id=0x01010000;
Changing that to, say 0x01020000 shows 1.2.0.0

For vxworks cams that use PS.FIR, it should be settable in the main Makefile in the line
Code: [Select]
$(PAKWIF) $(FW_UPD_FILE) $(bin)/main.bin $(TARGET_PID) 0x01000101
The source for this tool is tools/pakwif.c
Don't forget what the H stands for.

*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
Re: A silly question about the firmware update method
« Reply #2 on: 25 / October / 2022, 19:59:43 »
Thanks for reply!
There's one another thing that I want  to figure out: How to get a valid FI2KEY? I've tried the disassembly.pl and extract.py script,but I can only get a FI2IV,the FI2KEY segment is blank.
Is that my way incorrect? If so,please tell me the way to get correct FI2KEY and FI2IV.(in my condition,on a Ubuntu computer,and don't have a Windows environment)
My platform is IXUS 175(ixus175_elph180)
Thx.
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

*

Offline reyalp

  • ******
  • 14126
Re: A silly question about the firmware update method
« Reply #3 on: 26 / October / 2022, 01:40:26 »
There's one another thing that I want  to figure out: How to get a valid FI2KEY? I've tried the disassembly.pl and extract.py script,but I can only get a FI2IV,the FI2KEY segment is blank. Is that my way incorrect?
Hmm, yes, extract.py probably doesn't work correctly on newer cams like ixus175.
Quote
If so,please tell me the way to get correct FI2KEY and FI2IV.(in my condition,on a Ubuntu computer,and don't have a Windows environment)
My platform is IXUS 175(ixus175_elph180)
You could go to https://chdk.fandom.com/wiki/For_Developers/fi2offsets and get the values from a known firmware using the same "encoding" (KEYSYS in CHDK makefiles) value in the firmware dumps archive, or more generally, find it in a known dump and then locate the equivalent disassembly in yours.

But for ixu175, the offset of FI2KEY is 0x2968 and FI2IV is 0x4fecec. This should be correct for all known canon firmware variants.
Don't forget what the H stands for.

*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
Re: A silly question about the firmware update method
« Reply #4 on: 26 / October / 2022, 03:31:50 »
Success!
I've modified the key_addr in extract.py to the real FI2KEY address in my firmware dump file ,and I get a usable FI2KEY and FI2IV.Now I can modify the firmware update screen displayed version.
Thanks again for that useful information!
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

 

Related Topics


SimplePortal © 2008-2014, SimplePortal