New stubs/signature finder (gensig2/finsig2) for DryOS cameras. - page 3 - General Discussion and Assistance - CHDK Forum

New stubs/signature finder (gensig2/finsig2) for DryOS cameras.

  • 103 Replies
  • 37302 Views
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #20 on: 18 / July / 2011, 10:45:27 »
Advertisements
Open to suggestions?

Let's just agree to standardize on moving all the NSTUB() stuff in stubs_entry.S to NHSTUB() in stubs_entry_2.S then.  Doesn't seem like there is any downside to that ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline funnel

  • ****
  • 349
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #21 on: 18 / July / 2011, 11:28:29 »
Let's just agree to standardize on moving all the NSTUB() stuff in stubs_entry.S to NHSTUB() in stubs_entry_2.S then.  Doesn't seem like there is any downside to that ?
I just did that. Seems better to have everything in one place.

*

Offline philmoz

  • *****
  • 3441
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #22 on: 18 / July / 2011, 16:06:06 »
Open to suggestions?

Let's just agree to standardize on moving all the NSTUB() stuff in stubs_entry.S to NHSTUB() in stubs_entry_2.S then.  Doesn't seem like there is any downside to that ?

Just be aware that with the current system you will be using an extra 8 bytes for every NSTUB that you copy to an NHSTUB, even if the values are the same.

The NHSTUB override does not remove the NSTUB from the build, it only replaces the name in the compilers symbol table so that the override value is used instead.

This is why my new version comments out values in stubs_entry.S that exists in stubs_entry_2.S.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #23 on: 23 / July / 2011, 20:09:18 »
Hmmm ... how come there's two downloads attached to the original post now ?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline philmoz

  • *****
  • 3441
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #24 on: 23 / July / 2011, 20:44:35 »
Hmmm ... how come there's two downloads attached to the original post now ?

Just seeing if you're paying attention :)
(Actually, just forgot to remove the old one last time I updated.)

Latest version posted with some small changes.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline srsa_4c

  • ******
  • 4450
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #25 on: 24 / July / 2011, 14:12:19 »
Hi!

I would like to try this, but can't find the SX20 1.02d dump anywhere (all the links I could find are gone, the box.net repo only has 1 version, but not this one). Could someone please re-upload it?
Thanks.

Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #26 on: 24 / July / 2011, 14:24:42 »
I would like to try this, but can't find the SX20 1.02d dump anywhere (all the links I could find are gone, the box.net repo only has 1 version, but not this one). Could someone please re-upload it?
Assuming you own the camera, might be faster to use the Canon BASIC dumper to make a new copy for yourself ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4450
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #27 on: 24 / July / 2011, 14:36:43 »
Assuming you own the camera, might be faster to use the Canon BASIC dumper to make a new copy for yourself ?

No, I do not actually own an SX20, just wanted to collect the last missing piece of firmware "signatures2_dryos.h" is based on. But now I see that this header is already included in the archive, so there's no need to rebuild it... Sorry for the noise.

Edit:
@philmoz: Thanks.
« Last Edit: 05 / August / 2011, 16:59:33 by srsa_4c »


*

Offline philmoz

  • *****
  • 3441
    • Photos
Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #28 on: 03 / August / 2011, 04:42:37 »
For review, attached are patch files for both CHDK and CHDKDE that integrate the V2 signature system into the main code.

The method adopted (after a discussion with waterwingz and reyalp) is:
- rename the current finsig/gensig stuff to xxxsig_vxworks, these programs will continue to be used for vxworks cameras.
- add the new programs as xxxsig_dryos for dryos cameras
- update the makefiles to use the appropriate program
- add temporary entries to the stubs_entry_2.S files for any cameras where the new signature finder finds a different address to the old one, and there is no override currently in stubs_entry2.S. This will (hopefully) ensure backward compatibility
- create new stubs_entry.S files for all dryos cameras (this is why the patch is so big)

I have recompiled all existing camera/firmware versions in both CHDK and CHDKDE with this version. Everything compiles ok and works on the cameras I can test (G12, SX30 and IXUS310).

Phil.

Edit: Uploaded a full copy of the reference firmware dumps for gensig_dryos here - http://www.box.net/shared/xxex60i32c8cutxcq6no
Unpack into the tools directory if you want to be able to rebuild the signature_dryos.h file.

« Last Edit: 04 / August / 2011, 04:58:33 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: New stubs/signature finder (gensig2/finsig2) for DryOS cameras.
« Reply #29 on: 03 / August / 2011, 09:25:28 »
- add temporary entries to the stubs_entry_2.S files for any cameras where the new signature finder finds a different address to the old one, and there is no override currently in stubs_entry2.S. This will (hopefully) ensure backward compatibility
- create new stubs_entry.S files for all dryos cameras (this is why the patch is so big)
Trying to piece this together in my mind again.  My big question is "Do the final diskboot.bin & ps.fi2 files change for existing ports when this is fully implemented?".   If they change because some of the stub addresses are created as NHSTUB rather than NSTUB then that's probably okay.  But if the existing ports start using new addresses from the new sigfinder (and probably "better" ones no doubt) then it gets trickier.

My confusion is about the temporary entries in stubs_entry_2.S that you mention above.  If the new sigfinder wants to use a different entry in stubs_entry.S than that found by the original sigfinder,  does is put that new entry into stubs_entry.S and then an override to the old address in stubs_entry_2.S ?   That would allow somebody "maintaining" the port to decide whether to start using the new address by simply deleting the entry in stubs_entry_2.S.

Don't get me wrong - I'll 100% behind getting this fully rolled out.  Just trying to understand how bad the support issues will be - the technical skill sets of the CHDK user base vary a lot (to say the least).

UPDATE :  took a look through the patch.  I think the answer to my question is that the executable change but only because some of the addresses are hooked through NHSTUB rather than NSTUB macros.  So I'd say - thumbs up, lets go.
« Last Edit: 03 / August / 2011, 10:25:14 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics