Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - rufustfirefly

#1
Update:

I've got it compiling and linking, although there's some serious hackery involved, as well as a bunch of functions which have been dummied up, since I'm not sure where they map on the 40D's OS.

https://bitbucket.org/rufustfirefly/magic-lantern/commits/4a738f3938437566f93fd1def8ff7168ffc90847
#2
For a quick update:

I've got everything compiling, but I'm pretty sure some of my functions aren't defined in the right places, etc, so it's failing to link properly -- but otherwise it looks as though it's doable to get this working with the modern ML codebase, assuming that I (or someone else a bit better at this) untangle a few of the bad references and definitions in there.

That's as of this commit:

https://bitbucket.org/rufustfirefly/magic-lantern/commits/da9358bcac3caf54a0572be07cad611ee0922b3d
#3
I've been plugging away at trying to replicate vnd's success with a modern version of ML -- which has been complicated by most of the VxWorks code being relatively unmaintained (from what I can see).

I'm most of the way through getting it to compile, although there are some deficiencies I've been trying to hack around. If anyone's interested in jumping in:

https://bitbucket.org/rufustfirefly/magic-lantern

(I'd be more than happy to either accept pull requests or grant full access to the repository, if anyone else wants to work on it.)
#4
I have a patch for re-enabling it. Attaching.

It compiles with this, but I haven't had a chance to fully test it, so YMMV.

https://gist.github.com/jbuchbinder/2af8856ca1e8276210d7
#5
If anyone's still watching this, here's where I'm at:

I had tried, relatively unsuccessfully, to port the existing VxWorks ports to the 40D. I'm going back to the 1000d_dev work, and pushing out my current work, etc, to github. If anyone would like to assist, it's here:

https://github.com/jbuchbinder/40d_dev

Thanks!
#6
It looks like the nasty language is still present in the "Grant of License" section of the license for downloading the v1.2.3 firmware ( "You shall not alter, modify, disassemble, decompile or otherwise reverse engineer the Software and you also shall not have any third party to do so. You shall not modify, remove or delete a copyright notice of Canon contained in the Software." )

This was cribbed directly from Canon's site ( http://www.usa.canon.com/cusa/consumer/products/cameras/slr_cameras/eos_5d_mark_iii#DriversAndSoftware )

Looks like we're not about to see any official Magic Lantern versions based on the v1.2.3 firmware.

QuoteThe following End User License Agreement applies only to camera firmware updaters.

IMPORTANT!

IMPORTANT- READ THIS AGREEMENT CAREFULLY BEFORE CLICKING "I Agree" AT THE BOTTOM OF THIS PAGE!

This License Agreement (the "Agreement") is a legal agreement between you and Canon Inc. ("Canon") under which Canon is providing the software program for version-up of the firmware of Canon's products (the "Software"). BY CLICKING "I Agree" AT THE BOTTOM OF THIS PAGE, YOU ARE DEEMED TO AGREE TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT DOWNLOAD THE SOFTWARE. IN SUCH EVENT, YOU WILL NOT BE ABLE TO USE THE SOFTWARE.

1. GRANT OF LICENSE:

Canon grants you a personal and non-exclusive license to install the Software directly or through other medium such as hard disk or CompactFlash and use on Canon's product which you own.

You shall not assign, sublicense, sell, rent, lease, loan, convey or otherwise transfer to any third party, or copy, duplicate, translate or convert to another programming language the Software, except as expressly provided herein. You shall not alter, modify, disassemble, decompile or otherwise reverse engineer the Software and you also shall not have any third party to do so. You shall not modify, remove or delete a copyright notice of Canon contained in the Software.

Except as expressly provided herein, no license or right, express or implied, is hereby conveyed or granted by Canon to you for any intellectual property of Canon.

2. OWNERSHIP AND COPYRIGHT:

The Software is copyrighted and owned by Canon. You agree and acknowledge that Canon transfers neither ownership interest nor intellectual property in the Software to you under this Agreement or otherwise, and that Canon retains all right, title and interest to the Software.

3. EXPORT RESTRICTIONS:

You agree to comply with all applicable export control laws and regulations of the country involved, and not to export or re-export, directly or indirectly, the Software in violation of any such laws and regulations.

4. SUPPORT AND UPDATE:

Canon, Canon's subsidiaries and affiliates, their distributors and dealers are not responsible for maintaining or helping you in your use of the Software. No updates, bug-fixes or support will be made available to you for the Software.

5. DISCLAIMER:

THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU (AND NOT CANON, CANON'S SUBSIDIARIES AND AFFILIATES, THEIR DISTRIBUTORS AND DEALERS) ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU IN SUCH STATES WHICH DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES.

Canon, Canon's subsidiaries and affiliates, their distributors and dealers do not warrant that the functions contained in the Software will meet your requirements or that the operation of the Software will be uninterrupted or error free.

IN NO EVENT SHALL CANON, CANON'S SUBSIDIARIES AND AFFILIATES, THEIR DISTRIBUTORS AND DEALERS BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING WITHOUT LIMITATION, LOSS OF BUSINESS PROFITS, LOSS OF BUSINESS INFORMATION, LOSS OF BUSINESS INTERRUPTION OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES) ARISING OUT OF THE SOFTWARE, USE THEREOF OR INABILITY OF USE THEREOF EVEN IF CANON, CANON'S SUBSIDIARIES OR AFFILIATES, THEIR DISTRIBUTORS OR DEALERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU IN SUCH STATES WHICH DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES.

CANON, CANON'S SUBSIDIARIES AND AFFILIATES, THEIR DISTRIBUTORS AND DEALERS SHALL HAVE NO OBLIGATION TO INDEMNIFY YOU AGAINST ANY CLAIM OR SUIT BROUGHT BY A THIRD PARTY ALLEGING THAT THE SOFTWARE OR USE THEREOF INFRINGES ANY INTELLECTUAL PROPERTY OF SUCH THIRD PARTY.

6. TERM:

This Agreement is effective upon your clicking "I Agree" at the bottom of this page. You may terminate this Agreement by deleting the Software. This Agreement will also terminate if you fail to comply with any of the terms of this Agreement. In addition to Canon enforcing any of its legal rights, you shall then promptly delete the Software.

7. U.S. GOVERNMENT RESTRICTED RIGHTS NOTICE:

The Software is a "commercial item," as that term is defined at 48 C.F.R. 2.101 (Oct 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.72024 (June 1995), all U.S. Government End Users shall acquire the Software with only those rights set forth herein. Manufacturer is Canon Inc./30-2, Shimomaruko 3-chome, Ohta-ku, Tokyo 146-8501, Japan.

8. SEVERABILITY:

In the event that any provision of this Agreement is declared or found to be illegal by any court or tribunal of competent jurisdiction, such provision shall be null and void with respect to the jurisdiction of that court or tribunal and all the remaining provisions of this Agreement shall remain in full force and effect.

9. ACKNOWLEDGMENT:

BY CLICKING "I Agree" AT THE BOTTOM OF THIS PAGE, YOU SHALL BE DEEMED TO HAVE ACKNOWLEDGED THAT YOU HAVE READ THIS AGREEMENT, UNDERSTOOD IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. YOU FURTHER AGREE THAT THIS AGREEMENT IS THE COMPLETE AND EXCLUSIVE STATEMENT OF AGREEMENT BETWEEN YOU AND CANON CONCERNING THE SUBJECT MATTER HEREOF WHICH SUPERSEDES ANY PROPOSALS OR PRIOR AGREEMENT, ORAL OR WRITTEN, AND ANY OTHER COMMUNICATIONS BETWEEN THE PARTIES RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT. NO AMENDMENT TO THIS AGREEMENT SHALL BE EFFECTIVE UNLESS SIGNED BY A DULY AUTHORIZED REPRESENTATIVE OF CANON.

I have read, understand the information above, and agree to same and wish to download the designated software.
#7
Is anyone aware whether or not the EULA for the new firmware version (1.2.3) has removed the odious reverse-engineering inhibiting clause, which kept ML from being ported to v1.2.1?
#8
Camera-specific Development / Re: Canon 40D
November 08, 2013, 09:04:27 PM
Quote from: imme on November 02, 2013, 06:00:11 AM
rufustfirefly can you please add a little tutorial as how can I added it to 40d and CF card. sorry but I am totally new to these firmwares stuff.

The trick is to dump the .FIR file onto your CF card (presumably using a CF card reader), then use the "Update Firmware" menu option to attempt to sideload the dumper code. It won't actually upgrade your firmware, but rather attempt to run the custom code which should, in theory, spin the CF card for a bit and dump out a file containing the loaded firmware.

It could also do bad things, which it shouldn't do. If, for some reason, it locks up completely and hasn't done anything within 30 seconds or so, you might want to pull the battery.
#9
Quote from: Steve_Brule on October 29, 2013, 06:15:07 PM
Any idea when ML might become a stable release on 5DIII?
I am reallly interested in all of this great work, but I can't afford to risk my camera.

I've been using the nightly builds for quite some time, and it has been pretty stable for me. If you're not quite adventuresome enough to use the nightlies, just throw Alpha 3 on your camera -- it works very well. (I went with the nightly builds for RAW video support and the neat dual_iso module) I've been using it for both cinematography *and* photography, with much success. ;)
#10
I'm still periodically building win32 and linux 32bit binaries for cr2hdr, available here:

https://bitbucket.org/rufustfirefly/magic-lantern/downloads

in case anyone is interested. I try to build a new version whenever I see a Mercurial check-in related to the cr2hdr code, usually once a day, at most.
#11
Camera-specific Development / Re: Canon 40D
October 29, 2013, 09:12:57 PM
I have built a set of dumpers, which should dump out the active firmware. If someone wants to try to load one or the other up on their 40D running v1.1.1, we should be able to get an unencrypted dump of the firmware.

It's all based off of the previous 1.0.5 and 1.0.8 work, so mileage may vary.

https://bitbucket.org/rufustfirefly/magic-lantern/downloads/108D1.fir
https://bitbucket.org/rufustfirefly/magic-lantern/downloads/108D2.fir

There's a disclaimer that this could do something awful -- but one of them should just dump a file to your card (after a flurry of activity).

If anyone wants to check my work, it's all on bitbucket:

https://bitbucket.org/rufustfirefly/40d108-dumper
#12
Camera-specific Development / Re: Canon 40D
September 25, 2013, 10:16:51 PM
Quote from: StefanKeller.AC on September 21, 2013, 12:07:01 PM
loading that 40d00111-ML.2013-08-30-007bb9a0574d.fir with the files from ML-40D.2013-08-30.53fbc6b53da5.zip on the card
doesnt work, only the upper display is on, battery has to be taken out...
how shall it work?

I'm having some issues getting development rolling on the 40D, primarily because I've been unable to extract an unencrypted version of the 1.1.1 firmware (as I had mentioned earlier in the thread). This has left me unable to find the rest of the function locations, so getting this port working, at least at the 1.1.1 firmware revision, isn't going to happen -- pending being able to get an unencrypted copy of the firmware to work with.

Alternately, I can try to move to using 1.0.5 or 1.0.8, which have both had their encryption keys reverse engineered. I hate backing out versions of firmware, but if it's the only way I can proceed, I may go that way.
#13
General Development / Re: 40D Firmware assembly
September 12, 2013, 08:00:31 PM
Quote from: rwl408 on September 11, 2013, 05:55:50 PM
assemble_fw essentially replaces the flasher file with the user file, with some necessary adjustment, to get the output file. The one I know about requires "injecting" your code into the right place into Canon's flasher code (40D_1_flasher.bin) to produces the user file. Please note that the flasher file as one of inputs to assemble_fw is the original unmodified Canon flasher code. In this case autoexec.bin is your code and I doubt it can be run without this step first in Canon's firmware update environment. However I don't know much about the file autoexec.bin from ML that I could be wrong.

I was following http://magiclantern.wikia.com/wiki/Packing_FIR_Files to attempt to get the autoexec.bin file generated by the ML build process to run.
#14
Camera-specific Development / Re: Canon 40D
September 08, 2013, 12:23:21 AM
I've got a 40D body laying around -- I'd be perfectly willing to dump the firmware, search for function calls, etc; I just have little to no expertise in doing any of that, and the Magic Lantern wiki seems perilously out of date. Could anyone point me to a somewhat more up to date walkthrough of either a) using the extracted firmware components to analyse or b) dumping active ROM to do the same -- and any postings, articles, or pages about digging for the locations of specific calls?

I know it seems like a tall order, but I'd love to help if anyone can point me in the right direction. I'm using a Linux machine, but I have a Windows VM handy (as well as a copy of WINE) if it's needed.
#15
General Development / Re: 40D Firmware assembly
August 30, 2013, 03:16:15 PM
I also posted the temporary build patch in the bug, but here it is for completeness:

diff -r 53fbc6b53da5 src/stdio.c
--- a/src/stdio.c Fri Aug 30 15:48:29 2013 +0300
+++ b/src/stdio.c Fri Aug 30 09:14:00 2013 -0400
@@ -148,7 +148,9 @@
     }
     else
     {
+#ifndef CONFIG_40D
         FIO_SeekFile(f,0,SEEK_END);
+#endif /* !CONFIG_40D */
     }
     return f;
}
#16
General Development / Re: 40D Firmware assembly
August 30, 2013, 03:12:52 PM
Quote from: a1ex on August 30, 2013, 02:59:53 PM
FIO_SeekFile is not really essential, especially for a very early port, so you can just ifdef it out for now.

