Signature verification prior to startup - page 9 - General Discussion and Assistance - CHDK Forum

Signature verification prior to startup

  • 83 Replies
  • 42414 Views
*

Offline reyalp

  • ******
  • 14125
Re: Signature verification prior to startup
« Reply #80 on: 04 / July / 2017, 19:21:23 »
Advertisements
Another note: you should not need bin_comp_fix.h except for cases like the sx280/sx270 where multiple PIDs use the same port.

You will need to make compat-table after adding ports and setting up the platform makefile.inc values
Don't forget what the H stands for.

Re: Signature verification prior to startup
« Reply #81 on: 04 / July / 2017, 20:16:22 »
Another note: you should not need bin_comp_fix.h except for cases like the sx280/sx270 where multiple PIDs use the same port.
Installing the wrong G16 firmware version causes the camera to "hang" with a slowly blinking green LED as expected.

But if I delete bin_comp_fix.h & bin_compat.h, rebuild, and again install the wrong firmware version (i.e. 1.00h instead of 1.01c) then I no longer get the blinking green light.   The generated file is :
Code: [Select]
/* THIS FILE IS GENERATED, DO NOT EDIT! */                                                             

ver_sig_t ver_sigs[]={
    {(const char *)0xfc158a45, "GM1.00H"},
};
pid_sig_t pid_sigs[]={
};

vs my version :                                                       
Code: [Select]
#define DEBUG_DELAY 10000000   
ver_sig_t ver_sigs[]={
    {(const char *)0xfc158a45 , "GM1.00H"},  // substring of *"Firmware Ver GM1.00H" string in ROM
};
pid_sig_t pid_sigs[]={
    {(short *)0xfdf20040, PLATFORMID}, // g16 (0x3274 = 12916) near PRODUCT_ID and then Ver.006.015 gives 0xfdf20000 + 0x40
};


Quote
You will need to make compat-table after adding ports and setting up the platform makefile.inc values
I must have done that at some point - a g16 entry is added by my rolling patch file.
« Last Edit: 04 / July / 2017, 20:21:28 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14125
Re: Signature verification prior to startup
« Reply #82 on: 04 / July / 2017, 20:37:25 »
If PID is not found in stubs (which finsig_thumb2 current doesn't) the address should be set in a comment in makefile.inc, like on g7x

Code: [Select]
# next line is for the compatibility check, as comment
# PLATFORMID @ 0xfff20040
Note 0xfdf20040 and 0xfff20040 both likely work because ROM address space is mirrored, but the fff... version is preferred because reading it on a different camera is less likely to fail.
Don't forget what the H stands for.

Re: Signature verification prior to startup
« Reply #83 on: 04 / July / 2017, 21:30:29 »
If PID is not found in stubs (which finsig_thumb2 current doesn't) the address should be set in a comment in makefile.inc, like on g7x
Got it sorted now - thanks again. Another interesting journey into the bowels of CHDK.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal