diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-01-08 17:07:26 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-01-08 17:07:26 -0800 |
commit | 1d294cefde931ee0b0c0f012d04414b57c7b25cd (patch) | |
tree | 303de7296c44f360f008ef9b29f763d2c2477c2e | |
parent | 89cb8c3d0e97507cacaac429f3c3163a37561dcf (diff) | |
download | bootstub-1d294cefde931ee0b0c0f012d04414b57c7b25cd.tar.gz |
Don't rebuild the boot image every timeandroid-wear-n-preview-3android-wear-n-preview-2android-wear-n-preview-1android-wear-7.1.1_r1android-n-preview-5android-n-preview-4android-n-preview-3android-n-preview-2android-n-preview-1android-n-iot-preview-2nougat-mr1-wear-releasen-iot-preview-2
Fugu uses this for 2ndbootloader.bin, which is included in the boot and
recovery images. Since the size check destination never existed, it was
marked dirty and was re-run on every build. Change the size check to use
an empty file so that it's only run when the built image updates.
Change-Id: I0b1cef1ef0a825b1a1f89b0e90dda8706fbf7bf6
-rw-r--r-- | bootstub.mk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bootstub.mk b/bootstub.mk index 56adcfe..97df35d 100644 --- a/bootstub.mk +++ b/bootstub.mk @@ -44,17 +44,17 @@ $(LOCAL_BUILT_MODULE): $(all_objects) -o $(PRIVATE_ELF_FILE) $(hide) $(TARGET_OBJCOPY) -O binary -R .note -R .comment -S $(PRIVATE_ELF_FILE) $@ -# Then assemble the final bootstub file - -bootstub_full := $(PRODUCT_OUT)/$(BOOTSTUB_BINARY) -$(BOOTSTUB_BINARY)_CHECK_BOOTSTUB_SIZE : $(LOCAL_BUILT_MODULE) +$(LOCAL_BUILT_MODULE).size_check: $(LOCAL_BUILT_MODULE) $(hide) ACTUAL_SIZE=`$(call get-file-size,$<)`; \ if [ "$$ACTUAL_SIZE" -gt "$(BOOTSTUB_SIZE)" ]; then \ echo "$<: $$ACTUAL_SIZE exceeds size limit of $(BOOTSTUB_SIZE) bytes, aborting."; \ exit 1; \ fi + $(hide) touch $@ -$(bootstub_full) : $(LOCAL_BUILT_MODULE) $(BOOTSTUB_BINARY)_CHECK_BOOTSTUB_SIZE +# Then assemble the final bootstub file +bootstub_full := $(PRODUCT_OUT)/$(BOOTSTUB_BINARY) +$(bootstub_full) : $(LOCAL_BUILT_MODULE) $(LOCAL_BUILT_MODULE).size_check @echo "Generating bootstub: $@" $(hide) cat $< /dev/zero | dd bs=$(BOOTSTUB_SIZE) count=1 > $@ |