summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/dts/Makefile2
-rw-r--r--arch/mips/dts/Makefile2
-rw-r--r--scripts/Makefile.build4
-rw-r--r--scripts/Makefile.lib5
-rwxr-xr-xscripts/gen-dtb-s8
5 files changed, 10 insertions, 11 deletions
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 0c7e43e226..980a2487a0 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -198,4 +198,4 @@ lwl-$(CONFIG_MACH_TQMLS1046A) += fsl-tqmls1046a-mbls10xxa.dtb.o
lwl-$(CONFIG_MACH_ZEDBOARD) += zynq-zed.dtb.o
lwl-$(CONFIG_MACH_MNT_REFORM) += imx8mq-mnt-reform2.dtb.o
-clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo
+clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.z
diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile
index e4cc3b44a5..d99c4c6358 100644
--- a/arch/mips/dts/Makefile
+++ b/arch/mips/dts/Makefile
@@ -18,4 +18,4 @@ pbl-$(CONFIG_BOARD_RZX50) += rzx50.dtb.o
pbl-$(CONFIG_BOARD_TPLINK_MR3020) += ar9331_tl_mr3020.dtb.o
pbl-$(CONFIG_BOARD_TPLINK_WDR4300) += ar9344-tl-wdr4300-v1.7.dtb.o
-clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo
+clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.z
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 1614a1ac58..216f03677b 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -262,8 +262,8 @@ intermediate_targets = $(foreach sfx, $(2), \
# %.lex.o <- %.lex.c <- %.l
# %.tab.o <- %.tab.[ch] <- %.y
targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
- $(call intermediate_targets, .dtb.o, .dtb.S .dtb) \
- $(call intermediate_targets, .dtb.pbl.o, .dtb.S .dtb) \
+ $(call intermediate_targets, .dtb.o, .dtb.S .dtb.z .dtb) \
+ $(call intermediate_targets, .dtb.pbl.o, .dtb.S .dtb.z .dtb) \
$(call intermediate_targets, .lex.o, .lex.c) \
$(call intermediate_targets, .tab.o, .tab.c .tab.h)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index a830364a8b..c2301b5370 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -333,9 +333,12 @@ endif
# Generate an assembly file to wrap the output of the device tree compiler
quiet_cmd_dt_S_dtb = DTB $@
cmd_dt_S_dtb = $(srctree)/scripts/gen-dtb-s $(subst -,_,$(*F)) $< $(CONFIG_IMD) > $@
-$(obj)/%.dtb.S: $(obj)/%.dtb $(srctree)/scripts/gen-dtb-s FORCE
+$(obj)/%.dtb.S: $(obj)/%.dtb $(obj)/%.dtb.z $(srctree)/scripts/gen-dtb-s FORCE
$(call if_changed,dt_S_dtb)
+$(obj)/%.dtb.z: $(obj)/%.dtb FORCE
+ $(call if_changed,lzo)
+
dts-frags = $(subst $(quote),,$(CONFIG_EXTERNAL_DTS_FRAGMENTS))
quiet_cmd_dtc = DTC $@
# For compatibility between make 4.2 and 4.3
diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index 868d434664..eadf4d76f3 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -51,11 +51,7 @@ echo "__dtb_${name}_end:"
echo ".global __dtb_${name}_end"
echo ".balign STRUCT_ALIGNMENT"
-lzop -f -9 $dtb -o $dtb.lzo
-if [ $? != 0 ]; then
- exit 1
-fi
-compressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb.lzo)
+compressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb.z)
uncompressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb)
echo "#if defined(CONFIG_USE_COMPRESSED_DTB) && defined(__PBL__)"
@@ -66,7 +62,7 @@ echo "__dtb_z_${name}_start:"
printf ".int 0x%08x\n" 0x7b66bcbd
printf ".int 0x%08x\n" $compressed
printf ".int 0x%08x\n" $uncompressed
-echo ".incbin \"$dtb.lzo\""
+echo ".incbin \"$dtb.z\""
echo "__dtb_z_${name}_end:"
echo ".global __dtb_z_${name}_end"
echo ".balign STRUCT_ALIGNMENT"