summaryrefslogtreecommitdiffstats
path: root/classes/use-imx-security-controller-firmware.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/use-imx-security-controller-firmware.bbclass')
-rw-r--r--classes/use-imx-security-controller-firmware.bbclass36
1 files changed, 36 insertions, 0 deletions
diff --git a/classes/use-imx-security-controller-firmware.bbclass b/classes/use-imx-security-controller-firmware.bbclass
new file mode 100644
index 00000000..7b82bcaf
--- /dev/null
+++ b/classes/use-imx-security-controller-firmware.bbclass
@@ -0,0 +1,36 @@
1#
2# Class to provide a possibility to re-use names of Security Controller (SECO)
3# Firmware files, which are required by certain derivatives on i.MX8 family.
4#
5# SECO Firmware names are used by imx-boot and imx-seco recipes, therefore
6# their respective definitions are moved into a separate class, which is
7# inherited by both recipes.
8#
9# Currently, only 'mx8m' family does not require SECO FW to be provided in the
10# target image, therefore as a first step - the machine override is verified
11# if it matches, and then derivative is taken.
12#
13# NOTE: SECO_FIRMWARE_NAME defaults to empty string, and is verified against
14# the family first. If a derivative in the family does not have a firmware name
15# set in this class - recipe parsing is stopped.
16# This behavior ensures that derivatives which requires SECO Firmware to be
17# present in the image file have it properly defined.
18
19SECO_FIRMWARE_NAME ?= ""
20
21SECO_FIRMWARE_NAME_mx8qm = "mx8qmb0-ahab-container.img"
22SECO_FIRMWARE_NAME_mx8qxp = "mx8qxb0-ahab-container.img"
23SECO_FIRMWARE_NAME_mx8qxpc0 = "mx8qxc0-ahab-container.img"
24SECO_FIRMWARE_NAME_mx8phantomdxl = "mx8qxb0-ahab-container.img"
25SECO_FIRMWARE_NAME_mx8dxl = "mx8dxla0-ahab-container.img"
26
27python () {
28 if "mx8m" in d.getVar('MACHINEOVERRIDES').split(":"):
29 return # We need to allow the recipes to be parsed for this case
30
31 seco_firmware = d.getVar('SECO_FIRMWARE_NAME')
32 if not seco_firmware:
33 raise bb.parse.SkipRecipe("This SoC requires 'SECO_FIRMWARE_NAME', define it in 'use-imx-security-controller-firmware' bbclass")
34}
35
36PACKAGE_ARCH = "${MACHINE_SOCARCH}"