Hello,
I am having issue with my system and I am not sure what is my best solution.
I am running an custom board based on the BeagleBone Black, using NAND instead of eMMC. U-Boot version is u-boot-2013.10-ti2013.12.01.
Our system has 2 partitions for storing U-Boot environment variables, mtd6 (primary) and mtd7 (redundant). Initially, when executing saveenv, I thought U-Boot wrote the environment variables to both mtd6 and mtd7. Apparently, every time a saveenv is executed, U-Boot only writes to one of them and alternates between them for every saveenv.
My issue is that once linux kernel starts, my application needs to access the U-Boot parameters, which I accomplish using nanddump. The problem is I dont know which U-Boot partition is active, so I dont know whether to read from mtd6 or mtd7. A couple questions:
1. What is the philosophy behind alternating between the primary and backup partitions?
2. From Linux, is there a way to determine the active partition? Our current workaround is to always execute saveenv twice so that the current environment is always saved to both partitions, then we always read mtd6.
Thanks in advance for any help! - Anthony