beagle bone black boot configuration


I am trying to configure the beagle bone black and uboot in a way that I can boot from several media.
The idea is to run from eMMC in general but boot from USB for updating with a new image.

I have to ideas:
a) configure uboot to boot from USB


b) install grub after uboot.

In both cases I would start the update process from the running linux and reboot. During reboot, the USB storage is already plugged in and should be booted.

in case a) one could move a uEnv.txt file in /boot on the eMMC that boots from USB instead of the eMMC storage.
In this case I fail telling uboot to launch the linux on the USB stick. I once succeeded from the uboot console but in the uEnv.txt I fail. Is it even possible in /boot/uEnv.txt or do I have to modify uboot elsewhere?

In case b) one could simply tell grub to reboot to menu entry number 2 instead of 1.
Sadly, I fail installing grub after uboot (although I know that openSUSE for the beagle bone black uses grub). I can create a grub.cfg and build a grub image but do not understand how to tell uboot to load grub next. How can I do this?

Thanks for any hint where to go on / how to start / what to read.

best regards

I figured out that uEnv.txt is not the ideal place for my purpose.

For the beagle bone black, it is better to adjust the uboot environment variables.

In order to store the environment, I built and installed uboot from here (which is easier than you might think, thanks to @RobertCNelson ):

in the branch , you will find install and build scripts. adjust what you need in configs/am335x_evm_defconfig and make sure, that the install script uses the correct device and partition.

Then you can use “setenv” and “saveenv” in the u-boot console persistently.

this is how i altered the variable boot_targets which is something like the boot order.
So I will boot from USB, first and this is where I put my update linux. If there is no USB, eMMC will be booted - and so on.

1 Like