diff options
author | Sylvain Chouleur <sylvain.chouleur@intel.com> | 2014-08-20 06:35:07 +0200 |
---|---|---|
committer | Pat Tjin <pattjin@google.com> | 2014-08-23 06:54:52 +0000 |
commit | 310c3573727069755c3610939555aab5b4689759 (patch) | |
tree | 15116c5a5af4728f12ec0982a7dae176a2123084 | |
parent | 36612706911843b4b900f8760003a8cc728d39d3 (diff) | |
download | bootstub-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.mk | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) |