I have a doubt related to the Beaglebone Green Wireless u boot environment setup

I am working on an Ota update and I am using Beaglebone green wireless and Debian Operating system. This is A + B Redundancy update mechanism.

I am using 2 Block device mmcblk0 and mmcblk1 one being SD card and other being eMMC respectively. My lsblk output is:


mmcblk0 179:0 0 7.4G 0 disk

-mmcblk0p1 179:1 0 3.3G 0 part /<br/> mmcblk1 179:8 0 3.6G 0 disk<br/> -mmcblk1p1 179:9 0 3.6G 0 part

mmcblk1boot0 179:16 0 2M 1 disk

mmcblk1boot1 179:24 0 2M 1 disk

mmcblk1rpmb 179:32 0 128K 0 disk

By default, if I have an os on sd card then u-boot boots from the sd card. i.e it gives boot priority to Sd card and then to the eMMC.

I have 2 Operating systems one installed on the sd card and other on the Beaglebone eMMC. ( For A + B Redundancy update ) One is an active partition while other is an inactive partition. When the OTA update has been performed active partition converts to the inactive partition and inactive partition will convert to the active one. ( This will happens once the user has rebooted the bone. )

I am using u-boot as a bootloader.

According to my understanding, MLO is the first bootloader and it initializes and loads the second bootloader u-boot. U-boot is responsible for deciding which partition to boot from and it can be configured from the u-Env.txt in /boot.

I have a doubt related to the Booting Process. I read on many forums and documentation that u-boot reads the u-Env.txt from /boot directory for setting the Environment variable which decides the partition to boot from.

I configured the uboot by adding this line to the u-Env.txt:-

bootargs=console=ttyO0,115200n8 root=/dev/mmcblk1p1 mem=128M rootwait

bootcmd=mmc rescan; fatload mmc 0 0x82000000 uImage; bootm 0x82000000


Right now I am booted in the mmcblk0p1 partition i.e SD card and u-boot gives priority to the sd card by default. Now I am trying to boot from eMMC when sd card is also present on the beaglebone by adding the above line in uEnv.txt. But my bone is booting from sd card (2 Os variants are available on both eMMC and Sd card ) ( One on each )

I am confused if I am doing it in the right way or Where I am going wrong for Configuring the uboot environment variable? Is there any other way which can help me in configuring the uboot Environment variable.


Sharvin Shah