From: Petr Hodina <[email protected]>

Adds FIT_FDT_COMP alongside the existing FIT_UBOOT_COMP gated on
CONFIG_SPL_LZMA only. Applies it to the @fdt-SEQ template's compression
property.

Signed-off-by: Petr Hodina <[email protected]>
---
 arch/arm/dts/rockchip-u-boot.dtsi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/rockchip-u-boot.dtsi 
b/arch/arm/dts/rockchip-u-boot.dtsi
index 4ba6a87e78a..ed082212446 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -19,6 +19,12 @@
 #define FIT_UBOOT_COMP         "none"
 #endif
 
+#if defined(CONFIG_SPL_LZMA)
+#define FIT_FDT_COMP           "lzma"
+#else
+#define FIT_FDT_COMP           "none"
+#endif
+
 /*
  * SHA256 should be enabled in SPL when signature validation is involved,
  * CRC32 should only be used for basic checksum validation of FIT images.
@@ -136,7 +142,7 @@
 
                        @fdt-SEQ {
                                description = "fdt-NAME";
-                               compression = "none";
+                               compression = FIT_FDT_COMP;
                                type = "flat_dt";
 #ifdef FIT_HASH_ALGO
                                hash {

-- 
2.55.0


Reply via email to