Sure. I had opened up an issue on it, just in case:

https://bitbucket.org/hudson/magic-lantern/issue/1616/40d-build-broken
#17
General Development / Re: 40D Firmware assembly
August 30, 2013, 02:54:32 PM
I'll try to help out as much as I can with the 40D body that I have now. My primary interest with that body is being able to use focus peaking in LV mode (since it allows me to use my collection of manual focus lenses with more ease), but the additional features would be great, as well.
#18
General Development / Re: 40D Firmware assembly
August 29, 2013, 08:32:57 PM
Also, somehow in the last day, 40D builds broke.

[ LD       ]   magiclantern
dietlibc.a(vsscanf.o): In function `vsscanf':
vsscanf.c:(.text+0x5c): warning: warning: the scanf functions add several kilobytes of bloat.
dietlibc.a(sprintf.o): In function `sprintf':
sprintf.c:(.text+0x14): warning: warning: Avoid *sprintf; use *snprintf. It is more secure.
stdio.o: In function `FIO_CreateFileOrAppend':
stdio.c:(.text+0x35c): undefined reference to `FIO_SeekFile'
collect2: error: ld returned 1 exit status
make[1]: *** [magiclantern] Error 1


The odd part is that FIO_SeekFile should have been declared in dryos.h, which is theoretically included by stdio.c on line 11 unconditionally ; so I'm not sure why that would cause the build to break, since it worked yesterday. (It's an external function definition, so it probably references an issue somewhere else in the codebase, but I'm not horribly familiar with where to look.)
#19
I've been building Linux and Windows binaries for cr2hdr, as the code seems to be changing pretty often. They're available here, if anyone wants them, tagged with the date and Mercurial revision:

