the sx10 porting thread - page 50 - General Discussion and Assistance - CHDK Forum supplierdeeply

the sx10 porting thread

  • 613 Replies
  • 219897 Views
Re: the sx10 porting thread
« Reply #490 on: 05 / July / 2009, 17:12:51 »
Advertisements
Did you try with "Add raw suffix" off ?

Wow. That fixed it. Apparently don't use that combination of options :-)
Raw suffix uses a LFN :/

Sounds like we need to find a fix for the LFN in DryOS...

Thanks for jumping on this issue.  As for me, I was originally doing it in CRW and still crashing, may have been the RAW Suffix mode that I was in as well.  Would like to test it without the suffix, but I've gone to DNG because I could not find anything that would convert my CRW's.  I tried Picasa3, DNG4PS-2 and even the Canon CRW codecs and nothing would recognize them.

Now my next goal is to read up on using scripted bracketing.. 

*

Offline reyalp

  • ******
  • 12159
Re: the sx10 porting thread
« Reply #491 on: 05 / July / 2009, 18:15:51 »
I tried Picasa3, DNG4PS-2 and even the Canon CRW codecs and nothing would recognize them.
Please read the stickies in the raw processing subforum if you want to know why.
Don't forget what the H stands for.

*

Offline yvesson

  • ***
  • 207
  • A540 SX10IS
    • poll about some pics (not much serious) ^^
Re: the sx10 porting thread
« Reply #492 on: 06 / July / 2009, 05:29:51 »
Hej,
Anyone managed to load the 1.01b beta ? I tryed and I'm like stuck in replay mode and can't do anything. I'm wondering if this is just me having done something wrong (4 Gb SDHC card maybe, formatted in FAT as I read in the faq).
The led blinks and I get the logo, but then nothing else work, trying to update the firmware blinks the led again but doesn't help any other way.

*

Offline reyalp

  • ******
  • 12159
Re: the sx10 porting thread
« Reply #493 on: 06 / July / 2009, 05:40:08 »
Hej,
Anyone managed to load the 1.01b beta ? I tryed and I'm like stuck in replay mode and can't do anything. I'm wondering if this is just me having done something wrong (4 Gb SDHC card maybe, formatted in FAT as I read in the faq).
The led blinks and I get the logo, but then nothing else work, trying to update the firmware blinks the led again but doesn't help any other way.
Maybe this will help ? http://chdk.setepontos.com/index.php/topic,3835.msg36053.html#msg36053
Don't forget what the H stands for.


*

Offline yvesson

  • ***
  • 207
  • A540 SX10IS
    • poll about some pics (not much serious) ^^
Re: the sx10 porting thread
« Reply #494 on: 06 / July / 2009, 06:35:25 »
Hej,
Ah yes thanks for the fast answer, I should have read that one. Not too annoying to half press once.

Re: the sx10 porting thread
« Reply #495 on: 06 / July / 2009, 14:18:05 »
Apologies for jumping in on the topic, but in case it's of any use, I've slightly modified the 1.02b source code and obtained a build that seems to work with 1.03a. Source diff (against SVN r782, with the platform/sx10/sub/102b directory copied to 103a) and DISKBOOT.BIN here.

*

Offline reyalp

  • ******
  • 12159
Re: the sx10 porting thread
« Reply #496 on: 06 / July / 2009, 17:52:25 »
Apologies for jumping in on the topic, but in case it's of any use, I've slightly modified the 1.02b source code and obtained a build that seems to work with 1.03a. Source diff (against SVN r782, with the platform/sx10/sub/102b directory copied to 103a) and DISKBOOT.BIN here.
I'm confused as to what you are doing with the custom finsig there. If you want to use your own tools to generate the values for stubs_entry_2.S that's fine, but using a different system for the auto-detected entry points will cause a lot of pain later on. Nor should perl be part of the normal build process.

