Hi,
We are using AM437X -
MTD Part looks like :
#: name size offset mask_flags
0: NAND.SPL 0x00040000 0x00000000 0
1: NAND.SPL.backup1 0x00040000 0x00040000 0
2: NAND.SPL.backup2 0x00040000 0x00080000 0
3: NAND.SPL.backup3 0x00040000 0x000c0000 0
4: NAND.u-boot.A 0x00100000 0x00100000 0
5: NAND.u-boot-env.A 0x00040000 0x00200000 0
6: NAND.kernel.A 0x00800000 0x00240000 0
7: NAND.u-boot.B 0x00100000 0x00a40000 0
8: NAND.u-boot-env.B 0x00040000 0x00b40000 0
9: NAND.kernel.B 0x00800000 0x00b80000 0
10: NAND.config 0x01000000 0x01380000 0
11: NAND.file-system.A 0x0c000000 0x02380000 0
12: NAND.file-system.B 0x0c000000 0x0e380000 0
Double copy(duplicate copy ) is for safe upgrade .
Scenario - current active partition of uboot = NAND.u-boot.A and we upgraded uboot which is now stored in NAND.u-boot.B partition.
Issue : We can change env variable from user space by using fw_Setenv but how to custimize SPL or MLO to read uboot from NAND.u-boot.B instead of NAND.u-boot.A which is by default choice.
CONFIG_SYS_NAND_U_BOOT_OFFS in board config file is set to 0x00100000 which is NAND.u-boot.A offset. I tried to read env variable also from SPL but every time it shows the default value of env variable and not showing the updated one (root cause may be - env var are not hashed into table in SPL ) but how can i read updated val of boot env variables ?