imx-atf: update to version 2.6 and convert to bbappend
Also:
* Support ccimx93
* Add all the patches regardless of the platform (remove overrides). The
patches do not clash, so adding all of them eases the maintanance and
the migration to new versions of the imx-atf.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
cfa581c958
commit
df49f2ec9e
|
|
@ -11,10 +11,10 @@ Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
|
diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
|
||||||
index 83ebad65b..f47bdec22 100644
|
index a24e41fd77e9..1c8c66435db7 100644
|
||||||
--- a/plat/imx/imx8m/imx8mm/platform.mk
|
--- a/plat/imx/imx8m/imx8mm/platform.mk
|
||||||
+++ b/plat/imx/imx8m/imx8mm/platform.mk
|
+++ b/plat/imx/imx8m/imx8mm/platform.mk
|
||||||
@@ -62,7 +62,7 @@ $(eval $(call add_define,BL32_BASE))
|
@@ -153,7 +153,7 @@ $(eval $(call add_define,BL32_BASE))
|
||||||
BL32_SIZE ?= 0x2000000
|
BL32_SIZE ?= 0x2000000
|
||||||
$(eval $(call add_define,BL32_SIZE))
|
$(eval $(call add_define,BL32_SIZE))
|
||||||
|
|
||||||
|
|
@ -22,4 +22,4 @@ index 83ebad65b..f47bdec22 100644
|
||||||
+IMX_BOOT_UART_BASE ?= 0x30860000
|
+IMX_BOOT_UART_BASE ?= 0x30860000
|
||||||
$(eval $(call add_define,IMX_BOOT_UART_BASE))
|
$(eval $(call add_define,IMX_BOOT_UART_BASE))
|
||||||
|
|
||||||
ifeq (${SPD},trusty)
|
$(eval $(call add_define,IMX8M_DDR4_DVFS))
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
index f63b9fcad..8c9aa4de1 100644
|
index 8702d5160a45..8ffeed204e90 100644
|
||||||
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
|
||||||
@@ -58,7 +58,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
@@ -108,7 +108,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
||||||
RDC_MDAn(RDC_MDA_M4, DID1),
|
RDC_MDAn(RDC_MDA_M4, DID1),
|
||||||
|
|
||||||
/* peripherals domain permission */
|
/* peripherals domain permission */
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
index 71f3758c3..19be3e91c 100644
|
index c87748a1888a..2dd3ab409e97 100644
|
||||||
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
@@ -51,7 +51,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
@@ -106,7 +106,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
||||||
|
|
||||||
/* peripherals domain permission */
|
/* peripherals domain permission */
|
||||||
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||||
|
|
@ -25,10 +25,10 @@ index 71f3758c3..19be3e91c 100644
|
||||||
|
|
||||||
/* memory region */
|
/* memory region */
|
||||||
diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
|
diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
|
||||||
index 22846f289..fb5bef02d 100644
|
index 8da9b298cfba..90c8bd0bab6b 100644
|
||||||
--- a/plat/imx/imx8m/imx8mn/platform.mk
|
--- a/plat/imx/imx8m/imx8mn/platform.mk
|
||||||
+++ b/plat/imx/imx8m/imx8mn/platform.mk
|
+++ b/plat/imx/imx8m/imx8mn/platform.mk
|
||||||
@@ -62,7 +62,7 @@ $(eval $(call add_define,BL32_BASE))
|
@@ -63,7 +63,7 @@ $(eval $(call add_define,BL32_BASE))
|
||||||
BL32_SIZE ?= 0x2000000
|
BL32_SIZE ?= 0x2000000
|
||||||
$(eval $(call add_define,BL32_SIZE))
|
$(eval $(call add_define,BL32_SIZE))
|
||||||
|
|
||||||
|
|
@ -36,4 +36,4 @@ index 22846f289..fb5bef02d 100644
|
||||||
+IMX_BOOT_UART_BASE ?= 0x30860000
|
+IMX_BOOT_UART_BASE ?= 0x30860000
|
||||||
$(eval $(call add_define,IMX_BOOT_UART_BASE))
|
$(eval $(call add_define,IMX_BOOT_UART_BASE))
|
||||||
|
|
||||||
ifeq (${SPD},trusty)
|
$(eval $(call add_define,IMX8M_DDR4_DVFS))
|
||||||
|
|
@ -13,10 +13,10 @@ Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
index 19be3e91c..c7c504788 100644
|
index 2dd3ab409e97..0ad3bd9edf83 100644
|
||||||
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
|
||||||
@@ -50,7 +50,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
@@ -105,7 +105,7 @@ static const struct imx_rdc_cfg rdc[] = {
|
||||||
RDC_MDAn(RDC_MDA_M7, DID1),
|
RDC_MDAn(RDC_MDA_M7, DID1),
|
||||||
|
|
||||||
/* peripherals domain permission */
|
/* peripherals domain permission */
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
From: Javier Viguera <javier.viguera@digi.com>
|
||||||
|
Date: Thu, 20 Oct 2022 17:04:37 +0200
|
||||||
|
Subject: [PATCH] ccimx93: use UART6 for the default console
|
||||||
|
|
||||||
|
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||||
|
---
|
||||||
|
plat/imx/imx93/include/platform_def.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plat/imx/imx93/include/platform_def.h b/plat/imx/imx93/include/platform_def.h
|
||||||
|
index a820c27a5b49..a563d8852d23 100644
|
||||||
|
--- a/plat/imx/imx93/include/platform_def.h
|
||||||
|
+++ b/plat/imx/imx93/include/platform_def.h
|
||||||
|
@@ -47,7 +47,7 @@
|
||||||
|
#define MAX_XLAT_TABLES 12
|
||||||
|
#define MAX_MMAP_REGIONS 16
|
||||||
|
|
||||||
|
-#define IMX_LPUART_BASE 0x44380000
|
||||||
|
+#define IMX_LPUART_BASE 0x425a0000
|
||||||
|
#define IMX_BOOT_UART_CLK_IN_HZ 24000000 /* Select 24MHz oscillator */
|
||||||
|
#define IMX_CONSOLE_BAUDRATE 115200
|
||||||
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
# Copyright (C) 2017-2021 NXP
|
|
||||||
|
|
||||||
DESCRIPTION = "i.MX ARM Trusted Firmware"
|
|
||||||
SECTION = "BSP"
|
|
||||||
LICENSE = "BSD-3-Clause"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
|
|
||||||
|
|
||||||
PV .= "+git${SRCPV}"
|
|
||||||
|
|
||||||
SRCBRANCH = "lf_v2.4"
|
|
||||||
ATF_SRC ?= "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https"
|
|
||||||
SRC_URI = "${ATF_SRC};branch=${SRCBRANCH} \
|
|
||||||
"
|
|
||||||
SRCREV = "5782363f92a2fdf926784449270433cf3ddf44bd"
|
|
||||||
|
|
||||||
SRC_URI:append:ccimx8mn = " file://0001-imx8mn-Define-UART1-as-console-for-boot-stage.patch \
|
|
||||||
file://0002-imx8mn-Disable-M7-debug-console.patch"
|
|
||||||
SRC_URI:append:ccimx8mm = " file://0001-imx8mm-Define-UART1-as-console-for-boot-stage.patch \
|
|
||||||
file://0002-imx8mm-Disable-M4-debug-console.patch"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
inherit deploy
|
|
||||||
|
|
||||||
BOOT_TOOLS = "imx-boot-tools"
|
|
||||||
|
|
||||||
PLATFORM ?= "INVALID"
|
|
||||||
PLATFORM:mx8qm-nxp-bsp = "imx8qm"
|
|
||||||
PLATFORM:mx8x-nxp-bsp = "imx8qx"
|
|
||||||
PLATFORM:mx8mq-nxp-bsp = "imx8mq"
|
|
||||||
PLATFORM:mx8mm-nxp-bsp = "imx8mm"
|
|
||||||
PLATFORM:mx8mn-nxp-bsp = "imx8mn"
|
|
||||||
PLATFORM:mx8mnul-nxp-bsp = "imx8mn"
|
|
||||||
PLATFORM:mx8mp-nxp-bsp = "imx8mp"
|
|
||||||
PLATFORM:mx8mpul-nxp-bsp = "imx8mp"
|
|
||||||
PLATFORM:mx8dx-nxp-bsp = "imx8dx"
|
|
||||||
PLATFORM:mx8dxl-nxp-bsp = "imx8dxl"
|
|
||||||
PLATFORM:mx8ulp-nxp-bsp = "imx8ulp"
|
|
||||||
|
|
||||||
# Clear LDFLAGS to avoid the option -Wl recognize issue
|
|
||||||
# Clear CFLAGS to avoid coherent_arm out of OCRAM size limitation (64KB) - i.MX 8MQ only
|
|
||||||
CLEAR_FLAGS ?= "LDFLAGS"
|
|
||||||
CLEAR_FLAGS:mx8mq-nxp-bsp = "LDFLAGS CFLAGS"
|
|
||||||
|
|
||||||
EXTRA_OEMAKE += " \
|
|
||||||
CROSS_COMPILE="${TARGET_PREFIX}" \
|
|
||||||
PLAT=${PLATFORM} \
|
|
||||||
"
|
|
||||||
|
|
||||||
BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
|
|
||||||
|
|
||||||
do_compile() {
|
|
||||||
unset ${CLEAR_FLAGS}
|
|
||||||
|
|
||||||
oe_runmake bl31
|
|
||||||
if ${BUILD_OPTEE}; then
|
|
||||||
oe_runmake clean BUILD_BASE=build-optee
|
|
||||||
oe_runmake BUILD_BASE=build-optee SPD=opteed bl31
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install[noexec] = "1"
|
|
||||||
|
|
||||||
do_deploy() {
|
|
||||||
install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin
|
|
||||||
if ${BUILD_OPTEE}; then
|
|
||||||
install -m 0644 ${S}/build-optee/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin-optee
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
addtask deploy after do_compile
|
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
|
|
||||||
COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Copyright (C) 2022 Digi International
|
||||||
|
|
||||||
|
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
|
||||||
|
|
||||||
|
SRC_URI:append = " \
|
||||||
|
file://0001-imx8mm-Define-UART1-as-console-for-boot-stage.patch \
|
||||||
|
file://0002-imx8mm-Disable-M4-debug-console.patch \
|
||||||
|
file://0003-imx8mn-Define-UART1-as-console-for-boot-stage.patch \
|
||||||
|
file://0004-imx8mn-Disable-M7-debug-console.patch \
|
||||||
|
file://0005-ccimx93-use-UART6-for-the-default-console.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
# Release "lf-5.15.71-2.2.0"
|
||||||
|
SRCREV = "3c1583ba0a5d11e5116332e91065cb3740153a46"
|
||||||
|
|
||||||
|
BOOT_TOOLS = "imx-boot-tools"
|
||||||
|
|
||||||
|
do_deploy:append() {
|
||||||
|
install -Dm 0644 ${S}/build/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin
|
||||||
|
if ${BUILD_OPTEE}; then
|
||||||
|
install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin-optee
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "(mx8-generic-bsp|mx9-generic-bsp)"
|
||||||
Loading…
Reference in New Issue