https://bitbucket.org/rufustfirefly/magic-lantern/downloads
#20
General Development / Re: 40D Firmware assembly
August 29, 2013, 05:23:20 PM
Quote from: jplxpto on August 29, 2013, 01:15:58 AM
I think that you need my help...

If I have time in the next week-end I do a dump for you.
I need to review my source code and add some additional validations.
I started by performing these steps ... is doing one year :)

Why --id 0x80000190  ???

The original camera id in the assemble_fw script was "0x80000254", which maps to the 1000D camera body. Using fir_tool2.py, I got:

$ ./fir_tool2.py 40d00111.fir
Fir_tool 0.5 (20Mar2010)

fileLen = 0x7d06fc
---.fir header---
0x000: modelId = 0x80000190, (40D, VxWorks)
0x010: version = 1.1.1
0x020: checksum = 0xc1be4dd8
0x024: updater1 header = 0xb0
0x028: updater1 offset = 0x120
0x02c: updater2 offset = 0xffffffff
0x030: firmware offset = 0x19dc80
0x034: 0xffffffff
0x038: embedded file size = 0x7d06fc
0x03c: 0x0
0x040: sha1 seed = 0x9b1bf2fb
0x044: 0x00000004 0x00000000 0x00000020 0x00000024 0x00000044 0x000000b0 0x0019dbd0
0x060: 0x19dc80
0x064: firmware length = 0x632a7c
0x068: updater1 hmac-sha1 = 5edae41600de8549c060cc69ed85b38579abf5fe
0x088: firmware hmac-sha1 = 1ddd1f063c617b0109ec10914ce75c900bbf8461
---updater1 header---
0x0b0: updater1 length = 0x19db60. starts at 0x120
0x0b4: 0x19db60
0x0b8: 0x0
0x0bc: xor seed value = 0xee742c27
0x120: --- updater1 (ciphered) ---
---firmware header---
0x19dc80: (+0x000), offset to decryption data = 0xc
0x19dc84: (+0x004), offset to encrypted data = 0x7c. starts at 0x19dc80
0x19dc88: (+0x008), total firmware length (including header) = 0x632a7c. starts at 0x19dc80
-
0x19dc8c: (+0x00c), firmware length (encrypted part) = 0x632a00. starts at 0x19dcfc
0x19dc90: (+0x010), 0x006329f4
0x19dc94: (+0x014), 0x0
0x19dc98: (+0x018), 0x80ad7597
0x19dc9c: (+0x01c), 4860ffc49830f18619a4f1e289bc6248
0x19dcac: (+0x02c), d9856011172a94389484254df3ae7401f26b4fafff2f3140da923a63ae43ed49
0x19dccc: (+0x04c), c47d161d7498f24e6be84357b477f403
0x19dcdc: (+0x05c), f93377c9d24622a4e931aa3c675938603d67befa43b33d55d4e6f7942a2adf58
---firmware (encrypted)---
0x19dcfc: (+0x07c)


