A470 Porting - page 21 - DryOS Development - CHDK Forum

A470 Porting

  • 253 Replies
  • 90074 Views
*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #200 on: 10 / June / 2009, 01:41:22 »
Advertisements
Hello,

I have a 101b, and it fails to boot using the build in your last message.

Edit: Should also mention, using an 8GB SDHC card. Boots if either the larger partition is removed (boots into CHDK), or boots if the write protect tab is turned off. (boots to normal OS.) If I use Firmware Update with the write protect tab off, the camera shuts down.
Thanks for reporting. I guess I'll have to go back and do my homework again. Funny though, I was so sure  8) I'll do some checking to see if there is other stuff in the 102c sub tree that hasn't yet made it into the 101b sub tree. (MrSpoon, anything you can think of straight away?)

EDIT: There were some commented out stuff in the boot procedure that I think has to do with FAT32 in the 101b tree. I'll have a new binary for 101b shortly.

EDIT2: Ok try it now :) Make sure you get June 10 as build date.

EDIT3: (recompiled from clean svn v774 and re-applied patch. Also the patch is available if someone wants to compile themselves. We need testing though, especially from 101a/b users, before committing patch to svn.)
http://nostalgia.suroot.com/chdk-a470-unofficial/
« Last Edit: 10 / June / 2009, 07:19:09 by Thorwak »
Do it 'til it Hz

*

Offline rys

  • *
  • 4
Re: A470 Porting
« Reply #201 on: 10 / June / 2009, 23:38:39 »
Hello,

Just wanted to drop a line to say that the "June 10th, 1:04pm" version (last posted), works on 101b with SDHC booting. (Showing 7.4gb of space available.)

Thanks!

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #202 on: 11 / June / 2009, 02:04:46 »
rys,

Excellent, thanks for reporting back!

reyalp, would you feel like committing another patch? :) Both 101b and 102c has been verified working now.
http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt

---

I have done a lot of testing now on the a470 102c. There is one major problem, as I see it, but I think this is in the CHDK core (someone correct me if I'm wrong though).

When you create a dual partition card, there is no way to make it bootable from within CHDK (card tricks works fine though, if you have made the boot partition the "current" one). This is because CHDK calls the camera's function to modify the MBR (this not the very first sector on the card (that would be the VBR)). The problem is, when you create a dual partition card from within CHDK, the camera is still working from the partition table as it was then you loaded CHDK (with a FAT32 partition as partition 0 in the case of a SDHC card) so you can't make it bootable right away.

You take the card out, format the 2 MB partition in PC and put PS.FI2 and DISKBOOT.BIN on the card, load CHDK back up in camera. What happens now is that CHDK reboots the cam while loading, and make the camera think it started on the second partition (that is the whole point). Even if this second partition is formatted as FAT16 (I have verified this with a smaller card), you can't make the CARD bootable with "Make card bootable..." since that would make the currently active partition bootable (from the cameras point of view). Since I can't access partition 0 if having 2 partitions ever from within CHDK, "Make bootable" will always fail in these cases. Works fine though of course when there is only 1 (FAT16) partition.

I have double and triple checked this behaviour and verified with cardtricks (the second partition is indeed marked as bootable by "Make card bootable..." (CHDK) if it's a FAT16 one, but that won't help us since the camera never sees this).

(I'm sorry if this is old news and common knowledge, I'm still getting to know CHDK, but it was news to me)

I'm working on a solution for this however. The most logical one, at least as a start, would be to to change "Create card with 2 partitions" to "Create boot partition" since that is what we are after anyway, right? This shouldn't be too difficult to implement and I have a fairly good idea how to do it.

Also "Make card bootable..." could be changed to account for these cases (or remove the item from the menu when CHDK detects a dual partition card)


Any comments? Have I got it all wrong? :P
Do it 'til it Hz

*

Offline reyalp

  • ******
  • 14125
Re: A470 Porting
« Reply #203 on: 11 / June / 2009, 02:35:38 »
reyalp, would you feel like committing another patch? :) Both 101b and 102c has been verified working now.
http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt
Applied, svn 775

Quote
Any comments? Have I got it all wrong? :P
No, that sounds about right to me.

I also had some other thoughts about "make card with 2 partitions" http://chdk.setepontos.com/index.php/topic,3490.0.html in which I didn't notice this problem  :(
Don't forget what the H stands for.

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #204 on: 11 / June / 2009, 04:45:15 »
No, that sounds about right to me.
Ok good to know I'm on the right track, thanks for confirming. It was a bit frustrating not understanding what was going on until I started going through the wrappers.c source :)

I also had some other thoughts about "make card with 2 partitions" http://chdk.setepontos.com/index.php/topic,3490.0.html in which I didn't notice this problem  :(
As for formatting from within Canon's firmware, that nukes the entire card (including partition table) unfortunately, even if you don't do a low level format. At least on 470. But a CHDK FAT16 formatter should be possible to squeeze in there without too much trouble I think, there's probably lot of open source around for something basic like that.

Hmm maybe getting a bit off topic now, will continue in the thread you linked to when I have something to show for. They say it's gonna rain here this weekend...  8)

EDIT: FAT12 formatting working. Followup: http://chdk.setepontos.com/index.php/topic,3490.msg35163.html#msg35163
« Last Edit: 12 / June / 2009, 19:42:08 by Thorwak »
Do it 'til it Hz

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #205 on: 12 / June / 2009, 01:57:50 »
Is there anyone reading this thread using an a470 with fw 1.00e? How common is this fw version anyway? Reason for asking is I  might give it a try to get a 1.00e version going, depending on how much free time I find. However, if there is no interest or noone willing to do testing and reporting on a fairly frequent basis it's not worth the work since I don't have access to a testing camera.

MrSpoon asked this recently and didn't get any replies, so if there are ppl just sitting around waiting for it to happen, this is the moment to register on the board and become testers or the port may not happen ;)

I'm working on other stuff right now so I wouldn't start right away, merely checking for interest.

MrSpoon, have you done any work yet on the 1.00e or would I start from scratch, if I decide to give it a try?
Do it 'til it Hz

Re: A470 Porting
« Reply #206 on: 12 / June / 2009, 11:54:18 »
Is there anyone reading this thread using an a470 with fw 1.00e?

Yes..  I dumped the 1.00e firmware (with a lot of help from someone who shall remain nameless*), but I'm not much of a coder, so I wasn't able to do anything meaningful.  I'd love to help with testing any ports though.

* Nevermind.  It's Mr. Spoon

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #207 on: 14 / June / 2009, 14:15:08 »
Yes..  I dumped the 1.00e firmware (with a lot of help from someone who shall remain nameless*), but I'm not much of a coder, so I wasn't able to do anything meaningful.  I'd love to help with testing any ports though.
Hmm, I've loaded the 100e fw up in IDA, and all addresses I've checked so far match those for the 101b build.. Have you tried that build on your camera? :)
Do it 'til it Hz

Re: A470 Porting
« Reply #208 on: 14 / June / 2009, 20:45:25 »
Hmm, I've loaded the 100e fw up in IDA, and all addresses I've checked so far match those for the 101b build.. Have you tried that build on your camera? :)

Yep.  Cam wouldn't boot to anything once the locked card was in the cam (assuming I did it right...).

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #209 on: 15 / June / 2009, 02:56:30 »
Yep.  Cam wouldn't boot to anything once the locked card was in the cam (assuming I did it right...).
It's a little bit surprising since they seem almost identical :)

Was it a recent build? Have you also tried the firmware update method?

Do it 'til it Hz

 

Related Topics


SimplePortal © 2008-2014, SimplePortal