New, simpler version of the CHDK 'loader' code. - General Discussion and Assistance - CHDK Forum

New, simpler version of the CHDK 'loader' code.

  • 31 Replies
  • 5425 Views
*

Offline philmoz

  • *****
  • 3124
    • Photos
New, simpler version of the CHDK 'loader' code.
« on: 27 / November / 2012, 05:35:26 »
Advertisements
Revision 2325 in the main trunk contains a rework of the 'loader' code for the the six cameras I have access to test (G12, G1X, IXUS310, IXUS700, SX30 and SX40).

After a lot of head scratching, testing and discussion with reyalp I believe the existing loader code contains remnants of a bygone era that is no longer used or needed.

Essentially this eliminates the double memory copy at startup, merges the code from the 'resetcode' directory into the loader directory (and removes resetcode) and removes references to the RESTARTSTART value in the makefile.inc file for each firmware version.

The basic steps to do this for other cameras are:
- delete the current contents of the my_restart function (loader/CAM/main.c)
- copy the contents of the copy_and_restart function from loader/CAM/resetcode/main.c into my_restart
- edit the new my_restart code and replace src_void with blob_chdk_core, dst_void with MEMISOSTART and length with blob_chdk_core_size
- copy the new versions of blobs.S and Makefile from one of my versions above to loader/CAM
- delete the resetcode directory

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)

*

Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: New, simpler version of the CHDK 'loader' code.
« Reply #1 on: 27 / November / 2012, 16:00:24 »
Hi Phil,

Having relatively easy access to a range of CHDK- supported cams I'm happy to be able to report
100% success (in this case defined as: CHDK starts up via diskboot.bin in both REC & PLAY and
menu browsing behaves identically to vanilla trunk 2328 - compiled with gcc 4.6.2 )

The following cams were tested:
Quote
A series:       A590-101b,   A620-100f,   A630-100c
ixus series:     ixus70_sd1000-101b,   ixus115_elph100hs-101b,   ixus220_elph300hs-100c
                 ixus230_elph310hs-100b,   ixus300_sd4000-100c,   ixus870_sd880-101a
S series:       S95-100h


Let me know if you need more tests,

wim

attached: diff (the 'stripped' version was cleaned to hopefully not cause problems with svn-diff
                      although the /resetcode will need to be removed manually afterwards)

edit: forgot to remove references to the RESTARTSTART - corrected + created diff

« Last Edit: 27 / November / 2012, 19:58:49 by whim »

Re: New, simpler version of the CHDK 'loader' code.
« Reply #2 on: 27 / November / 2012, 20:10:43 »
Also confirmed as working for :

1) G10
2) A1200
3) IXUS120_SD940

Patch file submitted to the usual place.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: New, simpler version of the CHDK 'loader' code.
« Reply #3 on: 28 / November / 2012, 00:47:11 »
Confirmed working for TX1.

The memcopy implementation at the beginning of loader/tx1/resetcode/main.c was different/older than the equivalent code in g1x, so the update instructions didn't perfectly apply (specifically the 'length' var change.) I just replaced that block with the g1x version.


*

Offline msl

  • *****
  • 1263
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: New, simpler version of the CHDK 'loader' code.
« Reply #4 on: 28 / November / 2012, 06:13:45 »
Confirmed as working for the A720 and SX220

Patch: http://chdk.setepontos.com/index.php?topic=650.msg93924#msg93924

msl
CHDK-DE:  CHDK-DE links

*

Offline dvip

  • ****
  • 451
Re: New, simpler version of the CHDK 'loader' code.
« Reply #5 on: 28 / November / 2012, 10:16:10 »
@wim, thanks for the update/testing the A590is-101b. :D Nice to see you back.

*

Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: New, simpler version of the CHDK 'loader' code.
« Reply #6 on: 01 / December / 2012, 10:55:27 »
@dvip
Thanks, it was just a change from 'read only' to 'read/write' mode though ...

@all

I prepared patches for all not-yet-tested cams (see here)

cheers,
wim 

*

Offline philmoz

  • *****
  • 3124
    • Photos
Re: New, simpler version of the CHDK 'loader' code.
« Reply #7 on: 01 / December / 2012, 23:47:39 »

I prepared patches for all not-yet-tested cams (see here)

cheers,
wim 

Wow, thanks for that.

Although it all looks ok - I'm a little nervous about committing a lot of untested changes.

Any thoughts?

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)


*

Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: New, simpler version of the CHDK 'loader' code.
« Reply #8 on: 02 / December / 2012, 06:05:29 »
Quote
I'm a little nervous about committing a lot of untested changes.

Sorry for not being clear, just put them there in the hope of pulling in more testers

wim








*

Offline genie

  • *
  • 43
Re: New, simpler version of the CHDK 'loader' code.
« Reply #9 on: 02 / December / 2012, 08:08:47 »
Hi

Confirmed as working for the SX230HS

Great. Super fast boot process, thanks for that.

genie
« Last Edit: 02 / December / 2012, 08:10:34 by genie »
Sorry for my bad English.I am a Bavarian and German is the only foreign language i speak.

 

Related Topics