I'm currently trying to get a custom board with an i.MX 7Dual controller running. After fixing a use-after-free bug in mfgtool  it actually starts without crashing, and after digging through lots of "error #4" and "error #21" with strace and similar tools, I am at least at a point where it seems to talk to my board over USB.
Some things are very unclear to me, though. First of all, the flashing seems to work by starting a temporary u-boot instance, which then loads a linux kernel, which then does the actual writing to the medium (NAND flash) in this case, is that correct? Where is that u-boot instance supposed to be executed from? Certainly not the DRAM -- that is not configured yet. But the image is several hundred kB in size, so it cannot be the SRAM either because it doesn't fit there. I'm confused. How does this supposedly work in general (I've never used u-boot before), it seems like u-boot is supposed to configure the DRAM controller on startup, but the compiled image is too large to fit into SRAM, so what now?
Is there a way to start a simple bare-metal application using mfgtool? How would the config for that look like?
Any advice would be greatly appreciated.
Thanks and best regards,
 mfgtools/mfgtoolCLI.cpp at master · codeauroraforum/mfgtools · GitHub you cannot do this, the temporary string is allocated and the pointer returned by data() is now dangling ... will submit a pull request if I can find the time, i.e. once my board is actually working