Magic Lantern Forum

Developing Magic Lantern => General Development Discussion => Topic started by: bpv5P on August 08, 2017, 09:04:25 AM

Title: Filesystem support
Post by: bpv5P on August 08, 2017, 09:04:25 AM
Hi forum,
Does anyone already did reverser engineering on how Canon firmware handle filesystems? Would it be able to run on non-FAT cards?
I'm thinking here about the benefits of F2FS, a modern filesystem designed to run on flash storage:
https://en.wikipedia.org/wiki/F2FS

I don't know about the technical aspects, it's just a suggestion, since F2FS would offer better performance and reliability.
Title: Re: Filesystem support
Post by: a1ex on August 08, 2017, 09:20:06 AM
We have block-level access to the entire card, regardless of its filesystem (see bootflags.c, using Canon routines), and there were also attempts to access the SD and CF card directly (recovery branch for SD, cf_acc.mo or hdparm branch for CF). There is even a custom filesystem driver (fullfat) that runs in bootloader (recovery branch). In QEMU we have both SD and CF working, so the low-level side is documented there (SDIO/CFATA, SDDMA/CFDMA). There's also this UHS hack (http://www.magiclantern.fm/forum/index.php?topic=12862.0), which might be helpful (at least as background info).

I'm not sure how the high-level side works, but g3gg0 appears to have figured it out in io_crypt, so I'd say a filesystem driver is totally doable. However, I don't see it as a priority.

In other words, if want to port this thing, there shouldn't be any major roadblocks, other than time and manpower. I can help with advice on the direct access interfaces for SD/CF and how to debug in QEMU.
Title: Re: Filesystem support
Post by: bpv5P on August 08, 2017, 09:50:12 AM
Ok. Thanks a1ex.