[quote user="Mike Worster"]
This allows for 4 copies of the MLO, but what about the second stage bootloader (u-boot)? Is there any capability to have the 1st stage bootloader look for more than one copy of the second stage bootloader?
Is this either a feature currently built in or something that could be added in with some ease?
[/quote]
The first-level bootloader is called u-boot SPL (secondary program loader). It's just a chopped down version of the full u-boot source in order to fit completely in internal memory. I'm not aware of this capability being built into u-boot SPL. You could certainly add something. Although it sounds "easy" I imagine it would probably be a lot of work to really harden the code. For example, in order to really make it robust I would envision putting some kind of CRC header on the file being loaded so that u-boot SPL can validate that it has been loaded correctly. But then you're looking at modifying the tooling for image creation, etc. Some of that already exists as the uImage files that u-boot loads for the kernel have CRCs built into them. Of course once you start adding all the CRC code back into u-boot SPL you might not have enough internal RAM to do it all. So I wouldn't expect it to be trivial.
[quote user="Mike Worster"] The ROM code will look for more than one copy, is this to prevent a corrupt image from preventing the board from booting?[/quote]
It looks for more than one copy to prevent a bad page from preventing your device from booting.
[quote user="Mike Worster"]For example if during an upgrade the first copy of MLO got corrupted, the next time the board boots it will try to boot the first copy and when that fails it will check to see if there are any other copies?[/quote]
Not necessarily. If the pages are programmed with valid data (e.g. half from the original bootloader and half from the new bootloader, due to a power interruption for example) then this would look ok to the ROM. It's only looking for bad pages, i.e. it is not checking the integrity of the complete image (i.e. no CRC, etc.) to make sure it's "good".