aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2020-12-18 10:57:01 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2021-03-17 10:53:42 -0300
commitbadc0f6a1b278c1d7012556efa78aefcdd80ed68 (patch)
tree3c2e3014de21947d62ce6d7f9e62df3c55031806
parentc56750306053510d5e745657fba625497082f0fc (diff)
downloadmeta-freescale-badc0f6a1b278c1d7012556efa78aefcdd80ed68.tar.gz
meta-freescale-badc0f6a1b278c1d7012556efa78aefcdd80ed68.tar.bz2
meta-freescale-badc0f6a1b278c1d7012556efa78aefcdd80ed68.zip
imx-base.inc: add boot container condition and wks dependency
Boot container provided by mainline U-Boot build can be used directly int the result image file, and does not depends on the imx-boot component provided by NXP. Define variable to be used for conditional inheritance on the imx-boot-container class when 'imx-boot-container' is present in machine overrides. Modify WKS dependency to imx-boot for mainline BSP built for aarch64 to use imx-boot when derivative does not set the boot container compatibility in its overrides. Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
-rw-r--r--conf/machine/include/imx-base.inc32
1 files changed, 31 insertions, 1 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index c0ee3fbc..6c9f3aa6 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -57,6 +57,12 @@ UBOOT_ENTRYPOINT_mx7ulp = "0x60008000"
UBOOT_ENTRYPOINT_mx8m = "0x40480000"
UBOOT_ENTRYPOINT_vf = "0x80008000"
+# Some derivates can utilize the boot container provided by U-Boot,
+# below variable sets that those machines which have a imx-boot-container
+# in their MACHINEOVERRIDES can inherit a imx-boot-container class
+UBOOT_PROVIDES_BOOT_CONTAINER = "0"
+UBOOT_PROVIDES_BOOT_CONTAINER_imx-boot-container = "1"
+
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER_DRIVER = "xf86-video-fbdev"
XSERVER_DRIVER_imxgpu2d = "xf86-video-imx-vivante"
@@ -390,7 +396,20 @@ WKS_FILE_DEPENDS_append_mx8 = " imx-boot"
WKS_FILE_DEPENDS_append_mx8m = " imx-boot"
# We need to restrict the append so we don't add this for other i.MX SoC's.
-WKS_FILE_DEPENDS_append_use-mainline-bsp_aarch64 = " imx-boot"
+# Derivatives that are not yet adopted the usage of boot container provided
+# by U-Boot build are still targeted to use 'imx-boot' package provided by
+# NXP. Moving those derivatives to mainline BSP would require to define an
+# 'imx-boot-container' override, and test if the U-Boot built 'flash.bin'
+# binary is used a replacement.
+# Note, that the results binary name of the boot container is set to 'imx-boot'
+# for both NXP and Mainline BSP.
+# For Mainline BSP: the 'flash.bin' boot container is renamed during the
+# deployment task extesion execution defined in imx-boot-container class.
+# For NXP BSP: rename is done in 'imx-boot' recipe at the execution of compile
+# task.
+WKS_FILE_DEPENDS_append_use-mainline-bsp_aarch64 = " \
+ ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '0', 'imx-boot', '')} \
+"
SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks.in"
SOC_DEFAULT_WKS_FILE_mx8m ?= "imx-imx-boot-bootpart.wks.in"
@@ -398,6 +417,17 @@ SOC_DEFAULT_WKS_FILE_mx8m ?= "imx-imx-boot-bootpart.wks.in"
SOC_DEFAULT_WKS_FILE_mx8 ?= "imx-imx-boot-bootpart.wks.in"
SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in"
+# Boot container built as a part of mainline U-Boot uses the same WKS
+# file as the entire mx8m series, as it renames flash.bin binary to
+# imx-boot before it is packed into the boot partition.
+# This operation is performed in imx-boot-container class as a part of
+# delopyment task.
+# flash.bin binary is produced by U-Boot build itself, and is serves as a
+# direct replacement of imx-boot from NXP.
+# Creation of the flash.bin is controlled by UBOOT_PROVIDES_BOOT_CONTAINER
+# variable defined above
+SOC_DEFAULT_WKS_FILE_imx-boot-container ?= "imx-imx-boot-bootpart.wks.in"
+
WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}"
SERIAL_CONSOLES = "115200;ttymxc0"