This produced 0x000: modelId = 0x80000190, (40D, VxWorks) from the header, which I used to identify the camera.
#21
General Development / 40D Firmware assembly
August 29, 2013, 12:45:13 AM
I've been trying to build the .FIR file loader for a 40D running v1.1.1 (in-line with the version required in the Mercurial repository). I had followed the instructions on http://magiclantern.wikia.com/wiki/Packing_FIR_Files and had done the following to build a firmware loader:


  • Compile an autoexec.bin file for the 40D.
    make 40D

    • Download a copy of the firmware for the 40D (v1.1.1) from Canon's website, and extract the original .FIR file from the archive
    • Compiled and run dissect_fw3 to extract the pieces of the loader.
      ./dissect_fw3 40d00111.fir 40D 40D
    • Attempt to assemble using assemble_fw.
      ./assemble_fw --header 40D_0_header.bin --flasher 40D_1_flasher.bin --user autoexec.bin --id 0x80000190 --output 40d00111-ML.fir
    • Copy the new firmware and ML files from the distribution to a CF card.

    Flashing this gives me working nav controls, but a blank LCD screen, even when pressing "play", "del", or "menu". Is this a deficit in my FIR file construction, or a ML issue?

    (I'd actually be perfectly fine with trying to compile a "bootflag" firmware update, so that I don't necessarily have to reassemble a FIR file every time I want to update from the Mercurial repository.)
