# This file contains the part of the configuration that is common to all
# board based on the Gemini platform and that are the Cortex-A53 core.

# k3.inc from meta-ti set a default WKS_FILE and add wic to IMAGE_FSTYPE.
# But we don't need a wic image
WKS_FILE ?= ""

require conf/machine/include/k3.inc
require netmodule-am64xx-common.inc

# Workarround to remove wic related settings added to IMAGE_FSTYPE in k3.inc
# without too much risk of breaking a distro or local config (as remove)
# are final
IMAGE_FSTYPES:remove = "${@'wic.xz wic.bmap' if not d.getVar('WKS_FILE') else ''}"

# meta-ti-bsp use the machine override in a lot of recipes, so by adding the
# name of the machine in meta-ti-bsp to SOC_FAMILY, we ensure that we the
# device override apply.
#
# We don't modify MACHINEOVERRIDES directly as this will not place the string
# in the same place
SOC_FAMILY:append = ":am64xx"

# Install u-boot script
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree"

PREFERRED_PROVIDER_virtual/kernel = "linux-ti-coreos"

KERNEL_DEFCONFIG ?= "gemini_defconfig"
KERNEL_IMAGETYPE = "Image"

UBOOT_ENTRYPOINT = "0x82000000"
UBOOT_LOADADDRESS = "0x82000000"
UBOOT_DTB_LOADADDRESS = "0x88000000"
UBOOT_RD_LOADADDRESS = "0x88080000"
UBOOT_RD_ENTRYPOINT = "0x88080000"


TFA_BOARD = "lite"
OPTEEMACHINE = "k3"



# No watchdog available yet
EFIBOOTGUARD_TIMEOUT ?= "0"

COREOS_IMAGE_SWUPDATE_EXTRACLASSES += "coreos-image-swupdate-am64xx"

require conf/machine/include/coreos-generic-features/efi.inc
