meta-freescale/classes/use-imx-security-controller-firmware.bbclass
Tom Hochstein d93b387a87 mx8dx: Normalize MACHINEOVERRIDES implementation
The imx8dx-mek machine is similar to imx8qxp-mek and so the mx8qxp override
was included in the MACHINEOVERRIDES hierarchy. This is non-standard, and
the rework of the SOC overrides didn't handle it properly, leading to a
build break:

```
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: 8QX boot binary build
| cp: failed to access '/home/aquino/src/ossystems/oel-platform/build/tmp/work/imx8dx_mek-oel-linux/imx-boot/1.0-r0/git/iMX8DX/scfw_tcm.bin': Not a directory
| WARNING: /home/aquino/src/ossystems/oel-platform/build/tmp/work/imx8dx_mek-oel-linux/imx-boot/1.0-r0/temp/run.do_compile.1809636:179 exit 1 from 'cp /home/aquino/src/ossystems/oel-platform/build/tmp/deploy/images/imx8dx-mek/imx-boot$
tools/scfw_tcm.bin /home/aquino/src/ossystems/oel-platform/build/tmp/work/imx8dx_mek-oel-linux/imx-boot/1.0-r0/git/iMX8DX/scfw_tcm.bin'
| WARNING: Backtrace (BB generated script):
|       #1: compile_mx8x, /home/aquino/src/ossystems/oel-platform/build/tmp/work/imx8dx_mek-oel-linux/imx-boot/1.0-r0/temp/run.do_compile.1809636, line 179
|       #2: do_compile, /home/aquino/src/ossystems/oel-platform/build/tmp/work/imx8dx_mek-oel-linux/imx-boot/1.0-r0/temp/run.do_compile.1809636, line 151
|       #3: main, /home/aquino/src/ossystems/oel-platform/build/tmp/work/imx8dx_mek-oel-linux/imx-boot/1.0-r0/temp/run.do_compile.1809636, line 189
ERROR: Task (/home/aquino/src/ossystems/oel-platform/sources/meta-freescale/recipes-bsp/imx-mkimage/imx-boot_1.0.bb:do_compile) failed with exit code '1'
```

Fix the problem by removing mx8qxp from the mx8dx hierarchy and adapting
existing mx8qxp overrides appropriately.

Fixes: #1027
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
2022-03-31 19:37:58 -05:00

37 lines
1.7 KiB
Plaintext

#
# Class to provide a possibility to re-use names of Security Controller (SECO)
# Firmware files, which are required by certain derivatives on i.MX8 family.
#
# SECO Firmware names are used by imx-boot and imx-seco recipes, therefore
# their respective definitions are moved into a separate class, which is
# inherited by both recipes.
#
# Currently, only 'mx8m' family does not require SECO FW to be provided in the
# target image, therefore as a first step - the machine override is verified
# if it matches, and then derivative is taken.
#
# NOTE: SECO_FIRMWARE_NAME defaults to empty string, and is verified against
# the family first. If a derivative in the family does not have a firmware name
# set in this class - recipe parsing is stopped.
# This behavior ensures that derivatives which requires SECO Firmware to be
# present in the image file have it properly defined.
SECO_FIRMWARE_NAME ?= ""
SECO_FIRMWARE_NAME:mx8qm-nxp-bsp = "mx8qmb0-ahab-container.img"
SECO_FIRMWARE_NAME:mx8qxp-nxp-bsp = \
"${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', 'mx8qxb0-ahab-container.img', \
'mx8qxc0-ahab-container.img', d)}"
SECO_FIRMWARE_NAME:mx8dx-nxp-bsp = "mx8qxc0-ahab-container.img"
SECO_FIRMWARE_NAME:mx8dxl-nxp-bsp = "mx8dxla1-ahab-container.img"
python () {
if "mx8m-nxp-bsp" in d.getVar('MACHINEOVERRIDES').split(":"):
return # We need to allow the recipes to be parsed for this case
seco_firmware = d.getVar('SECO_FIRMWARE_NAME')
if not seco_firmware:
raise bb.parse.SkipRecipe("This SoC requires 'SECO_FIRMWARE_NAME', define it in 'use-imx-security-controller-firmware' bbclass")
}
PACKAGE_ARCH = "${MACHINE_SOCARCH}"