SX260 HS Porting Thread - page 8 - DryOS Development - CHDK Forum supplierdeeply

SX260 HS Porting Thread

  • 642 Replies
  • 222972 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: SX260 HS Porting Thread
« Reply #70 on: 10 / April / 2012, 18:58:57 »
Advertisements
I also detect some new code at boot not present in other cams

Code: [Select]
ROM:FF000138                 LDR     R0, =sub_FF680924
ROM:FF00013C                 LDR     R1, =0x685000
ROM:FF000140                 LDR     R3, =0x69544C


That's the code that copies a block of code from the firmware to RAM.
The rest of the firmware uses the functions at the RAM addresses (starting at 0x68500).

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 reyalp

  • ******
  • 14117
Re: SX260 HS Porting Thread
« Reply #71 on: 10 / April / 2012, 22:25:58 »
Thats what I would like, but I have a "Update File Error" with the encode diskboot, that's why use canonbasic
I don't understand. "Update File Error" should only show for manual "Firm update" loading, with PS.FI2. Wrongly encoded diskboot would just crash the cam (unless canon changed this, but it didn't look abnormal when I was finding the dancingbits)

Have you succeeded in making the card bootable ? Note if you are using an SDXC card, you'll have to format it fat16 or fat32, rather than xfat.
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #72 on: 11 / April / 2012, 01:00:55 »
Thanks philmoz
Should I replicate the ram-copying subss in boot.c and modify something or just leave the BL?

@reyalp
Yes I have tried unencoded fat32 (fat 16 did'nt worked) & Canonbasic, and It start to load the firmware and crashed, since I'm not able to ligth the leds at any point I don't know where it crashed.

The PS.FI2 maybe they have changed something related to the inner workings of dancing bits, where is the function they use for that to compare it with other cams? The function its sub_FF0A6314
but looks the same as other cams

This is the makefile.inc I'm using,

Code: [Select]
# 0x3244 Found @ 0xfff40040
PLATFORMID=12868

PLATFORMOS=dryos

# address where wif or diskboot code will be loaded by camera
MEMBASEADDR=0x1900

# size of memory region for CHDK
RESTARTSTART=0x50000

# points to the start of the memory pool used by the firmware
MEMISOSTART=0x193A24

# start of firmware
ROMBASEADDR=0xFF000000

MAXRAMADDR = 0x0fffffff

# Found @ 0xffff3cf0
NEED_ENCODED_DISKBOOT=8

PLFLAGS=-DMEMBASEADDR=$(MEMBASEADDR) -DMEMISOSTART=$(MEMISOSTART) -DMEMISOSIZE=$(MEMISOSIZE)
PLFLAGS+=-DRESTARTSTART=$(RESTARTSTART)

# Found @ 0xffff3ce0
KEYSYS=d4c
« Last Edit: 11 / April / 2012, 13:06:40 by asm1989 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #73 on: 11 / April / 2012, 13:29:47 »
 I have been diging with the dancing bits & Keys , and acutally, In a working cam not sx260 If I change the dancing bit secuence It dosnt work , but I dont get the "Update File Error" ,

In other cams I only have this error If the keys are wrong,  So maybe is the way this new cam uses the keys????

What funtion in firmware does that?
« Last Edit: 11 / April / 2012, 13:35:45 by asm1989 »


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #74 on: 14 / April / 2012, 09:00:59 »
Here are my latest sources
http://www.4shared.com/zip/Pmmw5We6/sx260-100b-allsources-v2.html

or
http://www.box.com/s/b87aac1adf7155878a30

found most the stubs & address ,  except for the led stuff  & also
NHSTUB(MakeDirectory,               NULL_SUB)

I also find a stub in RAM and don't know really how to deal with
NHSTUB(localtime,                   0x0068F2F4)   

Still no way yo debug it due to the led stuff & the FI2 thing "Update File Error"

So any help would be great to un-stuck it  ;)
« Last Edit: 14 / April / 2012, 09:59:04 by asm1989 »

*

Offline funnel

  • ****
  • 349
Re: SX260 HS Porting Thread
« Reply #75 on: 14 / April / 2012, 09:29:37 »
Can you upload to another sharing site like www.box.com, or attach it in the forum? The link you posted doesn't work.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #76 on: 14 / April / 2012, 09:57:34 »
@funnel
Here are the full sources:
http://www.box.com/s/b87aac1adf7155878a30

*

Offline funnel

  • ****
  • 349
Re: SX260 HS Porting Thread
« Reply #77 on: 14 / April / 2012, 10:52:18 »
As I can see you have an error at the beginning of boot()

Code: [Select]
        "MOV     R0, #0x80000017\n"   
        "MCR     p15, 0, R0,c6,c4\n"
        "LDR     R0, =0xFF80002F\n"         
    //"LDR     R0, =0xFF00002F\n"   <<<<<here
        "MCR     p15, 0, R0,c6,c5\n"
        "LDR     R0, =0xD000002B\n"

Why did you change that anyway?

I recommend you to use chdkpt tool to get the asm code and not do it manually.

Also remove the BL blink at the beginning of boot.c.

Comment out the task hooks.

Do not continue in the last line to make sure it boots in the original firmware.
Code: [Select]
//PATCH
        // "B       sub_FF00038C\n"
        "B       sub_FF00038C_my\n"
//PATCH END
to
Code: [Select]
       "B       sub_FF00038C\n"





*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #78 on: 14 / April / 2012, 11:13:27 »
Thanks funel

I now use chdkpt.
"LDR     R0, =0xFF80002F\n"     -> See it in other cams boot.c , but revert it to original code.
also removed the blink, and get back to original code

But still crash.

Since I'm not able to load the fi2,  I have to realy on canonbasic load bin script or the autoload,
maybe they have changed encryption tables
http://tools.assembla.com/chdk/browser/trunk/tools/pakwif.c#L17
With Canonbasic:
since it crash I'm not able to see anything in the romlog, so I don't know if what fails is the canon basic script for loading or the main.bin (unencoded)

With Autoload:
The crash is sooner with no screen even on-
« Last Edit: 14 / April / 2012, 11:41:18 by asm1989 »

*

Offline funnel

  • ****
  • 349
Re: SX260 HS Porting Thread
« Reply #79 on: 14 / April / 2012, 13:56:18 »
Canonbasic loader doesn't work on sx220, so I doubt it'll work on yours.

Most of the initial boot code for sx260 is the same as for other cameras. I think it should autoboot if you do everything right.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal