Message ID | 20221102155655.5296-9-oliver.graute@kococonnector.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [v1] imx: imx8: apalis: switch to binman | expand |
On Wed, Nov 2, 2022 at 12:59 PM Oliver Graute <oliver.graute@kococonnector.com> wrote: Please add a commit log. > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> > +&binman { > + > + itb { > + filename = "u-boot.itb"; > + > + fit { > + description = "Configuration to load ATF before U-Boot"; > + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; Can't all boards use the common the binman nodes from arch/arm/dts/imx8qm-u-boot.dtsi instead?
On 02/11/22, Fabio Estevam wrote: > On Wed, Nov 2, 2022 at 12:59 PM Oliver Graute > <oliver.graute@kococonnector.com> wrote: > > Please add a commit log. ok > > > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> > > > +&binman { > > + > > + itb { > > + filename = "u-boot.itb"; > > + > > + fit { > > + description = "Configuration to load ATF before U-Boot"; > > + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; > > Can't all boards use the common the binman nodes from > arch/arm/dts/imx8qm-u-boot.dtsi instead? I'am about to try that but I run into the following error: binman: Filename 'spl/u-boot-spl.bin' not found in input path (.,.,./board/toradex/apalis-imx8,arch/arm/dts) (cwd='/home/graute/u-boot-upstream') Makefile:1109: recipe for target 'all' failed make: *** [all] Error 1 The error disappear if I remove binman/u-boot-spl-ddr and binman/spl node in the common file. So some of these boards needs the binman/u-boot-spl-ddr and binman/spl node and others not. What is the proper solution to deal with this difference here? Best regards, Oliver
Hi Oliver, On Fri, Nov 4, 2022 at 9:39 AM Oliver Graute <oliver.graute@gmail.com> wrote: > > Can't all boards use the common the binman nodes from > > arch/arm/dts/imx8qm-u-boot.dtsi instead? > > I'am about to try that but I run into the following error: > > binman: Filename 'spl/u-boot-spl.bin' not found in input path (.,.,./board/toradex/apalis-imx8,arch/arm/dts) (cwd='/home/graute/u-boot-upstream') > Makefile:1109: recipe for target 'all' failed > make: *** [all] Error 1 > > The error disappear if I remove binman/u-boot-spl-ddr and binman/spl > node in the common file. > > So some of these boards needs the binman/u-boot-spl-ddr and binman/spl > node and others not. What is the proper solution to deal with this > difference here? Looking inside configs/apalis-imx8_defconfig, I see it does not use SPL. That's why 'spl/u-boot-spl.bin' is not present. I think you should protect the binman/u-boot-spl-ddr and binman/spl nodes by adding #ifdef CONFIG_SPL.
On 04/11/22, Oliver Graute wrote: > On 02/11/22, Fabio Estevam wrote: > > On Wed, Nov 2, 2022 at 12:59 PM Oliver Graute > > <oliver.graute@kococonnector.com> wrote: > > > > Please add a commit log. > > ok > > > > > > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> > > > > > +&binman { > > > + > > > + itb { > > > + filename = "u-boot.itb"; > > > + > > > + fit { > > > + description = "Configuration to load ATF before U-Boot"; > > > + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; > > > > Can't all boards use the common the binman nodes from > > arch/arm/dts/imx8qm-u-boot.dtsi instead? > > I'am about to try that but I run into the following error: > > binman: Filename 'spl/u-boot-spl.bin' not found in input path (.,.,./board/toradex/apalis-imx8,arch/arm/dts) (cwd='/home/graute/u-boot-upstream') > Makefile:1109: recipe for target 'all' failed > make: *** [all] Error 1 > > The error disappear if I remove binman/u-boot-spl-ddr and binman/spl > node in the common file. > > So some of these boards needs the binman/u-boot-spl-ddr and binman/spl > node and others not. What is the proper solution to deal with this > difference here? according to this commit there are indeed different requirements: commit 8e0d963b19adfb98e8c7c941f44e0f36e9f91303 Author: Peng Fan <peng.fan@nxp.com> Date: Fri Dec 21 06:21:26 2018 +0000 dts: imx8qxp-mek: introduce u-boot dtsi Introduce u-boot dtsi for i.MX8QXP MEK board. we do not introduce a common dtsi for SoC, because different board has different requirement on which needs to be enabled in SPL DM. So any proposal? Best regards, Oliver
On 04/11/22, Fabio Estevam wrote: > Hi Oliver, > > On Fri, Nov 4, 2022 at 9:39 AM Oliver Graute <oliver.graute@gmail.com> wrote: > > > > Can't all boards use the common the binman nodes from > > > arch/arm/dts/imx8qm-u-boot.dtsi instead? > > > > I'am about to try that but I run into the following error: > > > > binman: Filename 'spl/u-boot-spl.bin' not found in input path (.,.,./board/toradex/apalis-imx8,arch/arm/dts) (cwd='/home/graute/u-boot-upstream') > > Makefile:1109: recipe for target 'all' failed > > make: *** [all] Error 1 > > > > The error disappear if I remove binman/u-boot-spl-ddr and binman/spl > > node in the common file. > > > > So some of these boards needs the binman/u-boot-spl-ddr and binman/spl > > node and others not. What is the proper solution to deal with this > > difference here? > > Looking inside configs/apalis-imx8_defconfig, I see it does not use > SPL. That's why 'spl/u-boot-spl.bin' is not present. > > I think you should protect the binman/u-boot-spl-ddr and binman/spl > nodes by adding #ifdef CONFIG_SPL. ok thx Best Regards, Oliver
diff --git a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi index 956d724979..587b6496a9 100644 --- a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi @@ -3,6 +3,110 @@ * Copyright 2019 Toradex AG */ +/ { + binman: binman { + multiple-images; + }; +}; + +&binman { + + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load ATF before U-Boot"; + fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; + fit,fdt-list = "of-list"; + #address-cells = <1>; + + images { + uboot { + arch = "arm64"; + compression = "none"; + description = "U-Boot (64-bit)"; + load = <CONFIG_SYS_TEXT_BASE>; + type = "standalone"; + + uboot-blob { + filename = "u-boot-nodtb.bin"; + type = "blob-ext"; + }; + }; + + atf { + arch = "arm64"; + compression = "none"; + description = "ARM Trusted Firmware"; + entry = <0x00910000>; + load = <0x00091000>; + type = "firmware"; + + atf-blob { + filename = "bl31.bin"; + type = "atf-bl31"; + }; + }; + + scfw { + arch = "arm64"; + compression = "none"; + description = "System Controler Firmware"; + type = "firmware"; + + scfw_blob { + filename = "mx8qm-apalis-scfw-tcm.bin"; + type = "blob-ext"; + }; + }; + + seco { + arch = "arm64"; + compression = "none"; + description = "Seco Firmware"; + type = "firmware"; + + seco_blob { + filename = "ahab-container.img"; + type = "blob-ext"; + }; + }; + + fdt { + type = "flat_dt"; + compression = "none"; + + uboot-fdt-blob { + filename = "u-boot.dtb"; + type = "blob-ext"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + fdt = "fdt"; + firmware = "uboot"; + loadables = "atf"; + }; + }; + }; + }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl { + filename = "spl.bin"; + offset = <0x0>; + type = "blob-ext"; + }; + }; +}; + &mu { u-boot,dm-pre-proper; }; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 37d12d1895..91bd888308 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -46,6 +46,7 @@ choice config TARGET_APALIS_IMX8 bool "Support Apalis iMX8 module" + select BINMAN select BOARD_LATE_INIT select IMX8QM diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig index 32e105a557..0c331b62cb 100644 --- a/configs/apalis-imx8_defconfig +++ b/configs/apalis-imx8_defconfig @@ -17,6 +17,7 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_LOG=y
Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> --- arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi | 104 +++++++++++++++++++++ arch/arm/mach-imx/imx8/Kconfig | 1 + configs/apalis-imx8_defconfig | 1 + 3 files changed, 106 insertions(+)