PREFERRED_PROVIDER_u-boot = "u-boot-fslc"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-fslc"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6sxsabreauto_config,sdcard"
-UBOOT_CONFIG[qspi1] = "mx6sxsabreauto_qspi1_config"
-UBOOT_CONFIG[nand] = "mx6sxsabreauto_nand_config,ubifs"
-UBOOT_CONFIG[mfgtool] = "mx6sxsabreauto_config"
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6sxsabreauto_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6sxsabreauto_optee_config,sdcard"
+UBOOT_CONFIG[qspi1] = "mx6sxsabreauto_qspi1_config"
+UBOOT_CONFIG[nand] = "mx6sxsabreauto_nand_config,ubifs"
+UBOOT_CONFIG[mfgtool] = "mx6sxsabreauto_config"
+
+OPTEE_BIN_EXT = "6sxauto"
SERIAL_CONSOLES = "115200;ttymxc3"