Author Topic: Rescue  (Read 47628 times)

Offline owerlord

  • Full Member
  • ***
  • Posts: 115
Rescue
« on: 05 / June / 2008, 04:16:52 »
As jeff666 was saing this: http://chdk.setepontos.com/index.php/topic,1359.msg14550.html#msg14550, he didn't know I would test the @*#$! code one more time - to answere his question properly. Why "@*#$!" ? Becose:

Becose it broke the camera. Propably I pulled out the batteries in the wrong moment (as Seklth - who's camera got it self in service becose of a similar code). To say for my defence: the "wrong moment" is nearly "any moment" in a infinit loop of "Loading ...".

The good news is I learned much more since Seklth camera broke. Good news for my camera - becose my guarantee expired. What I done:

As I said in the other topic, the bootloader is simple. It tries to run a bootable CF card. The "bootable" means it have a "BOOTDISK" at 0x40, and "EOS_DEVELOP" at 0x2B. I didn't made a bootable CF becose I was working on the full reboot as I wrote. But what I done next, what to load the bootloader attached program in to the ram, and run the .fir loading procedure. The orginal .fir didn't work right (buttons didn't work), So I runned my led-dumper to look at the bootloading-flags (look in the "... Runned ..." thread) - They were 0 0 0 -1 in stead of 0 -1 -1 -1. I then loaded the bootloader-attached program and used it this time to write the right bootflags. Then pulled out the battery - and it work's perfectly !

Why I'm writing it? Two reasons:

1. So if you'll break the camera like that, mayby it will help you (attached .fir and AUTOEXEC.BIN)
2. As I said in a other thread: I'm not rich man - I was terrified when It happened (guarantee expired, so much money!), and I had to write somewhere :-)

Offline owerlord

  • Full Member
  • ***
  • Posts: 115
Re: Rescue
« Reply #1 on: 05 / June / 2008, 04:21:41 »
NOTE: the 0x2B offset of the CF card is not the drive Label !! The card tricks or FAT format don't work to make a bootable CF. (I tried it - but it cannot do it). If anybody want to edit the card tricks program - It'll be great. I have other work now (and I have to slow down my heart rate to normal ;-)

Offline ASalina

  • Full Member
  • ***
  • Posts: 150
  • 40D
Re: Rescue
« Reply #2 on: 05 / June / 2008, 04:29:40 »
I'm sweating just thinking about it! I'm glad everything is alright!

Offline DataGhost

  • Developers
  • Sr. Member
  • ****
  • Posts: 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Rescue
« Reply #3 on: 05 / June / 2008, 12:10:16 »
You have EOS_DEVELOP and BOOTDISK in the MBR, then? If you put it in the partition bootsector, the thing at 0x2B *IS* the drive label, in case of FAT12/FAT16. For FAT32 it's supposed to be at 0x47, because you'd be overwriting other stuff at 0x2B.

Offline owerlord

  • Full Member
  • ***
  • Posts: 115
Re: Rescue
« Reply #4 on: 05 / June / 2008, 13:46:10 »
Hmmm, mayby I have a wierd version of Card Tricks, and Windows - but my system and the card tricks only set the partition label - the label at 0x2B is mayby *THE* drive label - but non the less - they left it as "No Name" or something :-) Label or not - drive or partition - moral is this: write it yourself - or modyfie the cardtricks program - if you want to boot :-)

Offline whim

  • Guru Member
  • ******
  • Posts: 1954
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Rescue
« Reply #5 on: 05 / June / 2008, 22:24:09 »
If necessary I could modify CardTricks (or rather, I suppose, the included bootable.exe)
However, I don't have a DSLR so you guys would have to specify exactly what it is that
you want wriiten to the bootsector.

wim

Offline owerlord

  • Full Member
  • ***
  • Posts: 115
Re: Rescue
« Reply #6 on: 05 / June / 2008, 22:47:59 »
Thing's simple: for 400D the bootable CF have (for FAT16):
at 0x2B "EOS_DEVELOP"
at 0x40 "BOOTDISK" <- this is writen right

The program is well done - so a DSLR-CF version would be great :-)
I edited my card raw.

Offline whim

  • Guru Member
  • ******
  • Posts: 1954
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Rescue
« Reply #7 on: 17 / June / 2008, 01:49:54 »
@owerlord

OK, here's a replacement bootable.exe for CardTricks (with source code)

just put it in the CardTricks subdirectory (overwriting original bootable.exe)

I checked its efficacy with HexEdit and card still boots SD Canon P&S cams
as well ! (checked on ixus70_sd1000)

specs: will write
at 0x2B "EOS_DEVELOP"
at 0x40 "BOOTDISK"  for FAT16 only

will check further on P&S cams, and if no problems appear might integrate it
to avoid maintaining 2 versions.

Let me know if it works and/or if you need more mods (what about FAT32 ?)

wim
« Last Edit: 17 / June / 2008, 15:07:03 by whim »

Offline owerlord

  • Full Member
  • ***
  • Posts: 115
Re: Rescue
« Reply #8 on: 17 / June / 2008, 15:53:43 »
thanks ! it's working.

CHDK Forum

Re: Rescue
« Reply #8 on: 17 / June / 2008, 15:53:43 »

Offline Nervous

  • Newbie
  • *
  • Posts: 2
Re: Rescue
« Reply #9 on: 24 / July / 2008, 09:07:48 »
FAT32 will be really useful!

Offline rubinson

  • Newbie
  • *
  • Posts: 1
Re: Rescue
« Reply #10 on: 21 / October / 2008, 18:43:34 »
owerlord:
I made the cf bootable and used the rescue disk,it didn't work.It seemed that it doesn't write the bootflag.
I want to know why it dosn't work on my 400D.Thanks!

Offline Zibri

  • Jr. Member
  • **
  • Posts: 53
Re: Rescue
« Reply #11 on: 24 / June / 2009, 02:55:27 »
because you didn't update to "testfir.fir"

Offline Vathek

  • Rookie
  • *
  • Posts: 11
  • 400D
Re: Rescue
« Reply #12 on: 07 / September / 2009, 19:52:35 »
Well, can you someone tell me what the "Testfir.fir" file really does?

It seems that it allow the autoexec.bin to be launched from the card, right?
But it is reversible? If I flash the original firmware after flashing the testfir.fir is will be reverted back to normal status? (So warranty still valid?)

Offline xiongjason

  • Rookie
  • *
  • Posts: 7
Re: Rescue
« Reply #13 on: 17 / December / 2009, 14:23:24 »
A few days after I flashing the testfir.fir, I flash the original firmware.
But the boot flag is not back to the original status.
So I just wonder how can I undo the hack from the "testfir.fir".

Offline xiongjason

  • Rookie
  • *
  • Posts: 7
Re: Rescue
« Reply #14 on: 17 / December / 2009, 14:25:37 »
owerlord:
Can u share us where did u got the file(testfir.fir). And do u know how to go back?

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal