]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-mkimage: allow to be used with mainline bsp for mx8m
authorAndrey Zhizhikin <andrey.z@gmail.com>
Fri, 11 Dec 2020 17:34:00 +0000 (17:34 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 11 Dec 2020 22:37:54 +0000 (19:37 -0300)
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>
conf/machine/imx8mmevk.conf
conf/machine/imx8mnevk.conf
conf/machine/imx8mpevk.conf
recipes-bsp/imx-mkimage/imx-boot_1.0.bb

index fcd78fb5afed75731796eadd7ac14183c34ea037..44e3781d9ee7ba31e0f4571e750d823b5cdddfb3 100644 (file)
@@ -61,6 +61,7 @@ ATF_PLATFORM = "imx8mm"
 
 # Set imx-mkimage boot target
 IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}"
+IMX_BOOT_SOC_TARGET = "iMX8MM"
 
 # Set Serial console
 SERIAL_CONSOLES = "115200;ttymxc1"
index fa0cb7b425c9847f646f240ac575c66d64f673c9..5d8f3001e4eb1aef25771e31ec52a06676d41cb5 100644 (file)
@@ -49,6 +49,7 @@ ATF_PLATFORM = "imx8mn"
 
 # Set imx-mkimage boot target
 IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_ddr4_evk_flexspi', 'flash_ddr4_evk', d)}"
+IMX_BOOT_SOC_TARGET = "iMX8MN"
 
 # Set Serial console
 SERIAL_CONSOLES = "115200;ttymxc1"
index 9addae7d5b79461b5a9c6c72c1e7470071d19563..1fbf0eef2113577c050d60dd0e0f319a348bef75 100644 (file)
@@ -56,6 +56,7 @@ ATF_PLATFORM = "imx8mp"
 
 # Set imx-mkimage boot target
 IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}"
+IMX_BOOT_SOC_TARGET = "iMX8MP"
 
 # Set Serial console
 SERIAL_CONSOLES = "115200;ttymxc1"
index a54b439d9e7afe18ddc00f7e3a69fb6c78479876..e73d307440fd5b934ba8a8cf1a3c420a3b898c04 100644 (file)
@@ -38,13 +38,10 @@ do_compile[depends] += " \
 
 SC_FIRMWARE_NAME ?= "scfw_tcm.bin"
 
-ATF_MACHINE_NAME ?= "bl31-imx8qm.bin"
+ATF_MACHINE_NAME ?= "bl31-${ATF_PLATFORM}.bin"
 ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin"
 ATF_MACHINE_NAME_mx8x  = "bl31-imx8qx.bin"
 ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin"
-ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin"
-ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin"
-ATF_MACHINE_NAME_mx8mp = "bl31-imx8mp.bin"
 ATF_MACHINE_NAME_mx8phantomdxl = "bl31-imx8qx.bin"
 ATF_MACHINE_NAME_mx8dxl = "bl31-imx8dxl.bin"
 ATF_MACHINE_NAME_mx8dx = "bl31-imx8dx.bin"
@@ -55,16 +52,13 @@ BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin"
 
 TOOLS_NAME ?= "mkimage_imx8"
 
-SOC_TARGET       ?= "INVALID"
-SOC_TARGET_mx8qm  = "iMX8QM"
-SOC_TARGET_mx8x   = "iMX8QX"
-SOC_TARGET_mx8mq  = "iMX8M"
-SOC_TARGET_mx8mm  = "iMX8MM"
-SOC_TARGET_mx8mn  = "iMX8MN"
-SOC_TARGET_mx8mp  = "iMX8MP"
-SOC_TARGET_mx8dxl = "iMX8DXL"
-SOC_TARGET_mx8phantomdxl = "iMX8QX"
-SOC_TARGET_mx8dx  = "iMX8DX"
+IMX_BOOT_SOC_TARGET       ?= "INVALID"
+IMX_BOOT_SOC_TARGET_mx8qm  = "iMX8QM"
+IMX_BOOT_SOC_TARGET_mx8x   = "iMX8QX"
+IMX_BOOT_SOC_TARGET_mx8mq  = "iMX8M"
+IMX_BOOT_SOC_TARGET_mx8dxl = "iMX8DXL"
+IMX_BOOT_SOC_TARGET_mx8phantomdxl = "iMX8QX"
+IMX_BOOT_SOC_TARGET_mx8dx  = "iMX8DX"
 
 DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
 
@@ -73,7 +67,7 @@ IMXBOOT_TARGETS ?= \
         bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
                                                   'flash_multi_cores flash_dcd', d), d)}"
 
-BOOT_STAGING       = "${S}/${SOC_TARGET}"
+BOOT_STAGING       = "${S}/${IMX_BOOT_SOC_TARGET}"
 BOOT_STAGING_mx8m  = "${S}/iMX8M"
 BOOT_STAGING_mx8dx = "${S}/iMX8QX"
 
@@ -135,11 +129,11 @@ do_compile() {
         compile_${SOC_FAMILY}
         if [ "$target" = "flash_linux_m4_no_v2x" ]; then
            # Special target build for i.MX 8DXL with V2X off
-           bbnote "building ${SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
-           make SOC=${SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
+           bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
+           make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
         else
-           bbnote "building ${SOC_TARGET} - ${REV_OPTION} ${target}"
-           make SOC=${SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target}
+           bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
+           make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target}
         fi
         if [ -e "${BOOT_STAGING}/flash.bin" ]; then
             cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target}
@@ -215,4 +209,4 @@ addtask deploy before do_build after do_compile
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 FILES_${PN} = "/boot"
 
-COMPATIBLE_MACHINE = "(mx8)"
+COMPATIBLE_MACHINE = "(mx8|use-mainline-bsp)"