imx8mm-cl-iot-gate: Split the defconfigs
Subsystems (3)
PATCH v2 1/1 imx8mm-cl-iot-gate: Split the defconfigs
Currently imx8mm-cl-iot-gate_defconfig fails to produce a working boot binary due to the lack of fip.bin:
BINMAN all
Image 'main-section' is missing external blobs and is non-functional: blob-ext
Some images are invalid
To make the build process more consistent with the other i.MX8M targets, split the defconfig in two:
- imx8mm-cl-iot-gate_defconfig: standard defconfig that only requires ATF / DDR firmware.
- imx8mm-cl-iot-gate-optee_defconfig: "more advanced" defconfig that requires ATF / Optee / mbedtls / DDR firmware.
---
Changes since v1:
- Fix typo in commit log
- Add an entry in MAINTAINERS
arch/arm/dts/Makefile | 2 + .../dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 255 ++++++++++++++++++ arch/arm/dts/imx8mm-cl-iot-gate-optee.dts | 6 + arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 14 +- arch/arm/mach-imx/imx8m/Kconfig | 7 + board/compulab/imx8mm-cl-iot-gate/Kconfig | 2 +- board/compulab/imx8mm-cl-iot-gate/MAINTAINERS | 1 + configs/imx8mm-cl-iot-gate-optee_defconfig | 147 ++++++++++ 8 files changed, 420 insertions(+), 14 deletions(-) create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-optee.dts create mode 100644 configs/imx8mm-cl-iot-gate-optee_defconfig
arch/arm/dts/Makefile +2 -0
@@ -1127,6 +1127,8 @@ dtb-$(CONFIG_TARGET_PRESIDIO_ASIC) += ca-presidio-engboard.dtb dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) += imx8mm-cl-iot-gate.dtb +dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE_OPTEE) += imx8mm-cl-iot-gate-optee.dtb + dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb targets += $(dtb-y)
arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi new file +255 -0
255 lines not on this page · raw message
arch/arm/dts/imx8mm-cl-iot-gate-optee.dts new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2019 NXP + */ + +#include "imx8mm-cl-iot-gate.dts"
arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +1 -13
@@ -217,18 +217,6 @@ }; }; - fip { - description = "Trusted Firmware FIP"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - load = <0x40310000>; - - fip_blob: blob-ext{ - filename = "fip.bin"; - }; - }; - fdt { description = "NAME"; type = "flat_dt";
@@ -246,7 +234,7 @@ conf { description = "NAME"; firmware = "uboot"; - loadables = "atf", "fip"; + loadables = "atf"; fdt = "fdt"; }; };
arch/arm/mach-imx/imx8m/Kconfig +7 -0
@@ -138,6 +138,13 @@ config TARGET_IMX8MM_CL_IOT_GATE select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4 + +config TARGET_IMX8MM_CL_IOT_GATE_OPTEE + bool "CompuLab iot-gate-imx8 with optee support" + select BINMAN + select IMX8MM + select SUPPORT_SPL + select IMX8M_LPDDR4 endchoice source "board/beacon/imx8mm/Kconfig"
board/compulab/imx8mm-cl-iot-gate/Kconfig +1 -1
@@ -1,4 +1,4 @@ -if TARGET_IMX8MM_CL_IOT_GATE +if TARGET_IMX8MM_CL_IOT_GATE || TARGET_IMX8MM_CL_IOT_GATE_OPTEE config SYS_BOARD default "imx8mm-cl-iot-gate"
board/compulab/imx8mm-cl-iot-gate/MAINTAINERS +1 -0
@@ -4,3 +4,4 @@ S: Maintained F: board/compulab/imx8mm-cl-iot-gate/ F: include/configs/imx8mm-cl-iot-gate.h F: configs/imx8mm-cl-iot-gate_defconfig +F: configs/imx8mm-cl-iot-gate-optee_defconfig
configs/imx8mm-cl-iot-gate-optee_defconfig new file +147 -0
147 lines not on this page · raw message
Signature · 1 line
2.25.1
Fabio Estevam
reviewerHi Paul,
Quoted 15 lines · Fabio Estevam
Currently imx8mm-cl-iot-gate_defconfig fails to produce a working boot binary due to the lack of fip.bin:
BINMAN all
Image 'main-section' is missing external blobs and is non-functional: blob-extSome images are invalid
To make the build process more consistent with the other i.MX8M targets, split the defconfig in two:
- imx8mm-cl-iot-gate_defconfig: standard defconfig that only requires ATF / DDR firmware.
Quoted 8 lines
- imx8mm-cl-iot-gate-optee_defconfig: "more advanced" defconfig that requires ATF / Optee / mbedtls / DDR firmware.
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Fix typo in commit log
- Add an entry inMAINTAINERS
If you apply your series that fixes the RAM size, does this patch work for you?
Thanks,
Fabio Estevam
Hi Fabio,
Yes. This patch works for me after fixing the top address.
I have another little comment on the name of bl31.bin as following.
arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi new file +178 -0
@@ -0,0 +1,255 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2019 NXP + */ + +/ { + binman: binman { + multiple-images; + }; + + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog1>; + u-boot,dm-spl; + }; + + firmware { + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; +}; + +&{/soc@0} { + u-boot,dm-pre-reloc; + u-boot,dm-spl; +}; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-parents; + /delete-property/ assigned-clock-rates; +}; + +&osc_24m { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips1 { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips2 { + u-boot,dm-spl; +}; + +&aips3 { + u-boot,dm-spl; +}; + +&iomuxc { + u-boot,dm-spl; +}; + +&pinctrl_uart3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2_gpio { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +}; + +&gpio1 { + u-boot,dm-spl; +}; + +&gpio2 { + u-boot,dm-spl; +}; + +&gpio3 { + u-boot,dm-spl; +}; + +&gpio4 { + u-boot,dm-spl; +}; + +&gpio5 { + u-boot,dm-spl; +}; + +&uart3 { + u-boot,dm-spl; +}; + +&usdhc1 { + u-boot,dm-spl; +}; + +&usdhc2 { + u-boot,dm-spl; +}; + +&usdhc3 { + u-boot,dm-spl; +}; + +&i2c1 { + u-boot,dm-spl; +}; + +&i2c2 { + u-boot,dm-spl; +}; + +&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { + u-boot,dm-spl; +}; + +&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} { + u-boot,dm-spl; +}; + +&pinctrl_i2c2 { + u-boot,dm-spl; +}; + +&pinctrl_pmic { + u-boot,dm-spl; +}; + +&fec1 { + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; +}; + +&wdog1 { + u-boot,dm-spl; +}; + +&binman { + u-boot-spl-ddr { + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + align-size = <4>; + align = <4>; + + u-boot-spl { + align-end = <4>; + }; + + blob_1: blob-ext@1 { + filename = "lpddr4_pmu_train_1d_imem.bin"; + size = <0x8000>; + }; + + blob_2: blob-ext@2 { + filename = "lpddr4_pmu_train_1d_dmem.bin"; + size = <0x4000>; + }; + + blob_3: blob-ext@3 { + filename = "lpddr4_pmu_train_2d_imem.bin"; + size = <0x8000>; + }; + + blob_4: blob-ext@4 { + filename = "lpddr4_pmu_train_2d_dmem.bin"; + size = <0x4000>; + }; + }; + + flash { + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e
0x7e1000";
+
+ blob {
+ filename = "u-boot-spl-ddr.bin";
+ };
+ };
+ };
+
+ itb {
+ filename = "u-boot.itb";
+
+ fit {
+ description = "Configuration to load ATF before
U-Boot";
+ #address-cells = <1>;
+ fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
+
+ images {
+ uboot {
+ description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SYS_TEXT_BASE>;
+
+ uboot_blob: blob-ext {
+ filename =
"u-boot-nodtb.bin";
+ };
+ };
+
+ atf {
+ description = "ARM Trusted
Firmware";
+ type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <0x920000>; + entry = <0x920000>;
+
+ atf_blob: blob-ext {
+ filename = "bl31.bin";
I think we can call it bl2.bin now because now the dts is separated. So in this defconfig we don't need to take care the name compatibility of the non-optee defconfig.
+ };
+ };
And I'll write a document after your commits gets in to describe the detailed build steps. With Tom's corrections.
Yours,
Paul
Quoted 35 lines · Fabio Estevam
Hi Paul,
Quoted 6 lines · Fabio Estevam
Currently imx8mm-cl-iot-gate_defconfig fails to produce a working boot binary due to the lack of fip.bin:
BINMAN all
Image 'main-section' is missing external blobs and is non-functional:blob-ext
Quoted 9 lines
Some images are invalid
To make the build process more consistent with the other i.MX8M targets, split the defconfig in two:
- imx8mm-cl-iot-gate_defconfig: standard defconfig that only requires ATF / DDR firmware.
Quoted 8 lines
- imx8mm-cl-iot-gate-optee_defconfig: "more advanced" defconfig that requires ATF / Optee / mbedtls / DDR firmware.
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Fix typo in commit log
- Add an entry inMAINTAINERSIf you apply your series that fixes the RAM size, does this patch work for you?
Thanks,
Fabio Estevam