Skip to content

Commit

Permalink
tasks: dt: add flag to optionally compress dt with lz4
Browse files Browse the repository at this point in the history
* Gotta save that space somehow. This is in the continuing
  effort to remove custom mkbootimg.mk files in device trees

Change-Id: Ie8b3cedf6e37d1d11c2383dd3590f9908ad7818c
  • Loading branch information
invisiblek authored and LorDClockaN committed Feb 11, 2017
1 parent df89413 commit 36fbc6b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/tasks/dt_image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ define build-dtimage-target
$(hide) chmod a+r $@
endef

ifeq ($(strip $(BOARD_KERNEL_LZ4C_DT)),true)
LZ4_DT_IMAGE := $(PRODUCT_OUT)/dt-lz4.img
endif

$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(INSTALLED_KERNEL_TARGET)
$(build-dtimage-target)
ifeq ($(strip $(BOARD_KERNEL_LZ4C_DT)),true)
lz4 -9 < $@ > $(LZ4_DT_IMAGE) || lz4c -c1 -y $@ $(LZ4_DT_IMAGE)
$(hide) $(ACP) $(LZ4_DT_IMAGE) $@
endif
@echo "Made DT image: $@"

ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DTIMAGE_TARGET)
Expand Down

0 comments on commit 36fbc6b

Please sign in to comment.