Configuring the Bootloader

Change the Device Tree

By default, U-Boot loads a device tree binary (dtb) file named oftree during boot. The oftree file is a copy of k3-am62p5-phyflex-libra-rdk.dts. This portion of the guide will instruct how to change U-boot to load different device trees.

  • Power on the board and press any key to stop autoboot when prompted by the Bootloader.

  • Use the following command to list the available file’s within the boot media’s Boot partition (this is typically where binaries used for boot are stored):

uboot:~# ls mmc 1:1
 22311424   Image
     2466   boot.scr.uimg
    67368   k3-am62p5-phyflex-libra-rdk.dtb
    67368   oftree
       37   overlays.txt
  3784287   ti-boot-container.img
   294230   tiboot3.bin
  1480343   tispl.bin
  1162847   u-boot.img

9 file(s), 0 dir(s)
  • We can check which file is the active device tree like so:

    uboot:~# printenv fdtfile
    
  • Change the default device tree.

    uboot:~# setenv fdtfile <dtb name>
    uboot:~# saveenv
    uboot:~# boot
    

U-boot will now load the dtb file named <dtb name> automatically during subsequent boots (just replace it with the appropriate file name when you run the command).

Reset the U-Boot Environment to Default Settings

  • In order to revert the U-Boot environment back to its original settings, run the following:

uboot:~# env default -f -a
uboot:~# saveenv
uboot:~# boot

Note

When booting from the SD card, if you have saved changes to the environment using saveenv, the changes may persist across flashes of the SD card. It is a good idea to default your environment after flashing.