summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2020-12-11 17:34:00 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2020-12-11 19:37:54 -0300
commit6fc0971cb236284cd2ac325da677a87ca31723d8 (patch)
tree5a2866974174347da00a722c6d56bc93312dec30 /recipes-bsp
parent64fe53c2f23bd802a3090f5c6c8b3b45326b40d6 (diff)
downloadmeta-freescale-6fc0971cb236284cd2ac325da677a87ca31723d8.tar.gz
imx-mkimage: allow to be used with mainline bsp for mx8m
imx-boot provides a boot container, which is required for mx8m family of SOCs to execute a boot sequence. Allow the imx-boot to generate boot container for Mini, Nano and Plus SOCs by adding use-mainline-bsp to the list of compatible machines. In order to accommodate new boot container generation model, former SOC_TARGET variable has been renamed to IMX_BOOT_SOC_TARGET and should be explicitly defined in the target machine recipes. This is done to indicate that even if the mx8mm machine is finter out from MACHINEOVERRIDES by extender filter - this recipe picks up a proper target definition for boot container construction. Default ATF binary image is also now based on ATF_PLATFORM, which is explicitly defined in the machine configuration file. Current support includes only Mini, Nano and Plus SOCs from i.MX8M family, and additions of further machines would require the definition of ATF_PLATFORM and IMX_BOOT_SOC_TARGET to be moved out from imx-boot recipe to a machine configuration file. Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_1.0.bb34
1 files changed, 14 insertions, 20 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index a54b439d..e73d3074 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -38,13 +38,10 @@ do_compile[depends] += " \
38 38
39SC_FIRMWARE_NAME ?= "scfw_tcm.bin" 39SC_FIRMWARE_NAME ?= "scfw_tcm.bin"
40 40
41ATF_MACHINE_NAME ?= "bl31-imx8qm.bin" 41ATF_MACHINE_NAME ?= "bl31-${ATF_PLATFORM}.bin"
42ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin" 42ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin"
43ATF_MACHINE_NAME_mx8x = "bl31-imx8qx.bin" 43ATF_MACHINE_NAME_mx8x = "bl31-imx8qx.bin"
44ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin" 44ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin"
45ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin"
46ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin"
47ATF_MACHINE_NAME_mx8mp = "bl31-imx8mp.bin"
48ATF_MACHINE_NAME_mx8phantomdxl = "bl31-imx8qx.bin" 45ATF_MACHINE_NAME_mx8phantomdxl = "bl31-imx8qx.bin"
49ATF_MACHINE_NAME_mx8dxl = "bl31-imx8dxl.bin" 46ATF_MACHINE_NAME_mx8dxl = "bl31-imx8dxl.bin"
50ATF_MACHINE_NAME_mx8dx = "bl31-imx8dx.bin" 47ATF_MACHINE_NAME_mx8dx = "bl31-imx8dx.bin"
@@ -55,16 +52,13 @@ BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin"
55 52
56TOOLS_NAME ?= "mkimage_imx8" 53TOOLS_NAME ?= "mkimage_imx8"
57 54
58SOC_TARGET ?= "INVALID" 55IMX_BOOT_SOC_TARGET ?= "INVALID"
59SOC_TARGET_mx8qm = "iMX8QM" 56IMX_BOOT_SOC_TARGET_mx8qm = "iMX8QM"
60SOC_TARGET_mx8x = "iMX8QX" 57IMX_BOOT_SOC_TARGET_mx8x = "iMX8QX"
61SOC_TARGET_mx8mq = "iMX8M" 58IMX_BOOT_SOC_TARGET_mx8mq = "iMX8M"
62SOC_TARGET_mx8mm = "iMX8MM" 59IMX_BOOT_SOC_TARGET_mx8dxl = "iMX8DXL"
63SOC_TARGET_mx8mn = "iMX8MN" 60IMX_BOOT_SOC_TARGET_mx8phantomdxl = "iMX8QX"
64SOC_TARGET_mx8mp = "iMX8MP" 61IMX_BOOT_SOC_TARGET_mx8dx = "iMX8DX"
65SOC_TARGET_mx8dxl = "iMX8DXL"
66SOC_TARGET_mx8phantomdxl = "iMX8QX"
67SOC_TARGET_mx8dx = "iMX8DX"
68 62
69DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" 63DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
70 64
@@ -73,7 +67,7 @@ IMXBOOT_TARGETS ?= \
73 bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ 67 bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
74 'flash_multi_cores flash_dcd', d), d)}" 68 'flash_multi_cores flash_dcd', d), d)}"
75 69
76BOOT_STAGING = "${S}/${SOC_TARGET}" 70BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}"
77BOOT_STAGING_mx8m = "${S}/iMX8M" 71BOOT_STAGING_mx8m = "${S}/iMX8M"
78BOOT_STAGING_mx8dx = "${S}/iMX8QX" 72BOOT_STAGING_mx8dx = "${S}/iMX8QX"
79 73
@@ -135,11 +129,11 @@ do_compile() {
135 compile_${SOC_FAMILY} 129 compile_${SOC_FAMILY}
136 if [ "$target" = "flash_linux_m4_no_v2x" ]; then 130 if [ "$target" = "flash_linux_m4_no_v2x" ]; then
137 # Special target build for i.MX 8DXL with V2X off 131 # Special target build for i.MX 8DXL with V2X off
138 bbnote "building ${SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" 132 bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
139 make SOC=${SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4 133 make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
140 else 134 else
141 bbnote "building ${SOC_TARGET} - ${REV_OPTION} ${target}" 135 bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
142 make SOC=${SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target} 136 make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target}
143 fi 137 fi
144 if [ -e "${BOOT_STAGING}/flash.bin" ]; then 138 if [ -e "${BOOT_STAGING}/flash.bin" ]; then
145 cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target} 139 cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target}
@@ -215,4 +209,4 @@ addtask deploy before do_build after do_compile
215PACKAGE_ARCH = "${MACHINE_ARCH}" 209PACKAGE_ARCH = "${MACHINE_ARCH}"
216FILES_${PN} = "/boot" 210FILES_${PN} = "/boot"
217 211
218COMPATIBLE_MACHINE = "(mx8)" 212COMPATIBLE_MACHINE = "(mx8|use-mainline-bsp)"