ccimx93: support building bootloader for soc revision A0
Starting with NXP release "lf-6.1.55-2.2.0" the IMX optee fork (based on version 4.0.0) does not support SOC revision A0. This commit recovers support to build a bootloader for A0, extending the optee patch for ccimx93 to support A0 with a build time option, and then extending the optee-os and imx-boot recipes to build two optee binaries and using them to generate bootloaders for both SOC revisions. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
e4d089a6ab
commit
161c66f5f6
|
|
@ -38,6 +38,8 @@ compile_mx93:append:ccimx93() {
|
||||||
ATF_MACHINE_NAME_A0="$(echo ${ATF_MACHINE_NAME} | sed -e 's,.bin,-A0.bin,g')"
|
ATF_MACHINE_NAME_A0="$(echo ${ATF_MACHINE_NAME} | sed -e 's,.bin,-A0.bin,g')"
|
||||||
bbnote "Copy ATF binary for SOC revision A0: ${ATF_MACHINE_NAME_A0}"
|
bbnote "Copy ATF binary for SOC revision A0: ${ATF_MACHINE_NAME_A0}"
|
||||||
\cp --remove-destination ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME_A0} ${BOOT_STAGING}/bl31.bin
|
\cp --remove-destination ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME_A0} ${BOOT_STAGING}/bl31.bin
|
||||||
|
# Filename must match the deployed one in "optee-os" recipe for A0 SOC revision
|
||||||
|
\cp --remove-destination ${DEPLOY_DIR_IMAGE}/tee.ccimx93dvk_a0.bin ${BOOT_STAGING}/tee.bin
|
||||||
unset ATF_MACHINE_NAME_A0
|
unset ATF_MACHINE_NAME_A0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -107,6 +109,11 @@ do_deploy:append:ccimx93() {
|
||||||
ln -sf ${BOOT_NAME}-${MACHINE}.bin-${target} ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}-A0.bin
|
ln -sf ${BOOT_NAME}-${MACHINE}.bin-${target} ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}-A0.bin
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# Deploy A0 optee binary
|
||||||
|
if ${DEPLOY_OPTEE}; then
|
||||||
|
# Filename must match the deployed one in "optee-os" recipe for A0 SOC revision
|
||||||
|
install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.ccimx93dvk_a0.bin ${DEPLOYDIR}/${BOOT_TOOLS}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_deploy:ccimx8x () {
|
do_deploy:ccimx8x () {
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,28 @@ From: Javier Viguera <javier.viguera@digi.com>
|
||||||
Date: Mon, 15 May 2023 17:59:54 +0200
|
Date: Mon, 15 May 2023 17:59:54 +0200
|
||||||
Subject: [PATCH] core: imx: support ccimx93-dvk
|
Subject: [PATCH] core: imx: support ccimx93-dvk
|
||||||
|
|
||||||
|
SOC revision A0 requires a different build.
|
||||||
|
|
||||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||||
---
|
---
|
||||||
core/arch/arm/plat-imx/conf.mk | 6 ++++++
|
core/arch/arm/plat-imx/conf.mk | 13 +++++++++++++
|
||||||
core/arch/arm/plat-imx/registers/imx93.h | 1 +
|
core/arch/arm/plat-imx/registers/imx93.h | 5 +++++
|
||||||
2 files changed, 7 insertions(+)
|
2 files changed, 18 insertions(+)
|
||||||
|
|
||||||
diff --git a/core/arch/arm/plat-imx/conf.mk b/core/arch/arm/plat-imx/conf.mk
|
diff --git a/core/arch/arm/plat-imx/conf.mk b/core/arch/arm/plat-imx/conf.mk
|
||||||
index 0bd9ccd6bef1..4fa61d5c2619 100644
|
index 0bd9ccd6bef1..5e4c02e27d2e 100644
|
||||||
--- a/core/arch/arm/plat-imx/conf.mk
|
--- a/core/arch/arm/plat-imx/conf.mk
|
||||||
+++ b/core/arch/arm/plat-imx/conf.mk
|
+++ b/core/arch/arm/plat-imx/conf.mk
|
||||||
@@ -88,6 +88,7 @@ mx8ulp-flavorlist = \
|
@@ -88,6 +88,8 @@ mx8ulp-flavorlist = \
|
||||||
mx8ulpevk \
|
mx8ulpevk \
|
||||||
|
|
||||||
mx93-flavorlist = \
|
mx93-flavorlist = \
|
||||||
+ ccimx93dvk \
|
+ ccimx93dvk \
|
||||||
|
+ ccimx93dvk_a0 \
|
||||||
mx93evk \
|
mx93evk \
|
||||||
|
|
||||||
ifneq (,$(filter $(PLATFORM_FLAVOR),$(mx6ul-flavorlist)))
|
ifneq (,$(filter $(PLATFORM_FLAVOR),$(mx6ul-flavorlist)))
|
||||||
@@ -451,6 +452,11 @@ CFG_DDR_SIZE ?= 0x80000000
|
@@ -451,6 +453,17 @@ CFG_DDR_SIZE ?= 0x80000000
|
||||||
CFG_UART_BASE ?= UART1_BASE
|
CFG_UART_BASE ?= UART1_BASE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -28,15 +31,21 @@ index 0bd9ccd6bef1..4fa61d5c2619 100644
|
||||||
+CFG_DDR_SIZE ?= 0x40000000
|
+CFG_DDR_SIZE ?= 0x40000000
|
||||||
+CFG_UART_BASE ?= UART6_BASE
|
+CFG_UART_BASE ?= UART6_BASE
|
||||||
+endif
|
+endif
|
||||||
|
+
|
||||||
|
+ifneq (,$(filter $(PLATFORM_FLAVOR),ccimx93dvk_a0))
|
||||||
|
+CFG_DDR_SIZE ?= 0x40000000
|
||||||
|
+CFG_UART_BASE ?= UART6_BASE
|
||||||
|
+$(call force,CFG_SOC_REV_A0,y)
|
||||||
|
+endif
|
||||||
+
|
+
|
||||||
# i.MX6 Solo/SL/SoloX/DualLite/Dual/Quad specific config
|
# i.MX6 Solo/SL/SoloX/DualLite/Dual/Quad specific config
|
||||||
ifeq ($(filter y, $(CFG_MX6QP) $(CFG_MX6Q) $(CFG_MX6D) $(CFG_MX6DL) $(CFG_MX6S) \
|
ifeq ($(filter y, $(CFG_MX6QP) $(CFG_MX6Q) $(CFG_MX6D) $(CFG_MX6DL) $(CFG_MX6S) \
|
||||||
$(CFG_MX6SL) $(CFG_MX6SLL) $(CFG_MX6SX)), y)
|
$(CFG_MX6SL) $(CFG_MX6SLL) $(CFG_MX6SX)), y)
|
||||||
diff --git a/core/arch/arm/plat-imx/registers/imx93.h b/core/arch/arm/plat-imx/registers/imx93.h
|
diff --git a/core/arch/arm/plat-imx/registers/imx93.h b/core/arch/arm/plat-imx/registers/imx93.h
|
||||||
index 21080da82d04..17f4d8f5755e 100644
|
index 21080da82d04..29070eb917ac 100644
|
||||||
--- a/core/arch/arm/plat-imx/registers/imx93.h
|
--- a/core/arch/arm/plat-imx/registers/imx93.h
|
||||||
+++ b/core/arch/arm/plat-imx/registers/imx93.h
|
+++ b/core/arch/arm/plat-imx/registers/imx93.h
|
||||||
@@ -9,6 +9,7 @@
|
@@ -9,11 +9,16 @@
|
||||||
#define GICR_BASE 0x48040000
|
#define GICR_BASE 0x48040000
|
||||||
|
|
||||||
#define UART1_BASE 0x44380000
|
#define UART1_BASE 0x44380000
|
||||||
|
|
@ -44,3 +53,12 @@ index 21080da82d04..17f4d8f5755e 100644
|
||||||
/*
|
/*
|
||||||
* For Normal MU - Use MU_BASE as 0x47520000
|
* For Normal MU - Use MU_BASE as 0x47520000
|
||||||
* For Trust MU - Use MU_BASE as 0x47530000
|
* For Trust MU - Use MU_BASE as 0x47530000
|
||||||
|
*/
|
||||||
|
+#ifdef CFG_SOC_REV_A0
|
||||||
|
+#define MU_BASE 0x47520000
|
||||||
|
+#else
|
||||||
|
#define MU_BASE 0x47530000
|
||||||
|
+#endif
|
||||||
|
#define MU_SIZE 0x10000
|
||||||
|
|
||||||
|
#define MU_TRUST_BASE 0x47530000
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,13 @@ SRCREV = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"
|
||||||
|
|
||||||
PLATFORM_FLAVOR:ccimx93 = "ccimx93dvk"
|
PLATFORM_FLAVOR:ccimx93 = "ccimx93dvk"
|
||||||
|
|
||||||
|
do_compile:append:ccimx93 () {
|
||||||
|
oe_runmake PLATFORM=imx-${PLATFORM_FLAVOR}_a0 O=${B}-A0 all
|
||||||
|
}
|
||||||
|
do_compile[cleandirs] += "${B}-A0"
|
||||||
|
|
||||||
|
do_deploy:append:ccimx93 () {
|
||||||
|
cp ${B}-A0/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}_a0.bin
|
||||||
|
}
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "(ccimx93)"
|
COMPATIBLE_MACHINE = "(ccimx93)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue