* [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support
2024-01-09 17:25 [Buildroot] [PATCH v3 0/3] i.MX91 and i.MX93 support Sébastien Szymanski
@ 2024-01-09 17:25 ` Sébastien Szymanski
2024-01-22 11:01 ` Gary Bisson
2024-01-09 17:25 ` [Buildroot] [PATCH v3 2/3] package/freescale-imx/firmware-ele-imx: new package Sébastien Szymanski
2024-01-09 17:26 ` [Buildroot] [PATCH v3 3/3] configs/freescale_imx93evk: new defconfig Sébastien Szymanski
2 siblings, 1 reply; 7+ messages in thread
From: Sébastien Szymanski @ 2024-01-09 17:25 UTC (permalink / raw)
To: buildroot
Cc: Gary Bisson, Fabio Estevam, Refik Tuzakli, Julien Olivain,
Thomas Petazzoni
This commit adds i.MX91 and i.MX93 support to Buildroot.
https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors:IMX9-PROCESSORS
There is no i.MX95 software provided by NXP at the moment that's why
i.MX95 is left behind.
Adapt package firmware-imx for the LPPDR4 firwmares binaries.
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
---
Changes for v3:
- none
Changes for v2:
- none
package/freescale-imx/Config.in | 8 +++++++
package/freescale-imx/firmware-imx/Config.in | 9 ++++++++
.../firmware-imx/firmware-imx.mk | 23 +++++++++++++++++++
3 files changed, 40 insertions(+)
diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index 1c26b3cc6f4c..0229eaf0271f 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -61,6 +61,12 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL
bool "imx8dxl"
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+ bool "imx91"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
+ bool "imx93"
+
endchoice
config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
@@ -80,6 +86,8 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
default "IMX8MN" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
default "IMX8MP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
+ default "IMX91" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+ default "IMX93" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
bool
diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in
index 087ddef8771b..7be6761253c9 100644
--- a/package/freescale-imx/firmware-imx/Config.in
+++ b/package/freescale-imx/firmware-imx/Config.in
@@ -55,6 +55,8 @@ config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
+ default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+ default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
@@ -73,11 +75,15 @@ config BR2_PACKAGE_FIRMWARE_IMX_LPDDR4
config BR2_PACKAGE_FIRMWARE_IMX_DDR4
bool "DDR4"
+ depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+ depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
help
Use DDR4 binaries (i.e.: ddr4_*_201810.bin).
config BR2_PACKAGE_FIRMWARE_IMX_DDR3
bool "DDR3"
+ depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+ depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
help
Use DDR3 binaries (i.e.: ddr3_*_201810.bin).
@@ -89,6 +95,9 @@ config BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION
# unconditionally use HW version 201810 when DDR3/DDR4 was
# selected
default "201810" if BR2_PACKAGE_FIRMWARE_IMX_DDR3 || BR2_PACKAGE_FIRMWARE_IMX_DDR4
+ default "202201" if \
+ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
+ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
help
Use a specific version of the imx ddr binaries. Leaving this
field empty will select the default version.
diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
index 66ef8c3930be..a08e8c4fb097 100644
--- a/package/freescale-imx/firmware-imx/firmware-imx.mk
+++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
@@ -43,11 +43,33 @@ endef
FIRMWARE_IMX_DDR_VERSION = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION))
ifneq ($(FIRMWARE_IMX_DDR_VERSION),)
FIRMWARE_IMX_DDR_VERSION_SUFFIX = _$(FIRMWARE_IMX_DDR_VERSION)
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y)
+FIRMWARE_IMX_DDR_VERSION_SUFFIX = _v$(FIRMWARE_IMX_DDR_VERSION)
+endif
endif
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y)
FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y)
+define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
+ # Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
+ # lpddr4_pmu_train_fw.bin is needed when generating imx9-boot-sd.bin
+ # which is done in post-image script.
+ $(call FIRMWARE_IMX_PREPARE_DDR_FW, \
+ lpddr4_imem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
+ lpddr4_dmem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
+ lpddr4_pmu_train_1d_fw)
+ $(call FIRMWARE_IMX_PREPARE_DDR_FW, \
+ lpddr4_imem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
+ lpddr4_dmem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
+ lpddr4_pmu_train_2d_fw)
+ cat $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_1d_fw.bin \
+ $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_2d_fw.bin > \
+ $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin
+ ln -sf $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin $(BINARIES_DIR)/ddr_fw.bin
+endef
+else
define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
# lpddr4_pmu_train_fw.bin is needed when generating imx8-boot-sd.bin
@@ -71,6 +93,7 @@ define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
cp $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4*.bin $(BINARIES_DIR)/
endef
endif
+endif
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y)
FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
--
2.41.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support
2024-01-09 17:25 ` [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support Sébastien Szymanski
@ 2024-01-22 11:01 ` Gary Bisson
0 siblings, 0 replies; 7+ messages in thread
From: Gary Bisson @ 2024-01-22 11:01 UTC (permalink / raw)
To: Sébastien Szymanski
Cc: Refik Tuzakli, Julien Olivain, Fabio Estevam, Thomas Petazzoni,
buildroot
Hi Sébastien,
On Tue, Jan 09, 2024 at 06:25:58PM +0100, Sébastien Szymanski wrote:
> This commit adds i.MX91 and i.MX93 support to Buildroot.
> https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors:IMX9-PROCESSORS
>
> There is no i.MX95 software provided by NXP at the moment that's why
> i.MX95 is left behind.
>
> Adapt package firmware-imx for the LPPDR4 firwmares binaries.
>
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
> ---
>
> Changes for v3:
> - none
>
> Changes for v2:
> - none
>
> package/freescale-imx/Config.in | 8 +++++++
> package/freescale-imx/firmware-imx/Config.in | 9 ++++++++
> .../firmware-imx/firmware-imx.mk | 23 +++++++++++++++++++
> 3 files changed, 40 insertions(+)
>
> diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
> index 1c26b3cc6f4c..0229eaf0271f 100644
> --- a/package/freescale-imx/Config.in
> +++ b/package/freescale-imx/Config.in
> @@ -61,6 +61,12 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
> config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL
> bool "imx8dxl"
>
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> + bool "imx91"
> +
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> + bool "imx93"
> +
> endchoice
>
> config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
> @@ -80,6 +86,8 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
> default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
> default "IMX8MN" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
> default "IMX8MP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
> + default "IMX91" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> + default "IMX93" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>
> config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
> bool
> diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in
> index 087ddef8771b..7be6761253c9 100644
> --- a/package/freescale-imx/firmware-imx/Config.in
> +++ b/package/freescale-imx/firmware-imx/Config.in
> @@ -55,6 +55,8 @@ config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
> default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
> default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
> default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
> + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>
> if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
>
> @@ -73,11 +75,15 @@ config BR2_PACKAGE_FIRMWARE_IMX_LPDDR4
>
> config BR2_PACKAGE_FIRMWARE_IMX_DDR4
> bool "DDR4"
> + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> help
> Use DDR4 binaries (i.e.: ddr4_*_201810.bin).
>
> config BR2_PACKAGE_FIRMWARE_IMX_DDR3
> bool "DDR3"
> + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> help
> Use DDR3 binaries (i.e.: ddr3_*_201810.bin).
>
> @@ -89,6 +95,9 @@ config BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION
> # unconditionally use HW version 201810 when DDR3/DDR4 was
> # selected
> default "201810" if BR2_PACKAGE_FIRMWARE_IMX_DDR3 || BR2_PACKAGE_FIRMWARE_IMX_DDR4
> + default "202201" if \
> + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
> + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
Why not having the DDR version set as "v202201" here?
> help
> Use a specific version of the imx ddr binaries. Leaving this
> field empty will select the default version.
> diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
> index 66ef8c3930be..a08e8c4fb097 100644
> --- a/package/freescale-imx/firmware-imx/firmware-imx.mk
> +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
> @@ -43,11 +43,33 @@ endef
> FIRMWARE_IMX_DDR_VERSION = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION))
> ifneq ($(FIRMWARE_IMX_DDR_VERSION),)
> FIRMWARE_IMX_DDR_VERSION_SUFFIX = _$(FIRMWARE_IMX_DDR_VERSION)
> +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y)
> +FIRMWARE_IMX_DDR_VERSION_SUFFIX = _v$(FIRMWARE_IMX_DDR_VERSION)
> +endif
That would allow to get rid of the above and keep the suffix variable
somewhat generic across the CPUs?
No strong feelings here, just a suggestion to make the patch even
smaller.
> endif
>
> ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y)
> FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
>
> +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y)
> +define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
> + # Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
> + # lpddr4_pmu_train_fw.bin is needed when generating imx9-boot-sd.bin
> + # which is done in post-image script.
> + $(call FIRMWARE_IMX_PREPARE_DDR_FW, \
> + lpddr4_imem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> + lpddr4_dmem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> + lpddr4_pmu_train_1d_fw)
> + $(call FIRMWARE_IMX_PREPARE_DDR_FW, \
> + lpddr4_imem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> + lpddr4_dmem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> + lpddr4_pmu_train_2d_fw)
> + cat $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_1d_fw.bin \
> + $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_2d_fw.bin > \
> + $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin
> + ln -sf $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin $(BINARIES_DIR)/ddr_fw.bin
> +endef
> +else
> define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
> # Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
> # lpddr4_pmu_train_fw.bin is needed when generating imx8-boot-sd.bin
> @@ -71,6 +93,7 @@ define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
> cp $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4*.bin $(BINARIES_DIR)/
> endef
> endif
> +endif
>
> ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y)
> FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
Otherwise the rest looks good.
Regards,
Gary
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 2/3] package/freescale-imx/firmware-ele-imx: new package
2024-01-09 17:25 [Buildroot] [PATCH v3 0/3] i.MX91 and i.MX93 support Sébastien Szymanski
2024-01-09 17:25 ` [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support Sébastien Szymanski
@ 2024-01-09 17:25 ` Sébastien Szymanski
2024-01-22 11:05 ` Gary Bisson
2024-01-09 17:26 ` [Buildroot] [PATCH v3 3/3] configs/freescale_imx93evk: new defconfig Sébastien Szymanski
2 siblings, 1 reply; 7+ messages in thread
From: Sébastien Szymanski @ 2024-01-09 17:25 UTC (permalink / raw)
To: buildroot
Cc: Gary Bisson, Fabio Estevam, Refik Tuzakli, Julien Olivain,
Thomas Petazzoni
This package provides firmware blobs for the Edgelock Secure
Enclave (ELE) [1] present on i.MX8ULP and i.MX9 Socs.
This version comes from the 6.1.55-2.2.0 release.
[1] https://www.nxp.com/products/nxp-product-information/nxp-product-programs/edgelock-secure-enclave:EDGELOCK-SECURE-ENCLAVE
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
---
Changes for v3:
- rename package from firmware-sentinel to package firmware-ele-imx
Changes for v2:
- none
package/freescale-imx/Config.in | 30 +++++++++++++++++++
.../freescale-imx/firmware-ele-imx/Config.in | 21 +++++++++++++
.../firmware-ele-imx/firmware-ele-imx.hash | 4 +++
.../firmware-ele-imx/firmware-ele-imx.mk | 27 +++++++++++++++++
4 files changed, 82 insertions(+)
create mode 100644 package/freescale-imx/firmware-ele-imx/Config.in
create mode 100644 package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash
create mode 100644 package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk
diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index 0229eaf0271f..da60d0879840 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -69,6 +69,35 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
endchoice
+choice
+ prompt "i.MX platform asic version"
+ default BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91A1 \
+ if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+ default BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A1 \
+ if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
+ depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
+ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
+ help
+ Some packages related to the selected i.MX platform need
+ to know the asic version of the platform they will run on.
+ If you don't know, leave the default value.
+
+ Note - mismatches may result in a failure to boot!
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91A1
+ bool "imx91a1"
+ depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A0
+ bool "imx93a0"
+ depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A1
+ bool "imx93a1"
+ depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
+
+endchoice
+
config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
string
default "IMX25_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
@@ -125,6 +154,7 @@ source "package/freescale-imx/imx-uuc/Config.in"
source "package/freescale-imx/imx-vpu/Config.in"
source "package/freescale-imx/imx-vpu-hantro/Config.in"
source "package/freescale-imx/imx-vpuwrap/Config.in"
+source "package/freescale-imx/firmware-ele-imx/Config.in"
source "package/freescale-imx/firmware-imx/Config.in"
source "package/freescale-imx/imx-sc-firmware/Config.in"
source "package/freescale-imx/imx-seco/Config.in"
diff --git a/package/freescale-imx/firmware-ele-imx/Config.in b/package/freescale-imx/firmware-ele-imx/Config.in
new file mode 100644
index 000000000000..7867c3712c9c
--- /dev/null
+++ b/package/freescale-imx/firmware-ele-imx/Config.in
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_FIRMWARE_ELE_IMX
+ bool "firmware-ele-imx"
+ depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
+ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
+ help
+ Firmware blobs for the Edgelock Secure Enclave (ELE)
+ present on i.MX8ULP and i.MX9 SoCs.
+
+ This library is provided by NXP as-is and doesn't have an
+ upstream.
+
+if BR2_PACKAGE_FIRMWARE_ELE_IMX
+
+config BR2_PACKAGE_FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE
+ string
+ default "mx93a0-ahab-container.img" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A0
+ default "mx93a1-ahab-container.img" if \
+ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91A1 || \
+ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A1
+
+endif # BR2_PACKAGE_FIRMWARE_ELE_IMX
diff --git a/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash
new file mode 100644
index 000000000000..58565cef43e9
--- /dev/null
+++ b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256 4a0440168d8dfb95989a17be8fafb149589e110e7d4518e5e8a33463dfb5e5ca firmware-ele-imx-0.1.0.bin
+sha256 24d7cb3a7e51011466a149bd99acf89387b832be2d0890ce2e183dfbc9d7cb84 COPYING
+sha256 c800aaca3a7e9f470d99d7cde0a48c95982ed601d4c306f7b8f43f3710054f28 SCR.txt
diff --git a/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk
new file mode 100644
index 000000000000..600b50c5b456
--- /dev/null
+++ b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# firmware-ele-imx
+#
+################################################################################
+
+FIRMWARE_ELE_IMX_VERSION = 0.1.0
+FIRMWARE_ELE_IMX_SITE = $(FREESCALE_IMX_SITE)
+FIRMWARE_ELE_IMX_SOURCE = firmware-ele-imx-$(FIRMWARE_ELE_IMX_VERSION).bin
+
+FIRMWARE_ELE_IMX_LICENSE = NXP Semiconductor Software License Agreement
+FIRMWARE_ELE_IMX_LICENSE_FILES = COPYING SCR.txt
+FIRMWARE_ELE_IMX_REDISTRIBUTE = NO
+
+FIRMWARE_ELE_IMX_INSTALL_IMAGES = YES
+
+define FIRMWARE_ELE_IMX_EXTRACT_CMDS
+ $(call NXP_EXTRACT_HELPER,$(FIRMWARE_ELE_IMX_DL_DIR)/$(FIRMWARE_ELE_IMX_SOURCE))
+endef
+
+FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE))
+
+define FIRMWARE_ELE_IMX_INSTALL_IMAGES_CMDS
+ cp $(@D)/$(FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE) $(BINARIES_DIR)/ahab-container.img
+endef
+
+$(eval $(generic-package))
--
2.41.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH v3 2/3] package/freescale-imx/firmware-ele-imx: new package
2024-01-09 17:25 ` [Buildroot] [PATCH v3 2/3] package/freescale-imx/firmware-ele-imx: new package Sébastien Szymanski
@ 2024-01-22 11:05 ` Gary Bisson
0 siblings, 0 replies; 7+ messages in thread
From: Gary Bisson @ 2024-01-22 11:05 UTC (permalink / raw)
To: Sébastien Szymanski
Cc: Refik Tuzakli, Julien Olivain, Fabio Estevam, Thomas Petazzoni,
buildroot
Hi,
On Tue, Jan 09, 2024 at 06:25:59PM +0100, Sébastien Szymanski wrote:
> This package provides firmware blobs for the Edgelock Secure
> Enclave (ELE) [1] present on i.MX8ULP and i.MX9 Socs.
> This version comes from the 6.1.55-2.2.0 release.
>
> [1] https://www.nxp.com/products/nxp-product-information/nxp-product-programs/edgelock-secure-enclave:EDGELOCK-SECURE-ENCLAVE
>
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
> ---
>
> Changes for v3:
> - rename package from firmware-sentinel to package firmware-ele-imx
>
> Changes for v2:
> - none
>
> package/freescale-imx/Config.in | 30 +++++++++++++++++++
> .../freescale-imx/firmware-ele-imx/Config.in | 21 +++++++++++++
> .../firmware-ele-imx/firmware-ele-imx.hash | 4 +++
> .../firmware-ele-imx/firmware-ele-imx.mk | 27 +++++++++++++++++
> 4 files changed, 82 insertions(+)
> create mode 100644 package/freescale-imx/firmware-ele-imx/Config.in
> create mode 100644 package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash
> create mode 100644 package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk
>
> diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
> index 0229eaf0271f..da60d0879840 100644
> --- a/package/freescale-imx/Config.in
> +++ b/package/freescale-imx/Config.in
> @@ -69,6 +69,35 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>
> endchoice
>
> +choice
> + prompt "i.MX platform asic version"
Please rename "i.MX Silicon Revision" in order to match the Datasheet
naming (see 1.1 Ordering Information section).
> + default BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91A1 \
> + if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> + default BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A1 \
> + if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
> + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> + help
> + Some packages related to the selected i.MX platform need
> + to know the asic version of the platform they will run on.
> + If you don't know, leave the default value.
> +
> + Note - mismatches may result in a failure to boot!
> +
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91A1
> + bool "imx91a1"
> + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> +
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A0
> + bool "imx93a0"
> + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> +
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A1
> + bool "imx93a1"
> + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> +
> +endchoice
> +
Actually, can you add that part above with the previous patch?
I believe this should be part of the overall CPU addition support.
> config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
> string
> default "IMX25_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
> @@ -125,6 +154,7 @@ source "package/freescale-imx/imx-uuc/Config.in"
> source "package/freescale-imx/imx-vpu/Config.in"
> source "package/freescale-imx/imx-vpu-hantro/Config.in"
> source "package/freescale-imx/imx-vpuwrap/Config.in"
> +source "package/freescale-imx/firmware-ele-imx/Config.in"
> source "package/freescale-imx/firmware-imx/Config.in"
> source "package/freescale-imx/imx-sc-firmware/Config.in"
> source "package/freescale-imx/imx-seco/Config.in"
> diff --git a/package/freescale-imx/firmware-ele-imx/Config.in b/package/freescale-imx/firmware-ele-imx/Config.in
> new file mode 100644
> index 000000000000..7867c3712c9c
> --- /dev/null
> +++ b/package/freescale-imx/firmware-ele-imx/Config.in
> @@ -0,0 +1,21 @@
> +config BR2_PACKAGE_FIRMWARE_ELE_IMX
> + bool "firmware-ele-imx"
> + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
> + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> + help
> + Firmware blobs for the Edgelock Secure Enclave (ELE)
> + present on i.MX8ULP and i.MX9 SoCs.
> +
> + This library is provided by NXP as-is and doesn't have an
> + upstream.
> +
> +if BR2_PACKAGE_FIRMWARE_ELE_IMX
> +
> +config BR2_PACKAGE_FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE
> + string
> + default "mx93a0-ahab-container.img" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A0
> + default "mx93a1-ahab-container.img" if \
> + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91A1 || \
> + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93A1
> +
> +endif # BR2_PACKAGE_FIRMWARE_ELE_IMX
> diff --git a/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash
> new file mode 100644
> index 000000000000..58565cef43e9
> --- /dev/null
> +++ b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256 4a0440168d8dfb95989a17be8fafb149589e110e7d4518e5e8a33463dfb5e5ca firmware-ele-imx-0.1.0.bin
> +sha256 24d7cb3a7e51011466a149bd99acf89387b832be2d0890ce2e183dfbc9d7cb84 COPYING
> +sha256 c800aaca3a7e9f470d99d7cde0a48c95982ed601d4c306f7b8f43f3710054f28 SCR.txt
> diff --git a/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk
> new file mode 100644
> index 000000000000..600b50c5b456
> --- /dev/null
> +++ b/package/freescale-imx/firmware-ele-imx/firmware-ele-imx.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# firmware-ele-imx
> +#
> +################################################################################
> +
> +FIRMWARE_ELE_IMX_VERSION = 0.1.0
> +FIRMWARE_ELE_IMX_SITE = $(FREESCALE_IMX_SITE)
> +FIRMWARE_ELE_IMX_SOURCE = firmware-ele-imx-$(FIRMWARE_ELE_IMX_VERSION).bin
> +
> +FIRMWARE_ELE_IMX_LICENSE = NXP Semiconductor Software License Agreement
> +FIRMWARE_ELE_IMX_LICENSE_FILES = COPYING SCR.txt
> +FIRMWARE_ELE_IMX_REDISTRIBUTE = NO
> +
> +FIRMWARE_ELE_IMX_INSTALL_IMAGES = YES
> +
> +define FIRMWARE_ELE_IMX_EXTRACT_CMDS
> + $(call NXP_EXTRACT_HELPER,$(FIRMWARE_ELE_IMX_DL_DIR)/$(FIRMWARE_ELE_IMX_SOURCE))
> +endef
> +
> +FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE))
> +
> +define FIRMWARE_ELE_IMX_INSTALL_IMAGES_CMDS
> + cp $(@D)/$(FIRMWARE_ELE_IMX_AHAB_CONTAINER_IMAGE) $(BINARIES_DIR)/ahab-container.img
> +endef
> +
> +$(eval $(generic-package))
The rest looks ok to me.
Thanks,
Gary
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 3/3] configs/freescale_imx93evk: new defconfig
2024-01-09 17:25 [Buildroot] [PATCH v3 0/3] i.MX91 and i.MX93 support Sébastien Szymanski
2024-01-09 17:25 ` [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support Sébastien Szymanski
2024-01-09 17:25 ` [Buildroot] [PATCH v3 2/3] package/freescale-imx/firmware-ele-imx: new package Sébastien Szymanski
@ 2024-01-09 17:26 ` Sébastien Szymanski
2024-01-10 22:07 ` Julien Olivain
2 siblings, 1 reply; 7+ messages in thread
From: Sébastien Szymanski @ 2024-01-09 17:26 UTC (permalink / raw)
To: buildroot
Cc: Gary Bisson, Fabio Estevam, Refik Tuzakli, Julien Olivain,
Thomas Petazzoni
This patch adds support for the NXP i.MX 93 11x11 EVK board [1].
[1] https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-93-evaluation-kit:i.MX93EVK
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
---
Changes for v3:
- BR2_PACKAGE_FIRMWARE_SENTINEL=y -> BR2_PACKAGE_FIRMWARE_ELE_IMX=y
- add a note about the debug UART in the readme.txt file (Julien Olivain)
- add BR2_TARGET_UBOOT_NEEDS_OPENSSL=y and
BR2_TARGET_UBOOT_NEEDS_GNUTLS=y to the defconfig file (Julien Olivain)
- bump ATF, U-Boot and Linux to latest NXP release lf-6.1.55-2.2.0
(Julien Olivain)
Changes for v2:
- none
.../common/imx/genimage.cfg.template_imx9 | 41 ++++++++++
.../common/imx/imx9-bootloader-prepare.sh | 34 ++++++++
board/freescale/common/imx/post-image.sh | 4 +
board/freescale/imx93evk/readme.txt | 77 +++++++++++++++++++
configs/freescale_imx93evk_defconfig | 39 ++++++++++
5 files changed, 195 insertions(+)
create mode 100644 board/freescale/common/imx/genimage.cfg.template_imx9
create mode 100755 board/freescale/common/imx/imx9-bootloader-prepare.sh
create mode 100644 board/freescale/imx93evk/readme.txt
create mode 100644 configs/freescale_imx93evk_defconfig
diff --git a/board/freescale/common/imx/genimage.cfg.template_imx9 b/board/freescale/common/imx/genimage.cfg.template_imx9
new file mode 100644
index 000000000000..10e192ce5774
--- /dev/null
+++ b/board/freescale/common/imx/genimage.cfg.template_imx9
@@ -0,0 +1,41 @@
+# Minimal SD card image for the Freescale iMX9 boards
+#
+# We mimic the .sdcard Freescale's image format:
+# * the SD card must have 32 kB free space at the beginning,
+# * U-Boot is integrated into imx9-boot-sd.bin and is dumped as is,
+# * a FAT partition at offset 8MB is containing Image and DTB files
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image boot.vfat {
+ vfat {
+ label = "boot"
+ files = {
+ %FILES%
+ }
+ }
+ size = 64M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition imx-boot {
+ in-partition-table = "no"
+ image = "imx9-boot-sd.bin"
+ offset = %IMXOFFSET%
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ offset = 8M
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext2"
+ }
+}
diff --git a/board/freescale/common/imx/imx9-bootloader-prepare.sh b/board/freescale/common/imx/imx9-bootloader-prepare.sh
new file mode 100755
index 000000000000..4ff92fa4cd23
--- /dev/null
+++ b/board/freescale/common/imx/imx9-bootloader-prepare.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+main ()
+{
+ SPL_LOAD_ADDR=0x2049A000
+ ATF_LOAD_ADDR=0x204E0000
+ if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" ${BR2_CONFIG}; then
+ SPL_LOAD_ADDR=0x204A0000
+ ATF_LOAD_ADDR=0x204C0000
+ fi
+
+ dd if=${BINARIES_DIR}/u-boot-spl.bin of=${BINARIES_DIR}/u-boot-spl-padded.bin bs=4 conv=sync
+ cat ${BINARIES_DIR}/u-boot-spl-padded.bin ${BINARIES_DIR}/ddr_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
+
+ ${HOST_DIR}/bin/mkimage_imx8 -commit > ${BINARIES_DIR}/mkimg.commit
+ cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit > ${BINARIES_DIR}/u-boot-hash.bin
+ rm -f ${BINARIES_DIR}/mkimg.commit
+
+ if grep -Eq "^BR2_TARGET_OPTEE_OS=y$" ${BR2_CONFIG}; then
+ ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -c -ap ${BINARIES_DIR}/bl31.bin a35 ${ATF_LOAD_ADDR} -ap ${BINARIES_DIR}/u-boot-hash.bin a35 0x80200000 -ap ${BINARIES_DIR}/tee.bin a35 0x96000000 -out ${BINARIES_DIR}/u-boot-atf-container.img
+ else
+ ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -c -ap ${BINARIES_DIR}/bl31.bin a35 ${ATF_LOAD_ADDR} -ap ${BINARIES_DIR}/u-boot-hash.bin a35 0x80200000 -out ${BINARIES_DIR}/u-boot-atf-container.img
+ fi
+
+ ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -append ${BINARIES_DIR}/ahab-container.img -c -ap ${BINARIES_DIR}/u-boot-spl-ddr.bin a35 ${SPL_LOAD_ADDR} -out ${BINARIES_DIR}/imx9-boot-sd.bin
+
+ flashbin_size=$(wc -c ${BINARIES_DIR}/imx9-boot-sd.bin | awk '{print $1}')
+ pad_cnt=$(($((flashbin_size + 0x400 - 1)) / 0x400))
+ dd if=${BINARIES_DIR}/u-boot-atf-container.img of=${BINARIES_DIR}/imx9-boot-sd.bin bs=1K seek=${pad_cnt}
+
+ exit $?
+}
+
+main $@
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
index c359ef6032a6..3df7e820938b 100755
--- a/board/freescale/common/imx/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -48,6 +48,10 @@ genimage_type()
echo "genimage.cfg.template_imx8"
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$" ${BR2_CONFIG}; then
echo "genimage.cfg.template_imx8"
+ elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" ${BR2_CONFIG}; then
+ echo "genimage.cfg.template_imx9"
+ elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y$" ${BR2_CONFIG}; then
+ echo "genimage.cfg.template_imx9"
elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then
if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
echo "genimage.cfg.template_no_boot_part_spl"
diff --git a/board/freescale/imx93evk/readme.txt b/board/freescale/imx93evk/readme.txt
new file mode 100644
index 000000000000..1173de39dbb1
--- /dev/null
+++ b/board/freescale/imx93evk/readme.txt
@@ -0,0 +1,77 @@
+*********************
+NXP i.MX93 EVK board
+*********************
+
+This file documents the Buildroot support for the i.MX 93 EVK board.
+
+Build
+=====
+
+First, configure Buildroot for the i.MX 93 EVK board:
+
+ make freescale_imx93evk_defconfig
+
+Build all components:
+
+ make
+
+You will find in output/images/ the following files:
+ - ahab-container.img
+ - bl31.bin
+ - boot.vfat
+ - ddr_fw.bin
+ - Image
+ - imx93-11x11-evk.dtb
+ - imx9-boot-sd.bin
+ - lpddr4_pmu_train_fw.bin
+ - rootfs.ext2
+ - rootfs.ext4
+ - rootfs.tar
+ - sdcard.img
+ - u-boot-atf-container.img
+ - u-boot.bin
+ - u-boot-hash.bin
+ - u-boot-spl.bin
+ - u-boot-spl-ddr.bin
+ - u-boot-spl-padded.bin
+
+Create a bootable SD card
+=========================
+
+To determine the device associated to the SD card have a look in the
+/proc/partitions file:
+
+ cat /proc/partitions
+
+Buildroot prepares a bootable "sdcard.img" image in the output/images/
+directory, ready to be dumped on a SD card. Launch the following
+command as root:
+
+ dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout, see the definition in
+board/freescale/common/imx/genimage.cfg.template_imx9.
+
+Boot the i.MX 93 EVK board
+===============================
+
+To boot your newly created system (refer to the i.MX 93 EVK Documentation
+[1] for guidance):
+- insert the SD card in the SD slot of the board;
+- Configure the switches as follows:
+SW1301: 0100 SW1301[1-4]
+- put a micro USB cable into the Debug USB Port and connect using a terminal
+ emulator at 115200 bps, 8n1;
+- power on the board.
+
+Note: the debug USB connector presents 4 UARTs (for example /dev/ttyUSB[0-3]),
+the Cortex-A55 UART should be the 3rd one (in the previous example, /dev/ttyUSB2).
+Refer to the documentation [1] for more details.
+
+Enjoy!
+
+References
+==========
+[1] https://www.nxp.com/document/guide/getting-started-with-the-i-mx93-evk:GS-IMX93EVK
diff --git a/configs/freescale_imx93evk_defconfig b/configs/freescale_imx93evk_defconfig
new file mode 100644
index 000000000000..34baf04c88db
--- /dev/null
+++ b/configs/freescale_imx93evk_defconfig
@@ -0,0 +1,39 @@
+BR2_aarch64=y
+BR2_cortex_a55=y
+BR2_ARM_FPU_VFPV4D16=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx9-bootloader-prepare.sh board/freescale/common/imx/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,linux-imx,lf-6.1.55-2.2.0)/linux-imx-lf-6.1.55-2.2.0.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v8"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx93-11x11-evk"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y
+BR2_PACKAGE_FIRMWARE_ELE_IMX=y
+BR2_PACKAGE_FIRMWARE_IMX=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,imx-atf,lf-6.1.55-2.2.0)/imx-atf-lf-6.1.55-2.2.0.tar.gz"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx93"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,uboot-imx,lf-6.1.55-2.2.0)/uboot-imx-lf-6.1.55-2.2.0.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx93_11x11_evk"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_GNUTLS=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_IMX_MKIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
--
2.41.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [Buildroot] [PATCH v3 3/3] configs/freescale_imx93evk: new defconfig
2024-01-09 17:26 ` [Buildroot] [PATCH v3 3/3] configs/freescale_imx93evk: new defconfig Sébastien Szymanski
@ 2024-01-10 22:07 ` Julien Olivain
0 siblings, 0 replies; 7+ messages in thread
From: Julien Olivain @ 2024-01-10 22:07 UTC (permalink / raw)
To: Sébastien Szymanski
Cc: Gary Bisson, Fabio Estevam, Refik Tuzakli, Thomas Petazzoni,
buildroot
Hi Sébastien, All,
Thanks for the update!
I successfully built this freescale_imx93evk_defconfig
and booted on the NXP i.MX93 EVK board, with the patch
series applied on branch master at commit ef0fa98.
On 09/01/2024 18:26, Sébastien Szymanski wrote:
> This patch adds support for the NXP i.MX 93 11x11 EVK board [1].
>
> [1]
> https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-93-evaluation-kit:i.MX93EVK
>
Reviewed-by: Julien Olivain <ju.o@free.fr>
Tested-by: Julien Olivain <ju.o@free.fr>
[Julien: tested on NXP board i.MX93EVK, cpu rev A1, board rev B]
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
> ---
>
> Changes for v3:
> - BR2_PACKAGE_FIRMWARE_SENTINEL=y -> BR2_PACKAGE_FIRMWARE_ELE_IMX=y
> - add a note about the debug UART in the readme.txt file (Julien
> Olivain)
> - add BR2_TARGET_UBOOT_NEEDS_OPENSSL=y and
> BR2_TARGET_UBOOT_NEEDS_GNUTLS=y to the defconfig file (Julien
> Olivain)
> - bump ATF, U-Boot and Linux to latest NXP release lf-6.1.55-2.2.0
> (Julien Olivain)
>
> Changes for v2:
> - none
>
> .../common/imx/genimage.cfg.template_imx9 | 41 ++++++++++
> .../common/imx/imx9-bootloader-prepare.sh | 34 ++++++++
> board/freescale/common/imx/post-image.sh | 4 +
> board/freescale/imx93evk/readme.txt | 77 +++++++++++++++++++
> configs/freescale_imx93evk_defconfig | 39 ++++++++++
> 5 files changed, 195 insertions(+)
> create mode 100644
> board/freescale/common/imx/genimage.cfg.template_imx9
> create mode 100755
> board/freescale/common/imx/imx9-bootloader-prepare.sh
> create mode 100644 board/freescale/imx93evk/readme.txt
> create mode 100644 configs/freescale_imx93evk_defconfig
>
> diff --git a/board/freescale/common/imx/genimage.cfg.template_imx9
> b/board/freescale/common/imx/genimage.cfg.template_imx9
> new file mode 100644
> index 000000000000..10e192ce5774
> --- /dev/null
> +++ b/board/freescale/common/imx/genimage.cfg.template_imx9
> @@ -0,0 +1,41 @@
> +# Minimal SD card image for the Freescale iMX9 boards
> +#
> +# We mimic the .sdcard Freescale's image format:
> +# * the SD card must have 32 kB free space at the beginning,
> +# * U-Boot is integrated into imx9-boot-sd.bin and is dumped as is,
> +# * a FAT partition at offset 8MB is containing Image and DTB files
> +# * a single root filesystem partition is required (ext2, ext3 or
> ext4)
> +#
> +
> +image boot.vfat {
> + vfat {
> + label = "boot"
> + files = {
> + %FILES%
> + }
> + }
> + size = 64M
> +}
> +
> +image sdcard.img {
> + hdimage {
> + }
> +
> + partition imx-boot {
> + in-partition-table = "no"
> + image = "imx9-boot-sd.bin"
> + offset = %IMXOFFSET%
> + }
> +
> + partition boot {
> + partition-type = 0xC
> + bootable = "true"
> + image = "boot.vfat"
> + offset = 8M
> + }
> +
> + partition rootfs {
> + partition-type = 0x83
> + image = "rootfs.ext2"
> + }
> +}
> diff --git a/board/freescale/common/imx/imx9-bootloader-prepare.sh
> b/board/freescale/common/imx/imx9-bootloader-prepare.sh
> new file mode 100755
> index 000000000000..4ff92fa4cd23
> --- /dev/null
> +++ b/board/freescale/common/imx/imx9-bootloader-prepare.sh
> @@ -0,0 +1,34 @@
> +#!/usr/bin/env bash
> +
> +main ()
> +{
> + SPL_LOAD_ADDR=0x2049A000
> + ATF_LOAD_ADDR=0x204E0000
> + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$"
> ${BR2_CONFIG}; then
> + SPL_LOAD_ADDR=0x204A0000
> + ATF_LOAD_ADDR=0x204C0000
> + fi
> +
> + dd if=${BINARIES_DIR}/u-boot-spl.bin
> of=${BINARIES_DIR}/u-boot-spl-padded.bin bs=4 conv=sync
> + cat ${BINARIES_DIR}/u-boot-spl-padded.bin ${BINARIES_DIR}/ddr_fw.bin
> > ${BINARIES_DIR}/u-boot-spl-ddr.bin
> +
> + ${HOST_DIR}/bin/mkimage_imx8 -commit > ${BINARIES_DIR}/mkimg.commit
> + cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit >
> ${BINARIES_DIR}/u-boot-hash.bin
> + rm -f ${BINARIES_DIR}/mkimg.commit
> +
> + if grep -Eq "^BR2_TARGET_OPTEE_OS=y$" ${BR2_CONFIG}; then
> + ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -c -ap
> ${BINARIES_DIR}/bl31.bin a35 ${ATF_LOAD_ADDR} -ap
> ${BINARIES_DIR}/u-boot-hash.bin a35 0x80200000 -ap
> ${BINARIES_DIR}/tee.bin a35 0x96000000 -out
> ${BINARIES_DIR}/u-boot-atf-container.img
> + else
> + ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -c -ap
> ${BINARIES_DIR}/bl31.bin a35 ${ATF_LOAD_ADDR} -ap
> ${BINARIES_DIR}/u-boot-hash.bin a35 0x80200000 -out
> ${BINARIES_DIR}/u-boot-atf-container.img
> + fi
> +
> + ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -append
> ${BINARIES_DIR}/ahab-container.img -c -ap
> ${BINARIES_DIR}/u-boot-spl-ddr.bin a35 ${SPL_LOAD_ADDR} -out
> ${BINARIES_DIR}/imx9-boot-sd.bin
> +
> + flashbin_size=$(wc -c ${BINARIES_DIR}/imx9-boot-sd.bin | awk '{print
> $1}')
> + pad_cnt=$(($((flashbin_size + 0x400 - 1)) / 0x400))
> + dd if=${BINARIES_DIR}/u-boot-atf-container.img
> of=${BINARIES_DIR}/imx9-boot-sd.bin bs=1K seek=${pad_cnt}
> +
> + exit $?
> +}
> +
> +main $@
> diff --git a/board/freescale/common/imx/post-image.sh
> b/board/freescale/common/imx/post-image.sh
> index c359ef6032a6..3df7e820938b 100755
> --- a/board/freescale/common/imx/post-image.sh
> +++ b/board/freescale/common/imx/post-image.sh
> @@ -48,6 +48,10 @@ genimage_type()
> echo "genimage.cfg.template_imx8"
> elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$"
> ${BR2_CONFIG}; then
> echo "genimage.cfg.template_imx8"
> + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$"
> ${BR2_CONFIG}; then
> + echo "genimage.cfg.template_imx9"
> + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y$"
> ${BR2_CONFIG}; then
> + echo "genimage.cfg.template_imx9"
> elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG};
> then
> if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
> echo "genimage.cfg.template_no_boot_part_spl"
> diff --git a/board/freescale/imx93evk/readme.txt
> b/board/freescale/imx93evk/readme.txt
> new file mode 100644
> index 000000000000..1173de39dbb1
> --- /dev/null
> +++ b/board/freescale/imx93evk/readme.txt
> @@ -0,0 +1,77 @@
> +*********************
> +NXP i.MX93 EVK board
> +*********************
> +
> +This file documents the Buildroot support for the i.MX 93 EVK board.
> +
> +Build
> +=====
> +
> +First, configure Buildroot for the i.MX 93 EVK board:
> +
> + make freescale_imx93evk_defconfig
> +
> +Build all components:
> +
> + make
> +
> +You will find in output/images/ the following files:
> + - ahab-container.img
> + - bl31.bin
> + - boot.vfat
> + - ddr_fw.bin
> + - Image
> + - imx93-11x11-evk.dtb
> + - imx9-boot-sd.bin
> + - lpddr4_pmu_train_fw.bin
> + - rootfs.ext2
> + - rootfs.ext4
> + - rootfs.tar
> + - sdcard.img
> + - u-boot-atf-container.img
> + - u-boot.bin
> + - u-boot-hash.bin
> + - u-boot-spl.bin
> + - u-boot-spl-ddr.bin
> + - u-boot-spl-padded.bin
> +
> +Create a bootable SD card
> +=========================
> +
> +To determine the device associated to the SD card have a look in the
> +/proc/partitions file:
> +
> + cat /proc/partitions
> +
> +Buildroot prepares a bootable "sdcard.img" image in the output/images/
> +directory, ready to be dumped on a SD card. Launch the following
> +command as root:
> +
> + dd if=output/images/sdcard.img of=/dev/<your-sd-device>
> +
> +*** WARNING! This will destroy all the card content. Use with care!
> ***
> +
> +For details about the medium image layout, see the definition in
> +board/freescale/common/imx/genimage.cfg.template_imx9.
> +
> +Boot the i.MX 93 EVK board
> +===============================
> +
> +To boot your newly created system (refer to the i.MX 93 EVK
> Documentation
> +[1] for guidance):
> +- insert the SD card in the SD slot of the board;
> +- Configure the switches as follows:
> +SW1301: 0100 SW1301[1-4]
> +- put a micro USB cable into the Debug USB Port and connect using a
> terminal
> + emulator at 115200 bps, 8n1;
> +- power on the board.
> +
> +Note: the debug USB connector presents 4 UARTs (for example
> /dev/ttyUSB[0-3]),
> +the Cortex-A55 UART should be the 3rd one (in the previous example,
> /dev/ttyUSB2).
> +Refer to the documentation [1] for more details.
> +
> +Enjoy!
> +
> +References
> +==========
> +[1]
> https://www.nxp.com/document/guide/getting-started-with-the-i-mx93-evk:GS-IMX93EVK
> diff --git a/configs/freescale_imx93evk_defconfig
> b/configs/freescale_imx93evk_defconfig
> new file mode 100644
> index 000000000000..34baf04c88db
> --- /dev/null
> +++ b/configs/freescale_imx93evk_defconfig
> @@ -0,0 +1,39 @@
> +BR2_aarch64=y
> +BR2_cortex_a55=y
> +BR2_ARM_FPU_VFPV4D16=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx9-bootloader-prepare.sh
> board/freescale/common/imx/post-image.sh"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
> +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call
> github,nxp-imx,linux-imx,lf-6.1.55-2.2.0)/linux-imx-lf-6.1.55-2.2.0.tar.gz"
> +BR2_LINUX_KERNEL_DEFCONFIG="imx_v8"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx93-11x11-evk"
> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +BR2_PACKAGE_FREESCALE_IMX=y
> +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y
> +BR2_PACKAGE_FIRMWARE_ELE_IMX=y
> +BR2_PACKAGE_FIRMWARE_IMX=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call
> github,nxp-imx,imx-atf,lf-6.1.55-2.2.0)/imx-atf-lf-6.1.55-2.2.0.tar.gz"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx93"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
> +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call
> github,nxp-imx,uboot-imx,lf-6.1.55-2.2.0)/uboot-imx-lf-6.1.55-2.2.0.tar.gz"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx93_11x11_evk"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
> +BR2_TARGET_UBOOT_NEEDS_GNUTLS=y
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_IMX_MKIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
> --
> 2.41.0
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread