Configuring the Bootloader

The Device Tree

  • 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):

    Target (U-Boot)
    ls mmc 0:1
    
    Example Output
    => ls mmc 0:1
           44   bootenv.txt
        52270   imx7d-phyboard-zeta-1110110c.dtb
        52286   imx7d-phyboard-zeta-2111101e.dtb
        52262   imx7d-phyboard-zeta-2111111e.dtb
        52286   imx7d-phyboard-zeta-2211101e.dtb
        52262   imx7d-phyboard-zeta-2211111e.dtb
        52238   imx7d-phyboard-zeta-kit.dtb
         2126   imx7d-phyboard-zeta-m4.dtbo
          240   imx7d-phyboard-zeta-peb-av-02-rev0.dtbo
         4652   imx7d-phyboard-zeta-peb-av-02.dtbo
         3577   imx7d-phyboard-zeta-peb-av-06.dtbo
         3256   imx7d-phyboard-zeta-peb-d-rpi.dtbo
        42848   imx7s-phyboard-zeta-kit.dtb
        52238   oftree
      9715904   zImage
                System Volume Information/
    
     15 file(s), 1 dir(s)
    

Working with Overlays

The PHYTEC BSP also comes with some device tree overlays to help evaluate certain interfaces and accessory hardware. The table “Linux Device Tree Summary in the Release Notes shows an overview of all available overlays.

Enable an Overlay

  • U-boot has an extra environment variable called “overlays” to apply device tree overlay files. We can enable device tree overlays with it like so:

Target (U-boot)
setenv overlays imx7d-phyboard-zeta-peb-d-rpi.dtbo
saveenv
boot
  • Moreover, it’s possible to enable multiple overlays by separating them with a space.

Target (U-boot)
setenv overlays imx7d-phyboard-zeta-peb-d-rpi.dtbo imx7d-phyboard-zeta-m4.dtbo
saveenv
boot

The saveenv command stores the boot environment to non-volatile memory. If you would like temporarily adjust the boot environment, you can omit the saveenv command and the boot environment will go back to the previously saved settings on the next boot.

Reset the U-Boot Environment to Default Settings

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

Target (U-Boot)
env default -f -a
saveenv
boot