Compiling the installer FIR from source

Started by kurthis, July 08, 2012, 07:42:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kurthis

Hi!

I have the ARM toolchain up and running, so compiling the autoexec.bin works like a charm... But I fail compiling the installer FIR. The point where it fails is where the makefile tries to access the python script build_fir.py in the dumper directory. The directory just not exists ;)

If it's meant to be that way, I'll just wait. If it's my own fault not being able to compile it, any help would be appreciated.

TIA

a1ex

The tools for compiling the FIRs are not public.

kurthis

Ok, that explains it well enough ;P

Thanks

BiX

Hi,
the fact that the Canon AES keys are not published is understandable. But to want to know what does something we cannot see (the FIR) is also understable  :)
Correct me if I'm wrong, but it seems the FIR calls autoexec.bin (which does basically a copy_and_restart()), so we would have all the code (besides the keys) and thus know what happens when user does 'update'?

Since I'm here, and with apologies if it is already mentioned somewhere in the wiki, is there an emulator somewhere?
(sounds difficult to code blindly and test only from the 5D2 directly  :P )

a1ex

The source code for the FIR is in the installer directory (and installer.c in src). You can compile it as an autoexec.bin and run it without having to sign it as FIR.

Of course, this is possible after you enable the bootflag with the FIR provided by us.

coutts

Here is some info for packing FIR files for older cameras (mostly what I've dealt with in my time working on ML, no idea about newer cameras). It could give you an idea of what goes into it:

http://magiclantern.wikia.com/wiki/Packing_FIR_Files

It can be a lot of work to compile a new FIR just to test a new small change, so this is why we enable the bootflag in the camera and use an autoexec.bin file. It doesn't need to be signed like a FIR file, and boots automatically unlike a FIR file.

vtrandal

This is the most informative thread I have read regarding Magic Lantern development. For us non-developers the tools that are available to us compile the code to an autoexec.bin file? It also generates a magiclantern.bin file. What's that for?

From what I have read in this thread I assume that after successfully installing ML 2.3, I can then replace the autoexec.bin on my SD card with the freshly built autoexec.bin for my T3i (600D) to test it? Do I leave everything else on the SD card as is?

scrax

Quote from: vtrandal on July 31, 2012, 01:27:07 PM
This is the most informative thread I have read regarding Magic Lantern development. For us non-developers the tools that are available to us compile the code to an autoexec.bin file? It also generates a magiclantern.bin file. What's that for?

From what I have read in this thread I assume that after successfully installing ML 2.3, I can then replace the autoexec.bin on my SD card with the freshly built autoexec.bin for my T3i (600D) to test it? Do I leave everything else on the SD card as is?

Yes!

You can do
make 600D
or
make all
and copy the autoexec.bin from the 600D or all folder (in platform folder) to the card, overwriting the old one.
All other file are unchanged, so keep the one you had with the release.

and before each make do a make clean (or you will not compile it from zero and sometimes it's bad)


I do this( ; are for concatenate the commands instead of write them one by one...) :
make clean; make 600D; cp /path/to/magic-lantern/platform/600D.102/autoexec.bin /path/to/EOS_DIGITAL/

explained is:
make clean <- will remove older file used for previous compilations
make 600D <- will compile a file for the 600D only (so smaller)
cp filetocopy destination <- will copyoverwrite autoexec.bin to the card
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

wintix

Quote from: a1ex on July 08, 2012, 07:56:18 PM
The tools for compiling the FIRs are not public.
Just discovered this piece of information once I had the complete build environment going. So there's no way to build a FIR file that's accepted by the camera on your own?

nanomad

No, because it needs to be encrypted and the tools to do that (or the keys for that matter) are not public. Only a couple of devs know them. This is done to avoid infringing copy protection laws (especially the US DMCA)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

wintix

Ok, understandable, thanks for clearing that up.

Maybe there should be a note included in the build instructions to let people know that the compilation of .fir files is not publicly possible due to copyright issues and hence fiddling with new ports is not feasible. - Or is there already a sane way to enable the bootflag on 5D3 or 7D? (Those are the only cams I own)


wintix

Hm. Technically it shouldn't be an issue then to release the python script that puts the .fir together? (without the keys)

nanomad

That is correct (I think). The decision is up to the author though.
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5