summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Chouleur <sylvain.chouleur@intel.com>2014-08-20 06:35:07 +0200
committerPat Tjin <pattjin@google.com>2014-08-23 06:54:52 +0000
commit310c3573727069755c3610939555aab5b4689759 (patch)
tree15116c5a5af4728f12ec0982a7dae176a2123084
parent36612706911843b4b900f8760003a8cc728d39d3 (diff)
downloadbootstub-310c3573727069755c3610939555aab5b4689759.tar.gz
Add Bootloader version at the end of bootstub
Bug: 17034982 Change-Id: Iec8e0a08842b0fcc5dcdf461ade13cc236d1f6e9 Signed-off-by: Sylvain Chouleur <sylvain.chouleur@intel.com>
-rw-r--r--Android.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 8a70a83..29252eb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -99,9 +99,12 @@ CHECK_BOOTSTUB_AOSP_SIZE : $(bootstub_aosp_bin)
echo "$(bootstub_aosp_bin): $$ACTUAL_SIZE exceeds size limit of $(BOOTSTUB_SIZE) bytes, aborting."; \
exit 1; \
fi
-
-$(bootstub_aosp_full) : CHECK_BOOTSTUB_AOSP_SIZE
+BL_VERSION_FILE=vendor/asus/fugu/bootloader.img.sha1
+$(bootstub_aosp_full) : CHECK_BOOTSTUB_AOSP_SIZE $(BL_VERSION_FILE)
@echo "Generating bootstub $@"
$(hide) cat $(bootstub_aosp_bin) /dev/zero | dd bs=$(BOOTSTUB_SIZE) count=1 > $@
+ export bl_version=`tail -n 1 $(BL_VERSION_FILE) | cut -d- -f2`; \
+ export maj=`echo $$bl_version | cut -d. -f1`; export min=`echo $$bl_version | cut -d. -f2`; \
+ echo -en \\x$$maj\\x$$((min+1)) | dd of=$@ seek=$$(($(BOOTSTUB_SIZE)-2)) bs=1
endif #($(TARGET_BOARD_PLATFORM),moorefield)