SX720 Porting thread - page 2 - DryOS Development - CHDK Forum

SX720 Porting thread

  • 166 Replies
  • 87900 Views
*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX720 Porting thread
« Reply #10 on: 26 / March / 2016, 15:21:24 »
Advertisements
reyalp I am able to dissamble parts using captest.exe, didn't find capdis.exe understand they are the same.

But having some trouble with the "make rebuild-stubs" to generate some basic csvs and stubs, maybe an issued with my not very tuned setup,

make rebuild-stubs PLATFORM=sx720hs PLATFORMSUB=100e
/usr/bin/sh: svnversion: command not found
finsig_thumb2.c \-> finsig_thumb2.o
stubs_load.c \-> stubs_load.o
firmware_load_ng.c \-> firmware_load_ng.o
finsig_thumb2.o stubs_load.o firmware_load_ng.o \-> finsig_thumb2.exe
Warning: corrupt .drectve at end of def file

.... many of these
and a lot of  undefined reference to `__security_cookie'

ending with:

collect2.exe: error: ld returned 1 exit status
Makefile:89: recipe for target 'finsig_thumb2.exe' failed
gmake[1]: *** [finsig_thumb2.exe] Error 1
rebuild stubs for sx720hs-100e
\-> stubs_entry.S
/usr/bin/sh: line 1: ../../../../tools/finsig_thumb2.exe: No such file or directory
grep: stubs_entry.S: No such file or directory


*

Offline reyalp

  • ******
  • 14118
Re: SX720 Porting thread
« Reply #11 on: 26 / March / 2016, 16:23:29 »
reyalp I am able to dissamble parts using captest.exe, didn't find capdis.exe understand they are the same.
No, captest.exe is an old version. The capdis code is in the trunk, go to tools directory and
make capdis.exe (this is an "extra" so it will get cleaned but not rebuilt when you a make clean. You could copy the exe somewhere else on your path)

Quote
/usr/bin/sh: svnversion: command not found
this should be harmless.
Quote
Warning: corrupt .drectve at end of def file

collect2.exe: error: ld returned 1 exit status
I haven't seen this before. What capstone library and compilers are you using? For windows https://app.box.com/s/sshu7dv0mebvnee6gvpsex46y2m18w51 should work.

FWIW, if you are building on windows, you might want to look at https://chdk.setepontos.com/index.php?topic=12752.0
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX720 Porting thread
« Reply #12 on: 26 / March / 2016, 19:14:01 »
Thanks will make capdis.exe


Using that capstone with the patch and gcc493-host481, with the trunk-4569 + d6-stubs-test-tree


Tested CHDK-Compiler-GUI_r283, and compile works for existing cams, but dosn't detect the primary.bin folder "no binaries found" so GEN_SIGS is disabled.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: SX720 Porting thread
« Reply #13 on: 26 / March / 2016, 20:20:39 »
Tested CHDK-Compiler-GUI_r283, and compile works for existing cams, but dosn't detect the primary.bin folder "no binaries found" so GEN_SIGS is disabled.
You need a platform folder structure for the SX720. The GUI checks the folder structure. Compare with other cameras. The primary.bin must be in sub (...platform\sx720hs\sub\100e). You can also create an extra dir for primary.bin files with the same platform structure. Add the dir under 'PRIMARY' and activate the checkbox 'PRIMARY_ROOT'.

msl
CHDK-DE:  CHDK-DE links


*

Offline reyalp

  • ******
  • 14118
Re: SX720 Porting thread
« Reply #14 on: 26 / March / 2016, 20:58:44 »
Using that capstone with the patch and gcc493-host481, with the trunk-4569 + d6-stubs-test-tree
I was able to build finsigthumb2.exe with that toolchain and capstone, using MSLs tool to launch a command prompt. Maybe there's something from some other gcc on your path?

One thing I've run into is that some of win32 gcc toolchains have a default path that includes /MinGW. If you actually have mingw installed there, it can case problems. I normally use mingw as my host compiler, which seems to be fine, but when I run other host compilers, I rename the mingw directory.
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX720 Porting thread
« Reply #15 on: 27 / March / 2016, 05:24:16 »

thanks if I have the primary.bin file at the sx720hs/100e/ folder, then the GEN_STUBS option is enabled but the the GEN_SIGS is still in grey,


the binaries sig_ref_dryos.... files at tools are not used anymore?


anyway was able to rebuild the stubs  and get the stubs_entry.S so something to start
« Last Edit: 27 / March / 2016, 05:39:26 by asm1989 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX720 Porting thread
« Reply #16 on: 27 / March / 2016, 06:54:51 »
Everything setup and staterd porting, added the PID here http://chdk.wikia.com/wiki/P-ID_%28Table%29

Is it possible to open the .dis file generated with capdis with ida or some visual tool?
« Last Edit: 27 / March / 2016, 07:05:47 by asm1989 »

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: SX720 Porting thread
« Reply #17 on: 27 / March / 2016, 09:05:07 »
... but the the GEN_SIGS is still in grey.
This option needs the sig_ref_dryos binaries in /tools.

the binaries sig_ref_dryos.... files at tools are not used anymore?
Still you need this to port DIGIG5 or older. The capstone tools are only for DIGIC6.

msl
CHDK-DE:  CHDK-DE links


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX720 Porting thread
« Reply #18 on: 27 / March / 2016, 09:33:08 »
thanks msl,

Started to replace the stubs entry 2s, and g7x is being helpfull finding many of them
« Last Edit: 27 / March / 2016, 09:50:15 by asm1989 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX720 Porting thread
« Reply #19 on: 27 / March / 2016, 11:37:27 »
reyalp


regarding the disasm of the RAM with


./capdis.exe ../../dumps/sx720/sub/100e/PRIMARY.BIN 0xfc000000 -stubs=../platform/sx720/sub/100e -s=0x010e1001 -e=0x010fce10 -f=objdump -d-const -d-addr -d-bin > ../../dumps/sx720/sub/100e/RAMCODE1.DIS


I think it is missing some RAM areas , the start and end seems to be right

// RAM code 0x010e1000 - 0x010fce10 copied from 0xfcd3b79c ( 114192 bytes)
// RAM code 0xbfe10800 - 0xbfe1751d copied from 0xfcd575ac (  27933 bytes)


But dosnt seems to start correctly , the g7x has much more at the begining looking for example for the surrunding areas for CreateBinarySemaphoreStrictly




 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal