summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_1.0.bb (renamed from recipes-bsp/imx-mkimage/imx-boot_0.2.bb)71
-rw-r--r--recipes-bsp/imx-mkimage/imx-mkimage_git.bb9
-rw-r--r--recipes-bsp/imx-mkimage/imx-mkimage_git.inc4
3 files changed, 61 insertions, 23 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index 0f13a08b..4b6ef699 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -1,4 +1,4 @@
1# Copyright 2017-2019 NXP 1# Copyright (C) 2017-2020 NXP
2 2
3require imx-mkimage_git.inc 3require imx-mkimage_git.inc
4 4
@@ -7,17 +7,18 @@ LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" 7LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
8SECTION = "BSP" 8SECTION = "BSP"
9 9
10inherit use-imx-security-controller-firmware
11
10IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" 12IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco"
11IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m" 13IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m"
12IMX_EXTRA_FIRMWARE_mx8x = "imx-sc-firmware imx-seco" 14IMX_EXTRA_FIRMWARE_mx8x = "imx-sc-firmware imx-seco"
13DEPENDS += " \ 15DEPENDS += " \
14 firmware-imx \ 16 u-boot \
15 ${IMX_EXTRA_FIRMWARE} \ 17 ${IMX_EXTRA_FIRMWARE} \
16 imx-atf \ 18 imx-atf \
17 ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \ 19 ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \
18 u-boot-mkimage-native \
19" 20"
20DEPENDS_append_mx8m = " dtc-native" 21DEPENDS_append_mx8m = " u-boot-mkimage-native dtc-native"
21BOOT_NAME = "imx-boot" 22BOOT_NAME = "imx-boot"
22PROVIDES = "${BOOT_NAME}" 23PROVIDES = "${BOOT_NAME}"
23 24
@@ -39,10 +40,14 @@ SC_FIRMWARE_NAME ?= "scfw_tcm.bin"
39 40
40ATF_MACHINE_NAME ?= "bl31-imx8qm.bin" 41ATF_MACHINE_NAME ?= "bl31-imx8qm.bin"
41ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin" 42ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin"
42ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin" 43ATF_MACHINE_NAME_mx8x = "bl31-imx8qx.bin"
43ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin" 44ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin"
44ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin" 45ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin"
45ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin" 46ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin"
47ATF_MACHINE_NAME_mx8mp = "bl31-imx8mp.bin"
48ATF_MACHINE_NAME_mx8phantomdxl = "bl31-imx8qx.bin"
49ATF_MACHINE_NAME_mx8dxl = "bl31-imx8dxl.bin"
50ATF_MACHINE_NAME_mx8dx = "bl31-imx8dx.bin"
46ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" 51ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}"
47 52
48UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 53UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
@@ -52,29 +57,36 @@ TOOLS_NAME ?= "mkimage_imx8"
52 57
53SOC_TARGET ?= "INVALID" 58SOC_TARGET ?= "INVALID"
54SOC_TARGET_mx8qm = "iMX8QM" 59SOC_TARGET_mx8qm = "iMX8QM"
55SOC_TARGET_mx8qxp = "iMX8QX" 60SOC_TARGET_mx8x = "iMX8QX"
56SOC_TARGET_mx8mq = "iMX8M" 61SOC_TARGET_mx8mq = "iMX8M"
57SOC_TARGET_mx8mm = "iMX8MM" 62SOC_TARGET_mx8mm = "iMX8MM"
58SOC_TARGET_mx8mn = "iMX8MN" 63SOC_TARGET_mx8mn = "iMX8MN"
64SOC_TARGET_mx8mp = "iMX8MP"
65SOC_TARGET_mx8dxl = "iMX8DXL"
66SOC_TARGET_mx8phantomdxl = "iMX8QX"
67SOC_TARGET_mx8dx = "iMX8DX"
59 68
60DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" 69DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
61 70
62IMXBOOT_TARGETS ?= \ 71IMXBOOT_TARGETS ?= \
63 "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ 72 "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
64 bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ 73 bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
65 'flash flash_dcd', d), d)}" 74 'flash_multi_cores flash_dcd', d), d)}"
66 75
67BOOT_STAGING = "${S}/${SOC_TARGET}" 76BOOT_STAGING = "${S}/${SOC_TARGET}"
68BOOT_STAGING_mx8mm = "${S}/iMX8M" 77BOOT_STAGING_mx8m = "${S}/iMX8M"
69BOOT_STAGING_mx8mn = "${S}/iMX8M" 78BOOT_STAGING_mx8dx = "${S}/iMX8QX"
70 79
71SOC_FAMILY = "INVALID" 80SOC_FAMILY = "INVALID"
72SOC_FAMILY_mx8 = "mx8" 81SOC_FAMILY_mx8 = "mx8"
73SOC_FAMILY_mx8m = "mx8m" 82SOC_FAMILY_mx8m = "mx8m"
74SOC_FAMILY_mx8x = "mx8x" 83SOC_FAMILY_mx8x = "mx8x"
75 84
85REV_OPTION ?= ""
86REV_OPTION_mx8qxpc0 = "REV=C0"
87
76compile_mx8m() { 88compile_mx8m() {
77 bbnote 8MQ/8MM/8MN boot binary build 89 bbnote 8MQ/8MM/8MN/8MP boot binary build
78 for ddr_firmware in ${DDR_FIRMWARE_NAME}; do 90 for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
79 bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} " 91 bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} "
80 cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING} 92 cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING}
@@ -95,26 +107,40 @@ compile_mx8() {
95 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin 107 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin
96 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin 108 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
97 cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin 109 cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
98 cp ${DEPLOY_DIR_IMAGE}/mx8qm-ahab-container.img ${BOOT_STAGING} 110 cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}
111 if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
112 cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
113 ${BOOT_STAGING}/u-boot-spl.bin
114 fi
99} 115}
116
100compile_mx8x() { 117compile_mx8x() {
101 bbnote 8QX boot binary build 118 bbnote 8QX boot binary build
102 cp ${DEPLOY_DIR_IMAGE}/mx8qx-ahab-container.img ${BOOT_STAGING} 119 cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}
103 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin 120 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin
104 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin 121 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
105 cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin 122 cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
123 if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
124 cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
125 ${BOOT_STAGING}/u-boot-spl.bin
126 fi
106} 127}
107do_compile() { 128do_compile() {
108 # mkimage_uboot requires libssl.so.1.1 from ${STAGING_LIBDIR_NATIVE}
109 export LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE}:$LD_LIBRARY_PATH
110 compile_${SOC_FAMILY} 129 compile_${SOC_FAMILY}
111 # mkimage for i.MX8 130 # mkimage for i.MX8
131 # Copy TEE binary to SoC target folder to mkimage
112 if ${DEPLOY_OPTEE}; then 132 if ${DEPLOY_OPTEE}; then
113 cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} 133 cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING}
114 fi 134 fi
115 for target in ${IMXBOOT_TARGETS}; do 135 for target in ${IMXBOOT_TARGETS}; do
116 bbnote "building ${SOC_TARGET} - ${target}" 136 if [ "$target" = "flash_linux_m4_no_v2x" ]; then
117 make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${target} 137 # Special target build for i.MX 8DXL with V2X off
138 bbnote "building ${SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
139 make SOC=${SOC_TARGET} ${REV_OPTION} V2X=NO flash_linux_m4
140 else
141 bbnote "building ${SOC_TARGET} - ${REV_OPTION} ${target}"
142 make SOC=${SOC_TARGET} ${REV_OPTION} ${target}
143 fi
118 if [ -e "${BOOT_STAGING}/flash.bin" ]; then 144 if [ -e "${BOOT_STAGING}/flash.bin" ]; then
119 cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target} 145 cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target}
120 fi 146 fi
@@ -139,16 +165,25 @@ deploy_mx8m() {
139 install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} 165 install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
140 install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 166 install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
141 install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} 167 install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
168 install -m 0755 ${BOOT_STAGING}/mkimage_uboot ${DEPLOYDIR}/${BOOT_TOOLS}
142} 169}
143deploy_mx8() { 170deploy_mx8() {
144 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 171 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
145 install -m 0644 ${BOOT_STAGING}/mx8qm-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS} 172 install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
146 install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 173 install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
174 if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
175 install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
176 ${DEPLOYDIR}/${BOOT_TOOLS}
177 fi
147} 178}
148deploy_mx8x() { 179deploy_mx8x() {
149 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 180 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
150 install -m 0644 ${BOOT_STAGING}/mx8qx-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS} 181 install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
151 install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 182 install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
183 if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
184 install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
185 ${DEPLOYDIR}/${BOOT_TOOLS}
186 fi
152} 187}
153do_deploy() { 188do_deploy() {
154 deploy_${SOC_FAMILY} 189 deploy_${SOC_FAMILY}
diff --git a/recipes-bsp/imx-mkimage/imx-mkimage_git.bb b/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
index 5304ebf9..ed15c6f8 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
@@ -1,5 +1,5 @@
1# Copyright (C) 2016 Freescale Semiconductor 1# Copyright (C) 2016 Freescale Semiconductor
2# Copyright 2017-2018 NXP 2# Copyright (C) 2017-2020 NXP
3 3
4require imx-mkimage_git.inc 4require imx-mkimage_git.inc
5 5
@@ -12,13 +12,16 @@ inherit native deploy
12 12
13CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}" 13CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}"
14 14
15REV_CHIP ?= "B0"
16REV_CHIP_mx8qxpc0 = "C0"
17
15do_compile () { 18do_compile () {
16 cd ${S} 19 cd ${S}
17 oe_runmake clean 20 oe_runmake clean
18 oe_runmake bin 21 oe_runmake bin
19 oe_runmake -C iMX8M -f soc.mak mkimage_imx8 22 oe_runmake -C iMX8M -f soc.mak mkimage_imx8
20 oe_runmake -C iMX8QM -f soc.mak imx8qm_dcd.cfg.tmp 23 oe_runmake -C iMX8QM REV=${REV_CHIP} -f soc.mak imx8qm_dcd.cfg.tmp
21 oe_runmake -C iMX8QX -f soc.mak imx8qx_dcd.cfg.tmp 24 oe_runmake -C iMX8QX REV=${REV_CHIP} -f soc.mak imx8qx_dcd.cfg.tmp
22} 25}
23 26
24do_install () { 27do_install () {
diff --git a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
index 6e417722..db0f6bf4 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
@@ -2,9 +2,9 @@
2 2
3DEPENDS = "zlib-native openssl-native" 3DEPENDS = "zlib-native openssl-native"
4 4
5SRCBRANCH = "lf-5.4.y" 5SRCBRANCH = "imx_5.4.24_2.1.0"
6SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}" 6SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
7SRCREV = "1c2277b95ce59f5d0265f26fec522e2ac2581e59" 7SRCREV = "6745ccdcf15384891639b7ced3aa6ce938682365"
8S = "${WORKDIR}/git" 8S = "${WORKDIR}/git"
9 9
10BOOT_TOOLS = "imx-boot-tools" 10BOOT_TOOLS = "imx-boot-tools"