diff mbox series

arm64: zynqmp: enable u-boot itb generation via binman if SPL is enabled

Message ID 7cba738ae36dacf7d1b0cfbaf13e0c9b3a0df225.1737462296.git.michal.simek@amd.com
State Accepted
Commit 0184f3eead8e7454b077ac92148b47d180b01a1e
Delegated to: Michal Simek
Headers show
Series arm64: zynqmp: enable u-boot itb generation via binman if SPL is enabled | expand

Commit Message

Michal Simek Jan. 21, 2025, 12:24 p.m. UTC
From: Prasad Kummari <prasad.kummari@amd.com>

Output images are generated via Binman only if SPL is enabled, as
there is no consumer for them otherwise. An #ifdef check ensures that
when SPL is enabled, Binman generates the U-Boot ITB. If SPL is disabled,
ITB generation is skipped since the ITB format is supported only by SPL.
Without SPL, generating such an image is unnecessary, as it would not be
used

The second reason is that when a DTB is passed, the current logic cannot
handle it without an additional step in U-Boot to parse an appended FIT
image and enable board-specific code to select the correct DTB config.
The MULTI_DTB_FIT configuration should be used if support for multiple
DTBs is required, but SPL is not being used.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
---

 arch/arm/dts/zynqmp-binman-som.dts | 3 +++
 arch/arm/dts/zynqmp-binman.dts     | 2 ++
 2 files changed, 5 insertions(+)

Comments

Michal Simek Feb. 3, 2025, 9:09 a.m. UTC | #1
On 1/21/25 13:24, Michal Simek wrote:
> From: Prasad Kummari <prasad.kummari@amd.com>
> 
> Output images are generated via Binman only if SPL is enabled, as
> there is no consumer for them otherwise. An #ifdef check ensures that
> when SPL is enabled, Binman generates the U-Boot ITB. If SPL is disabled,
> ITB generation is skipped since the ITB format is supported only by SPL.
> Without SPL, generating such an image is unnecessary, as it would not be
> used
> 
> The second reason is that when a DTB is passed, the current logic cannot
> handle it without an additional step in U-Boot to parse an appended FIT
> image and enable board-specific code to select the correct DTB config.
> The MULTI_DTB_FIT configuration should be used if support for multiple
> DTBs is required, but SPL is not being used.
> 
> Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
> 
>   arch/arm/dts/zynqmp-binman-som.dts | 3 +++
>   arch/arm/dts/zynqmp-binman.dts     | 2 ++
>   2 files changed, 5 insertions(+)
> 
> diff --git a/arch/arm/dts/zynqmp-binman-som.dts b/arch/arm/dts/zynqmp-binman-som.dts
> index 3d9d8476c98e..3ffa06f0c04f 100644
> --- a/arch/arm/dts/zynqmp-binman-som.dts
> +++ b/arch/arm/dts/zynqmp-binman-som.dts
> @@ -13,6 +13,8 @@
>   / {
>   	binman: binman {
>   		multiple-images;
> +
> +#ifdef CONFIG_SPL
>   		fit-dtb.blob {
>   			filename = "fit-dtb.blob";
>   			pad-byte = <0>;
> @@ -220,6 +222,7 @@
>   			fdtmap {
>   			};
>   		};
> +#endif
>   #endif
>   	};
>   };
> diff --git a/arch/arm/dts/zynqmp-binman.dts b/arch/arm/dts/zynqmp-binman.dts
> index 675f6bf51ebd..bf3335a3e539 100644
> --- a/arch/arm/dts/zynqmp-binman.dts
> +++ b/arch/arm/dts/zynqmp-binman.dts
> @@ -14,6 +14,7 @@
>   	binman: binman {
>   		multiple-images;
>   
> +#ifdef CONFIG_SPL
>   		/* u-boot.itb generation in a static way */
>   		itb {
>   			filename = "u-boot.itb";
> @@ -201,6 +202,7 @@
>   			fdtmap {
>   			};
>   		};
> +#endif
>   #endif
>   	};
>   };

Applied.
M
diff mbox series

Patch

diff --git a/arch/arm/dts/zynqmp-binman-som.dts b/arch/arm/dts/zynqmp-binman-som.dts
index 3d9d8476c98e..3ffa06f0c04f 100644
--- a/arch/arm/dts/zynqmp-binman-som.dts
+++ b/arch/arm/dts/zynqmp-binman-som.dts
@@ -13,6 +13,8 @@ 
 / {
 	binman: binman {
 		multiple-images;
+
+#ifdef CONFIG_SPL
 		fit-dtb.blob {
 			filename = "fit-dtb.blob";
 			pad-byte = <0>;
@@ -220,6 +222,7 @@ 
 			fdtmap {
 			};
 		};
+#endif
 #endif
 	};
 };
diff --git a/arch/arm/dts/zynqmp-binman.dts b/arch/arm/dts/zynqmp-binman.dts
index 675f6bf51ebd..bf3335a3e539 100644
--- a/arch/arm/dts/zynqmp-binman.dts
+++ b/arch/arm/dts/zynqmp-binman.dts
@@ -14,6 +14,7 @@ 
 	binman: binman {
 		multiple-images;
 
+#ifdef CONFIG_SPL
 		/* u-boot.itb generation in a static way */
 		itb {
 			filename = "u-boot.itb";
@@ -201,6 +202,7 @@ 
 			fdtmap {
 			};
 		};
+#endif
 #endif
 	};
 };