#22
Tragic Lantern / Re: Raw video on 50d and 40d
August 28, 2013, 05:46:49 PM
Quote from: Andy600 on August 27, 2013, 04:13:14 PM
The 40D is not currently supported but @jplxpto is working on porting ML http://www.magiclantern.fm/forum/index.php?topic=1452.msg66726#msg66726

Whether it will ever have raw video capability is another matter. If it does there will likely be limitations to frame size and write speeds because of the smaller pixel count of the sensor and slower CF card slot.

I had built some snapshot builds for the 40D, 50D, and 5D3, which I have available here:

https://bitbucket.org/rufustfirefly/magic-lantern/downloads

The only issue I still have is that I haven't figured out how to modify the stock FIR file to allow loading Magic Lantern on the 40D, and the instructions on the wiki seem to be a little out-of-date.
#23
Camera-specific Development / Re: Canon 40D
August 28, 2013, 05:45:10 PM
I built a 40D "snapshot" build (but without the FIR loader, as I haven't nailed down a procedure for putting one together yet), if anyone is interested. To "bump up" interest, there's also 5D3 and 50D builds there.

https://bitbucket.org/rufustfirefly/magic-lantern/downloads
#24
Tragic Lantern / Re: Raw video on 50d and 40d
August 27, 2013, 03:51:11 PM
Are there any 40D builds available, or only 50D? (I'm only asking because of the topic name)
#25
Camera-specific Development / Re: Canon 40D
August 27, 2013, 12:32:25 AM
Is there currently a more "modern" version of the firmware extract/build instructions to create a FIR file for the 40D than the one located here : http://www.magiclantern.fm/forum/index.php?topic=1452.msg3856#msg3856 ?

Some of the tools listed in that don't exist in the repository anymore, so I'm getting the distinct impression that the build process has changed slightly.

Thanks!