Part Number: BEAGLEBK
Tool/software: Linux
Hi,
I have a question about how to enable the u-boot bootcount so that it will boot from altbootcmd if the bootcount exceeds bootlimit. The following is what I did:
1. Enable CONFIG_BOOTCOUNT in u-boot configuration.
2. Define CONFIG_BOOTCOUNT_LIMIT in the board configuration header.
3. Add bootlimit and upgrade_available in CONFIG_EXTRA_ENV_SETTINGS.
After doing these, u-boot behavior is not quite what I expect. Here are my questions:
1. My understanding is only when upgrade_available is 1, bootcount will increase after a system reboot (without power cycle the board). However, I saw bootcount increases when upgrade_available is set to 0. Is this expected? If not, what did I miss?
2. I have environment variables stored in uboot.env on a eMMC FAT partition (1:1). However, I see different bootcount values when I do "printenv" in u-boot and "fw_printenv" in user space. Also, bootcount is reset back to 1 after a power cycle (not rebooting) of the system. Maybe the bootcound is not stored in the eMMC? What I may have missed?
Please help. Thank you.