diff options
-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.bb | 9 | ||||
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-mkimage_git.inc | 4 |
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 | ||
3 | require imx-mkimage_git.inc | 3 | require imx-mkimage_git.inc |
4 | 4 | ||
@@ -7,17 +7,18 @@ LICENSE = "GPLv2" | |||
7 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | 7 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" |
8 | SECTION = "BSP" | 8 | SECTION = "BSP" |
9 | 9 | ||
10 | inherit use-imx-security-controller-firmware | ||
11 | |||
10 | IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" | 12 | IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" |
11 | IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m" | 13 | IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m" |
12 | IMX_EXTRA_FIRMWARE_mx8x = "imx-sc-firmware imx-seco" | 14 | IMX_EXTRA_FIRMWARE_mx8x = "imx-sc-firmware imx-seco" |
13 | DEPENDS += " \ | 15 | DEPENDS += " \ |
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 | " |
20 | DEPENDS_append_mx8m = " dtc-native" | 21 | DEPENDS_append_mx8m = " u-boot-mkimage-native dtc-native" |
21 | BOOT_NAME = "imx-boot" | 22 | BOOT_NAME = "imx-boot" |
22 | PROVIDES = "${BOOT_NAME}" | 23 | PROVIDES = "${BOOT_NAME}" |
23 | 24 | ||
@@ -39,10 +40,14 @@ SC_FIRMWARE_NAME ?= "scfw_tcm.bin" | |||
39 | 40 | ||
40 | ATF_MACHINE_NAME ?= "bl31-imx8qm.bin" | 41 | ATF_MACHINE_NAME ?= "bl31-imx8qm.bin" |
41 | ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin" | 42 | ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin" |
42 | ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin" | 43 | ATF_MACHINE_NAME_mx8x = "bl31-imx8qx.bin" |
43 | ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin" | 44 | ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin" |
44 | ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin" | 45 | ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin" |
45 | ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin" | 46 | ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin" |
47 | ATF_MACHINE_NAME_mx8mp = "bl31-imx8mp.bin" | ||
48 | ATF_MACHINE_NAME_mx8phantomdxl = "bl31-imx8qx.bin" | ||
49 | ATF_MACHINE_NAME_mx8dxl = "bl31-imx8dxl.bin" | ||
50 | ATF_MACHINE_NAME_mx8dx = "bl31-imx8dx.bin" | ||
46 | ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" | 51 | ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" |
47 | 52 | ||
48 | UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" | 53 | UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" |
@@ -52,29 +57,36 @@ TOOLS_NAME ?= "mkimage_imx8" | |||
52 | 57 | ||
53 | SOC_TARGET ?= "INVALID" | 58 | SOC_TARGET ?= "INVALID" |
54 | SOC_TARGET_mx8qm = "iMX8QM" | 59 | SOC_TARGET_mx8qm = "iMX8QM" |
55 | SOC_TARGET_mx8qxp = "iMX8QX" | 60 | SOC_TARGET_mx8x = "iMX8QX" |
56 | SOC_TARGET_mx8mq = "iMX8M" | 61 | SOC_TARGET_mx8mq = "iMX8M" |
57 | SOC_TARGET_mx8mm = "iMX8MM" | 62 | SOC_TARGET_mx8mm = "iMX8MM" |
58 | SOC_TARGET_mx8mn = "iMX8MN" | 63 | SOC_TARGET_mx8mn = "iMX8MN" |
64 | SOC_TARGET_mx8mp = "iMX8MP" | ||
65 | SOC_TARGET_mx8dxl = "iMX8DXL" | ||
66 | SOC_TARGET_mx8phantomdxl = "iMX8QX" | ||
67 | SOC_TARGET_mx8dx = "iMX8DX" | ||
59 | 68 | ||
60 | DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" | 69 | DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" |
61 | 70 | ||
62 | IMXBOOT_TARGETS ?= \ | 71 | IMXBOOT_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 | ||
67 | BOOT_STAGING = "${S}/${SOC_TARGET}" | 76 | BOOT_STAGING = "${S}/${SOC_TARGET}" |
68 | BOOT_STAGING_mx8mm = "${S}/iMX8M" | 77 | BOOT_STAGING_mx8m = "${S}/iMX8M" |
69 | BOOT_STAGING_mx8mn = "${S}/iMX8M" | 78 | BOOT_STAGING_mx8dx = "${S}/iMX8QX" |
70 | 79 | ||
71 | SOC_FAMILY = "INVALID" | 80 | SOC_FAMILY = "INVALID" |
72 | SOC_FAMILY_mx8 = "mx8" | 81 | SOC_FAMILY_mx8 = "mx8" |
73 | SOC_FAMILY_mx8m = "mx8m" | 82 | SOC_FAMILY_mx8m = "mx8m" |
74 | SOC_FAMILY_mx8x = "mx8x" | 83 | SOC_FAMILY_mx8x = "mx8x" |
75 | 84 | ||
85 | REV_OPTION ?= "" | ||
86 | REV_OPTION_mx8qxpc0 = "REV=C0" | ||
87 | |||
76 | compile_mx8m() { | 88 | compile_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 | |||
100 | compile_mx8x() { | 117 | compile_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 | } |
107 | do_compile() { | 128 | do_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 | } |
143 | deploy_mx8() { | 170 | deploy_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 | } |
148 | deploy_mx8x() { | 179 | deploy_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 | } |
153 | do_deploy() { | 188 | do_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 | ||
4 | require imx-mkimage_git.inc | 4 | require imx-mkimage_git.inc |
5 | 5 | ||
@@ -12,13 +12,16 @@ inherit native deploy | |||
12 | 12 | ||
13 | CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}" | 13 | CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}" |
14 | 14 | ||
15 | REV_CHIP ?= "B0" | ||
16 | REV_CHIP_mx8qxpc0 = "C0" | ||
17 | |||
15 | do_compile () { | 18 | do_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 | ||
24 | do_install () { | 27 | do_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 | ||
3 | DEPENDS = "zlib-native openssl-native" | 3 | DEPENDS = "zlib-native openssl-native" |
4 | 4 | ||
5 | SRCBRANCH = "lf-5.4.y" | 5 | SRCBRANCH = "imx_5.4.24_2.1.0" |
6 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}" | 6 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}" |
7 | SRCREV = "1c2277b95ce59f5d0265f26fec522e2ac2581e59" | 7 | SRCREV = "6745ccdcf15384891639b7ced3aa6ce938682365" |
8 | S = "${WORKDIR}/git" | 8 | S = "${WORKDIR}/git" |
9 | 9 | ||
10 | BOOT_TOOLS = "imx-boot-tools" | 10 | BOOT_TOOLS = "imx-boot-tools" |