-
Notifications
You must be signed in to change notification settings - Fork 6
/
bootimg.mk
23 lines (20 loc) · 1.17 KB
/
bootimg.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
MKBOOTIMG := device/samsung/a31/mkbootimg
FLASH_IMAGE_TARGET ?= $(PRODUCT_OUT)/recovery.tar
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOTIMAGE_EXTRA_DEPS)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
$(hide) echo -n "SEANDROIDENFORCE" >> $@
@echo "Made boot image: $@"
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(recovery_ramdisk) $(recovery_kernel) $(RECOVERYIMAGE_EXTRA_DEPS)
@echo "----- Making recovery image ------"
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
@echo "----- Lying about SEAndroid state to Samsung bootloader ------"
$(hide) echo -n "SEANDROIDENFORCE" >> $@
$(hide) $(AVBTOOL) add_hash_footer \
--image $@ \
--partition_size $(BOARD_RECOVERYIMAGE_PARTITION_SIZE) \
--partition_name recovery $(INTERNAL_AVB_RECOVERY_SIGNING_ARGS) \
$(BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS)
@echo "Made recovery image: $@"
$(hide) tar -C $(PRODUCT_OUT) -c recovery.img > $(FLASH_IMAGE_TARGET)
@echo "Made flashable $(FLASH_IMAGE_TARGET): $@"