Powershot A3100 - Porting thread - page 11 - DryOS Development - CHDK Forum

Powershot A3100 - Porting thread

  • 139 Replies
  • 70331 Views
Re: Powershot A3100 - Porting thread
« Reply #100 on: 06 / January / 2013, 21:31:46 »
Advertisements
I knew it was early in the boot process (0xff817xxxx in the stack dump). I have no clue where chdk loads in memory so 0x002F2DEC does not mean much to me :(
But i will find the fault as long as there is someone to test ;)

Re: Powershot A3100 - Porting thread
« Reply #101 on: 06 / January / 2013, 22:08:08 »
...and I will test any new versions gladly.
So take your time; sometimes a nap helps a lot. ;)

*

Offline reyalp

  • ******
  • 14125
Re: Powershot A3100 - Porting thread
« Reply #102 on: 06 / January / 2013, 22:23:30 »
I knew it was early in the boot process (0xff817xxxx in the stack dump). I have no clue where chdk loads in memory so 0x002F2DEC does not mean much to me :(
CHDK loads at MEMISOSTART

When you build, the chdk build process creates a file called main.dump in the core directory. This is a disassembly of the chdk binary located at the appropriate address. If you are using chdkshell to build, main.dump may be moved to /bin/logs/dump-{cameraname}-{firmware}.txt

Using this, you can match addresses in the romlog to CHDK functions.
Don't forget what the H stands for.

Re: Powershot A3100 - Porting thread
« Reply #103 on: 07 / January / 2013, 11:06:44 »
The dump only contains a dissasembly for the loader, the rest is
Code: [Select]
00001aac <blob_chdk_core_start>:
    1aac: e3a00002 .word 0xe3a00002
    1ab0: e3300002 .word 0xe3300002
    1ab4: e3a0dc19 .word 0xe3a0dc19
    1ab8: e3a0b000 .word 0xe3a0b000
    1abc: ea001e56 .word 0xea001e56
    1ac0: b081b510 .word 0xb081b510
    1ac4: f0192001 .word 0xf0192001
    1ac8: 4819f829 .word 0x4819f829

Without labels i can't do much with it. CHDK runs from MEMISOSTART + 0x1900?

A question for Nonatoka, did you unpack the entire archive to your SDcard? How many partitions are on it? How big is your card?


Re: Powershot A3100 - Porting thread
« Reply #104 on: 07 / January / 2013, 11:37:33 »
Yes, I've copied all the files from the archive to the single partition (FAT16) on a 2GB Sandisk sdcard. The partition and the "magic words" are done with "LICKS".

*

Offline reyalp

  • ******
  • 14125
Re: Powershot A3100 - Porting thread
« Reply #105 on: 07 / January / 2013, 16:01:02 »
The dump only contains a dissasembly for the loader
You are looking at the wrong dump. The one you want is in core/main.dump, not loader main.dump
Don't forget what the H stands for.

Re: Powershot A3100 - Porting thread
« Reply #106 on: 07 / January / 2013, 19:11:42 »
The dump i found (i'm using chdk shell) is dump-a3100-100a.txt from bin/logs, theres no dump in ../core

@Nonatoka
Ok, that narrows it down (to my port hehe). I've re-checked the code in boot.c and compared the source from the disassemblies from the 100d & 100a, and found nothing wrong so either i'm overlooking something or there is something wrong with a stub found by the sigfinder (=very unlikely).
Next i'll do a re-port from scratch for boot.c, that should take care of the overlooking side of things.
The 4 second delay is caused by a watchdog timeout i guess, so its hard to tie the shutting down from the exception to a place in the source where it goes wrong. Your cam only shows the startup logo of chdk, and not the live view?

Re: Powershot A3100 - Porting thread
« Reply #107 on: 07 / January / 2013, 19:45:07 »
Ok, new port of boot.c : <link removed, see updated link below>
If it throws the same exception i'll eat my hat.
ps: still stripped of functionality!

Dump file: https://www.box.com/s/9o1qtvtylxmbn6pi39tq

pps: i found a bug in my port of the 100d, and although it didn't hurt the 100d port it may well be responsible for your problem. The bug should also exist in the port of the a490 or a3200 (or whatever camera i used as a template for boot.c, i'll check and fix)
« Last Edit: 07 / January / 2013, 20:28:13 by casrap »

Re: Powershot A3100 - Porting thread
« Reply #108 on: 07 / January / 2013, 20:10:45 »
Whooohaaa! We have a winner here!  :D
CHDK is starting! So far, I just did some simple adjustments, seems stable!
Many thanks, casrap! And what was the itchy bit?

Re: Powershot A3100 - Porting thread
« Reply #109 on: 07 / January / 2013, 20:15:30 »
I'll do a non-handicapped version so you can try the overrides.

The problem was a 'classical' chdk mistake (swapped loc_ and sub_) but with an intentional aspect :P
I'm going to see where i got the boot.c template from, the error must be in there too.

Version with overrides: https://www.box.com/s/fy30sqm81kxjux1aeml4

(src: https://www.box.com/s/bajsl1dwab6p0hmqevij)
« Last Edit: 07 / January / 2013, 20:21:02 by casrap »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal