Compare 0 Products     empty


Most of our machines are interchangeable with each other and have many different configurations with our carrier boards and displays. To suit this everchanging environment they come equipped with different device trees to adapt them to the specific configuration needed.

In this specific case, we will use our SmarCore 8MPlus on our carrier Multimedia 4K.

Note: The OS used in this example is derived from the Yocto Version Honister.

Change Device Tree

Start up the machine e stop the countdown by pressing any key as in the following example:

U-Boot SPL 2021.04+fslc+g8be9f0ca23 (Mar 01 2023 - 13:01:59 +0000)
DDRINFO: start DRAM init
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0:  RNG instantiated
Normal Boot
WDT:   Not found!
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0
NOTICE:  BL31: v2.4(release):lf-5.15.5-1.0.0-0-g05f788b9b
NOTICE:  BL31: Built : 05:49:10, Mar  2 2022

U-Boot 2021.04+fslc+g8be9f0ca23 (Mar 01 2023 - 13:01:59 +0000)

CPU:   i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 31C
Reset cause: POR
Model: Engicam i.MX8MPlus Smarcore
DRAM:  2 GiB
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Fail to setup video link
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated

  - ATF 05f788b

switch to partitions #0, OK
mmc1 is the current device
flash target is MMC:1
Warning: ethernet@30bf0000 (eth1) using random MAC address - b2:62:8c:04:89:33
eth1: ethernet@30bf0000 [PRIME]
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 

Once you reach this point you can access the U-Boot terminal.

Note: to see all the different available commands you can use the command help.

To print the U-Boot variable use the command printenv:

u-boot=> printenv fdtfile 

Now the next step would be to list all available device trees in the boot partition of the device you are booting from (in this case we are using an SDCard so mmc 1):

u-boot=> fatls mmc 1
 30792192   Image
    57554   imx8mp-smarcore-multimedia-4k-hdmi.dtb
    58647   imx8mp-smarcore-multimedia-4k-lvds.dtb
    59156   imx8mp-smarcore-multimedia-4k-ov5640.dtb
    57712   imx8mp-smarcore-multimedia-4k-pcie.dtb
    57242   imx8mp-smarcore-multimedia-4k.dtb

6 file(s), 0 dir(s)

Note: if you are booting directly from eMMC the device would be mmc 2.

All of these device trees work with the same board but each one of them enables a different peripheral. Now we will load the device tree relative to the LVDS and save the variable to keep the change permanent:

u-boot=> setenv fdtfile imx8mp-smarcore-multimedia-4k-lvds.dtb
u-boot=> printenv fdtfile 
u-boot=> saveenv 
Saving Environment to MMC... Writing to MMC(1)... OK
u-boot=> boot

Once the Rootfs is fully loaded you should see the LVDS is working! Lastly, to check if the device tree loaded is the correct one you can use:

root@imx8mp-smarcore:~# dmesg | grep model
[    0.000000] Machine model: Engicam SmarCore i.MX8MPlus Multimedia 4K board with LVDS (AMPIRE 10')