If you can submit a patch (or just zip of the 103a sub, since it's all going to be adds anyway) that works like the normal builds, I would be happy to check that in.

edit:
I should add that finding stuff based on already ported versions of the same camera is a great idea. If generalized and tidied up a bit we could put it in the tools directory.
« Last Edit: 06 / July / 2009, 18:00:04 by reyalp »
Don't forget what the H stands for.

Re: the sx10 porting thread
« Reply #497 on: 06 / July / 2009, 20:44:53 »
I'm confused as to what you are doing with the custom finsig there. If you want to use your own tools to generate the values for stubs_entry_2.S that's fine, but using a different system for the auto-detected entry points will cause a lot of pain later on. Nor should perl be part of the normal build process.

That was just a quick-and-dirty hack to get things running after I couldn't get the regular finsig tool to work (I tested on the 1.02b firmware and got a lot more "not found"s than I should have).

Quote
If you can submit a patch (or just zip of the 103a sub, since it's all going to be adds anyway) that works like the normal builds, I would be happy to check that in.

edit:
I should add that finding stuff based on already ported versions of the same camera is a great idea. If generalized and tidied up a bit we could put it in the tools directory.

Since I can't seem to get the standard method to work, what I could do is clean up and generalize the entry point finder to work from any firmware X to firmware Y, then perhaps add a Makefile variable which selects which entry point generation method to use, standard or single-firmware. Something like (this is just off the cuff):

Code: [Select]
=== platform/XXX/sub/YYY/Makefile ===
STUBS_METHOD=single
STUBS_PLATFORM=ZZZ  # Use platform/ZZZ/...
STUBS_SUBPLATFORM=WWW  # .../sub/WWW/PRIMARY.BIN
STUBS_ROMBASEADDR=0xFF810000  # or 0xFFC00000
STUBS_FILES=stubs_entry.S stubs_entry_2.S  # sub/WWW/* files with stubs

=== platform/makefile_sub.inc ===
ifeq ($(STUBS_METHOD),single)
SOURCE_PRIMARY=$(PRIMARY_ROOT)/$(STUBS_PLATFORM)/sub/$(STUBS_SUBPLATFORM)/PRIMARY.BIN
stubs_entry.S: $(TARGET_PRIMARY) $(SOURCE_PRIMARY) $(topdir)tools/finsig$(EXE)
        @echo \-\> $@
        if [ -s $(TARGET_PRIMARY) -a -s $(SOURCE_PRIMARY) ] ; then \
          $(topdir)tools/finsig-single $(TARGET_PRIMARY) $(ROMBASEADDR) $(SOURCE_PRIMARY) $(STUBS_ROMBASEADDR) $(STUB_FILES:%=../../../$(STUBS_PLATFORM)/sub/$(STUBS_SUBPLATFORM)/%) > stubs_entry.S ; \
        else \
          echo CAUTION! \'stubs_entry.S\' is not updated due to target or source firmware binary not found! ; \
          touch stubs_entry.S ; \
        fi ; \
        if [ "X`grep 'ERROR' stubs_entry.S`" != "X" ] ; then \
          grep "ERROR" stubs_entry.S | $(ESED) "s/\/\/ ERROR: ([^ ]+) is not found.*/\1/" | $(SORT) | uniq > stubs_nf.names ; \
          grep -E "NH?STUB" stubs_entry_2.S | $(ESED) "s/ *NH?STUB\( *([^ ,]+).*/\1/" | $(SORT) | uniq > stubs_mn.names ; \
          comm -23 stubs_nf.names stubs_mn.names > stubs_not_found_names.err ; \
          rm -f stubs_nf.names stubs_mn.names ; \
          if [ -s stubs_not_found_names.err ] ; then \
            echo ERROR! There are unresolved addresses in \'stubs_entry.S\' \($(PLATFORM)-$(PLATFORMSUB)\) for the following names: ; \
            cat stubs_not_found_names.err ; \
            echo Please, add them into \'stubs_entry_2.S\' manually! ; \
            mv stubs_entry.S stubs_entry.S.err ; \
            exit 1 ; \
          fi ; \
          rm -f stubs_not_found_names.err ; \
        fi
else
# The usual code
endif

This of course fails to check whether the source stub files are up to date, but something along those lines.


Re: the sx10 porting thread
« Reply #498 on: 06 / July / 2009, 23:20:19 »
I'm confused as to what you are doing with the custom finsig there. If you want to use your own tools to generate the values for stubs_entry_2.S that's fine, but using a different system for the auto-detected entry points will cause a lot of pain later on. Nor should perl be part of the normal build process.

That was just a quick-and-dirty hack to get things running after I couldn't get the regular finsig tool to work (I tested on the 1.02b firmware and got a lot more "not found"s than I should have).

I found the findsig tool to be a bit confusing.

Once I figured out that I had to drop the camera rom file into the directory along with the stubs file and called it PRIMARY.BIN everything went a lot better.

The renaming was what I missed out on.
Cormac

Edit: The main problem I see with the 1.03a diff is that the subs_entry_2 is pretty much null. I moved the correct values back into this and it compiles without complaint as long a valid PRIMARY.BIN is in the subs directory. I'll run 1.03 through IDA and check the addresses and post my version in the morning. Yes, finsig should find most of the addresses it needs, but this will work for now.
« Last Edit: 07 / July / 2009, 04:15:46 by cormac »

Re: the sx10 porting thread
« Reply #499 on: 07 / July / 2009, 12:37:36 »
I found the findsig tool to be a bit confusing.

Once I figured out that I had to drop the camera rom file into the directory along with the stubs file and called it PRIMARY.BIN everything went a lot better.

That's what I tried, but unfortunately it didn't work correctly, and I ended up deciding it would be easier to adjust the 1.02b code on the assumption that the firmwares would be similar.

Quote
Edit: The main problem I see with the 1.03a diff is that the subs_entry_2 is pretty much null. I moved the correct values back into this and it compiles without complaint as long a valid PRIMARY.BIN is in the subs directory. I'll run 1.03 through IDA and check the addresses and post my version in the morning. Yes, finsig should find most of the addresses it needs, but this will work for now.

Actually, subs_entry_2 is mostly empty because the custom finsig found everything that was originally in there by looking at the 1.02b firmware; the stubs are all in stubs_entry_1 instead. That said, it's a quick hack and (as reyalp says) doesn't work well as a general build process, so if you can get it working with the standard process, that'd be great.

For reference, it looks like 5 words were inserted at 0xFF974028 and another 1 word somewhere in the middle of the 0xFFBxxxxx range (there was one variable pointer toward the high end of 0xFFB that was offset 24 bytes instead of 20).

 

Related Topics