Disable bootdisk flag with the press of a button

Started by solflekken, May 28, 2015, 05:26:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

solflekken

To use my Eyefi-card in the 5dmkiii, i need to disable the bootdisk flag. Right now it takes me about a minutte to disable it, becaus I have to wait for 30 seconds befor it is disabled. It would be really nice to have a botton, so that I can disable it instantly. I often switch between the "standard" firmware on the canon and magic lantern becaus i want to use my Eyefi -card. It would save me lots of time if there was a button that could dissable the bootdisk flag. I dont know much about programing, but i think this is a fairly easy thing to do. Can this be done?

Walter Schulz

Sorry, but I'm not getting what you want.
1. There is a bootflag in cam which will try to access a bootable card
2. There is card which is bootable. If ML finds a bootable card it will try to load autoexec.bin.
There are several ways to make card bootable.
- Run installation and restart cam before timeout
- Use utilities EOScard/MacBoot or Make_bootable.sh

The easiest way to make a card non-bootable is using a cardreader and quickformat it.

Are you saying a freshly formatted Eye-Fi card will stall the cam if cam's bootflag is set?

solflekken

Yes, Eye-Fi cards won't work with magic lanter.(I have read some older ones do, but my "Eye-fi mobi pro 32 gb, sure does not.)
In order to use my Eye-Fi card, I have to dissable the bootflag on the camera and then I can insert my Eye-Fi card. When I want to use magic lantern again, I do a firmware update, without the Eye-Fi card inserted. The issue is that when going from using magic lantern to using the Eye-Fi card, I need to wait 30 seconds before it dissables the bootflag. It would be nice to have the option to press a button so the bootflag would be dissabled instantly, insted of waiting. I frequently switch back and forth, and it would save me lots of time.

Walter Schulz

I asked: "Are you saying a freshly formatted Eye-Fi card will stall the cam if cam's bootflag is set?"

Quote from: solflekken on May 28, 2015, 06:29:00 PM
Yes, Eye-Fi cards won't work with magic lanter.

Not that clear to me if you're trying to tell me ML won't start using Eye-Fi (which is old news) or something else.
Remove battery, format your Eye-Fi card using a cardreader and insert it into cam with cam's bootflag enabled, insert battery and power on. Does cam startup or not?

solflekken

When trying to use the eye-fi card with bootflag enabled, it does note turn of and i have to remove my battery. Thats not the issue though. I made a video trying to explain myself.

https://www.dropbox.com/sh/9i952mow74y7lkk/AADZsTQLfE5a4ddlN4kns7Psa?dl=0

Walter Schulz

I believe I understood your request from the very beginning. And I believe you think you have answered my question.
But you have not.
I asked you to format the Eye-Fi card using cardreader and insert it into your cam where ML bootflag is enabled.
Are you able to start your cam with a freshly formatted Eye-Fi card?

Just Yes or No.

solflekken

No, i can't start the camera with a freshly formatted Eye-fi card when ML bootflag is enabled.

Walter Schulz

Thanks!
Sorry to read this. I looked into archives and found your issue confirmed. It happens with "newer" Eye-Fi cards (some older seems to work fine, though) and - as you reported - the only way to make it work is to remove cam's bootflag.

I really suck when it comes to programming so cum grano salis (tons of, in fact):
https://bitbucket.org/hudson/magic-lantern/src/4d82951f40603fa46f4b80c864cfbce45e009330/src/installer.c?at=unified
line 398 seems to define timeout. If you are able to compile ML on your own you might just use a lower value.
I doubt there will be a *click-button-and-remove-bootflag" option in main repository. If I remember correctly there are some reservations about NVRAM wearing out if rewritten frequently.

And a new installer is in development. It has some major enhancements but the bad news for you is - at time of writing - timeout is set to 60 seconds ...


solflekken

I have no clue how to compile ML, so I guess I am out off luck... What do you mean by "If I remember correctly there are some reservations about NVRAM wearing out if rewritten frequently." Is it "bad" for my camera if i enable and disable the bootflag frequently? Thanks for the response anyways :)

dmilligan

It requires more than the ability to compile ML to create a new installer. Even I can't do this, you have to break Canon's encryption to be able to sign the fir. However, it is possible to simply disable the bootflag directly from ML (you can even do it from a script). All you have to do is call an eventproc (a function in the Canon firmware that can be called by name).


call("DisableBootDisk");


NVRAM is changed every time you change any setting on the camera (shutter, aperture, ISO, etc.), so I don't think this is a concern. I don't know for sure, but it's probably just NAND FLASH, the same that's in your memory cards and SSDs. The concern is that calling functions in Canon firmware that we know write to NVRAM is considered "dangerous" because if they misbehave or do something we didn't expect or we didn't call them correctly, can result in invalid data being written to NVRAM, which can soft-brick the camera.

There have been issues in the past enabling/disabling the bootflag from the wrong "context" (that's why the whole hubbub about the inability to disable the bootflag with the initial 5D3 port). See: http://www.magiclantern.fm/forum/index.php?topic=6035.msg53726#msg53726 and http://www.magiclantern.fm/forum/index.php?topic=9274.msg88148#msg88148