I'm building Yocto for BeagleBone using the meta-ti layer and the kernel and 
U-Boot provided by that layer.

I'm having some trouble understanding the location where U-Boot saves its 
environment for BeagleBone Black.

After doing some reading, it looks as though it might be saving environment on 
a "special" eMMC boot partition (which is not the same as the FAT16 partition 1 
I created to store MLO and u-boot.img).

However, this is only when booting from the on-board eMMC I think. When booting 
from SD card, where is environment stored? I can do "saveenv" command in 
U-Boot, and it says it's saving it to MMC.

U-Boot# saveenv
Saving Environment to MMC...
Writing to MMC(1)... done

But then after a reboot, it says:

MMC: block number 0x100 exceeds max(0x0)
MMC: block number 0x200 exceeds max(0x0)
*** Error - No Valid Environment Area found
Using default environment

So does that mean that U-Boot can't use a saved environment when booting from 
SD card?

Actually, based on some simple testing, it seems that it _is_ writing to the 
boot partition of the on-board eMMC, and loading it when it reboots from SD 
card, despite the error message. This is confusing.

What about the case of a board with no eMMC, such as BeagleBone White? Where 
would it save environment then?

How can I erase the saved environment when booting from eMMC, to ensure that 
U-Boot defaults will be used? I see that when Linux boots, there are block 
devices /dev/mmcblk0boot0 and /dev/mmcblk0boot1. But it seems I can't write to 
them:

# dd if=/dev/zero of=/dev/mmcblk0boot1 bs=1k count=1k
dd: writing '/dev/mmcblk0boot1': Operation not permitted
1+0 records in
0+0 records out

-- 
Craig McQueen

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to