new branch - CHDK : Elf Edition - Developers wanted - page 5 - General Discussion and Assistance - CHDK Forum
supplierdeeply

new branch - CHDK : Elf Edition - Developers wanted

  • 316 Replies
  • 110776 Views
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #40 on: 10 / December / 2011, 10:09:50 »
Advertisements
Using GrAnd's  original 'ready-to-use' environment (based on gcc 3.4.6)  with Windows XP and running 1459_elf3.patch from \core I get result shown in attached file.


*

Offline reyalp

  • ******
  • 14039
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #41 on: 10 / December / 2011, 19:52:16 »
tsvstar: Thanks for this great work, this will be a huge step forward for CHDK.

With the latest trunk I get a compile error from http://trac.assembla.com/chdk/changeset/1461/trunk and http://trac.assembla.com/chdk/changeset/1464/trunk easily worked around by commenting out the GUI_MODE* checks. Also some rejects in the patch due to changes already in the trunk.

With that I built d10 on windows without errors, and it seems to work. The modules inspector is white text on white background in play mode, works in rec mode. Text reader, calender, games seem OK

On a540, compile failed with OPT_CURVES enabled:
Code: [Select]
\-> main.elf
raw.o: In function `raw_savefile':
raw.c:(.text+0x7fc): undefined reference to `module_curve_load'
raw.c:(.text+0xb00): undefined reference to `module_curve_load'
luascript.o: In function `luaCB_set_curve_state':
luascript.c:(.text+0xc0c): undefined reference to `module_curve_load'
collect2: ld returned 1 exit status
make[1]: *** [main.elf] Error 1
make: *** [all-recursive] Error 1
Disabling curves allows a540 to build, and the modules seem to work.

I'm building with the GCC4 toolchain from chdkshell for the ARM code.

Again, thanks for this work :)

edit:
I've made a branch in the chdk svn to experiment with this http://trac.assembla.com/chdk/browser/branches/reyalp-flt

edit:
On my linux machine, elf2flt fails because elf32_* typedefs use long, which defaults to a 64 bit int. Converting it to use stdint types allows the build to finish successfully, but the resulting .flt fail to load with "bad magicnum".

fltdump gives the same magic for linux and windows built .flt, and the rest of the output looks very similar.

edit:
bad magicnum is probably because there is a pointer in flat_hdr, so on a 64 bit host it comes out the wrong size in the tools.

edit:
making the pointer a uint32_t on the host solves the problem, checked in on my branch. My linux setup now builds working modules.
« Last Edit: 11 / December / 2011, 01:33:56 by reyalp »
Don't forget what the H stands for.

Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #42 on: 11 / December / 2011, 05:18:10 »
SVN is updated. Patch from 1473 is in attachment.
Same thing with gui_mastermind.[ch]. It should be overwrited by archive from my post above.
Could anyone say why it reject to apply?

What is done:
- integrate linux64 changes by reyalp (I change them slightly)
- changes for linux gcc based on report/dumpobj by srsa_4c
- fixed curves issue
- make compatible with last trunk changes. (bind gui_mode of generic module to the core CHDK mode).
- fixed mpopup bug
- Merge to 1473

srsa_4c:
Please try to compile now. Should work.
Especially I'm interested in test:
- stability of benchmark (just run it, wait for the end, reboot and try again same thing several times). Different of your compiler is significatelly different in patched by convertor part and this is good test.
- how curve module works. it should be workable now for you. Unfortunatelly my camera has 12bit sensor so I can't check this by myself

reyalp
How could I get access to this branch? I only could see your changes by web browser. I do integrate your linux64 changes (but slightly change them)
Could you please also check stability of benchmark/raw_merge/curves modules if builded by linux. They should be binary different from produced by CHDK-Shell

Microfunguy
patch should be applied to the root of trunk not to the core.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #43 on: 11 / December / 2011, 05:59:44 »
Attached is a replacement for the top level Makefile.

This copies the .flt files to the CHDK/MODULES directory as part of the firsub target rather than in each of the firzipsub and firzipsubcomplete targets. The .flt files are left in the directory until the next compile.

This works better when doing partial compiles rather than full rebuilds - you can copy the updated files from the CHDK/MODULES directory instead of building the full zip file and then unpacking it.

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

  • ******
  • 4451
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #44 on: 11 / December / 2011, 09:17:19 »
srsa_4c:
Please try to compile now. Should work.
It works now, thanks! Tried with your repo, again.
Quote
Especially I'm interested in test:
- stability of benchmark (just run it, wait for the end, reboot and try again same thing several times). Different of your compiler is significatelly different in patched by convertor part and this is good test.
Camera: Ixus65
Haven't noticed any obvious differences. Tried entering, exiting record mode, viewing pictures (also with magnification), viewing movies, rebooting with "firm update". The benchmark always works stable.
Quote
- how curve module works. it should be workable now for you. Unfortunatelly my camera has 12bit sensor so I can't check this by myself
It seems to work the same as with "original" CHDK.
Quote
How could I get access to this branch?
The svn url is: https://tools.assembla.com/svn/chdk/branches/reyalp-flt

OFFTOPIC:
The benchmark (on the Ixus65) only runs once when started, on the SX100 (with a few weeks older revision) it runs twice in a row (it always did so, if I remember correctly).
In case of both cams, "screen read" and "memory read" always stays at "calculating...", never finishes.
The first part of the test (screen should blink) is not always visible (on both cams). Guess the test doesn't always use the active buffer.
« Last Edit: 11 / December / 2011, 09:41:02 by srsa_4c »

*

Offline reyalp

  • ******
  • 14039
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #45 on: 11 / December / 2011, 17:44:49 »
Thinking about how we would integrate this into the main CHDK builds
Up to now, you only needed diskboot.bin or ps.fi* to run CHDK. In tsvstars current code, some essential things like file browser are in modules. At a minimum, we'd need to include all the essential modules in the "small" package. People with multi-partition cards will need to know to put the modules on the large partition.

I would have preferred to start by putting stuff that is really optional and isolated in modules: Games, calender, text viewer, stuff like that.
1) less risk of breaking
2) easier to get the core module stuff working without a lot of unrelated changes
But tsvstar has already split out a lot of stuff, so it would mean some more work to take this approach.

Just thinking out loud at this point. This is a really useful feature, so if anyone has ideas of how to integrate it cleanly and safely, speak up :)
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14039
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #46 on: 11 / December / 2011, 19:28:10 »
reyalp
How could I get access to this branch? I only could see your changes by web browser. I do integrate your linux64 changes (but slightly change them)
Sent you a PM. Also, updated the branch with your changes.
Quote
Could you please also check stability of benchmark/raw_merge/curves modules if builded by linux. They should be binary different from produced by CHDK-Shell
Benchmark: Tested on a540, d10. OK, same issue with "calculating" as srsa_4c mentioned, but this is in the trunk too.
Raw sum: tested on d10, works.
Curves: tested +2 ev on a540, works.
Also tested tetris and snake modules :)
Don't forget what the H stands for.

Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #47 on: 12 / December / 2011, 01:14:02 »
I would have preferred to start by putting stuff that is really optional and isolated in modules: Games, calender, text viewer, stuff like that.
1) less risk of breaking
2) easier to get the core module stuff working without a lot of unrelated changes
But tsvstar has already split out a lot of stuff, so it would mean some more work to take this approach.

There no problem to leave important modules (fileselector-mpopup-palette-curves-edge_overlay) in the core. I even could make this configurable with #define as first step to complete integration. In existed infrastructure this is pretty easy.

PS. I also think about safety in the same way. For example, that we could accidentally remove by file selector fselect.flt and then can't start it again. But even now we can accidentally remove diskboot.bin and then can't start CHDK again.


Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #48 on: 12 / December / 2011, 01:37:17 »
In tsvstars current code, some essential things like file browser are in modules. At a minimum, we'd need to include all the essential modules in the "small" package.
What do  you mean by "small" package? If you mean .zip with only diskboot.bin/ .fi, then modules already should be included there. If they are not, then something broken in makefile and we need to investigate what exactly.

If you mean merge several different modules to one, then it is increase complexity of process and I see no benefit for user.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: new branch - CHDK : Elf Edition - Developers wanted
« Reply #49 on: 12 / December / 2011, 07:39:45 »
I've tested the reyalp-flt branch, compiled with chdk shell and GCC 4.5.1.

The branch needs the subdirectory CHDK/MODULES, otherwise you get an error message.

Both cameras (A720, SX220) work with this version without any problems. I can call the modules (not all tested). The module inspector works. To invoke the modules, a menu with the available modules would be user-friendly.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics