forked from TeamWin/android_device_samsung_ha3g
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootimg.mk
executable file
·29 lines (25 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
24
25
26
27
28
29
MKBOOTIMG := device/samsung/ha3g/mkbootimg
FLASH_IMAGE_TARGET ?= $(PRODUCT_OUT)/recovery.tar
BUILT_RAMDISK_CPIO := $(PRODUCT_OUT)/ramdisk-recovery.cpio
COMPRESS_COMMAND := xz --format=lzma --lzma1=dict=16MiB -9
ifdef TARGET_PREBUILT_DTB
BOARD_MKBOOTIMG_ARGS += --dt $(TARGET_PREBUILT_DTB)
endif
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
$(INSTALLED_RECOVERYIMAGE_TARGET): $(recovery_ramdisk)
@echo "------- Compressing recovery ramdisk -------"
$(hide) $(COMPRESS_COMMAND) "$(BUILT_RAMDISK_CPIO)"
@echo "------- Making recovery image -------"
$(hide) $(MKBOOTIMG) \
--kernel $(TARGET_PREBUILT_KERNEL) \
--ramdisk $(BUILT_RAMDISK_CPIO).lzma \
--cmdline "$(BOARD_KERNEL_CMDLINE)" \
--base $(BOARD_KERNEL_BASE) \
--pagesize $(BOARD_KERNEL_PAGESIZE) \
$(BOARD_MKBOOTIMG_ARGS) \
-o $(INSTALLED_RECOVERYIMAGE_TARGET)
@echo "------- Made recovery image: $@ -------"
$(hide) echo -n "SEANDROIDENFORCE" >> $(INSTALLED_RECOVERYIMAGE_TARGET)
@echo "------- Lied about SEAndroid state to Samsung bootloader -------"
$(hide) tar -C $(PRODUCT_OUT) -H ustar -c recovery.img > $(FLASH_IMAGE_TARGET)
@echo "------- Made flashable image: $(FLASH_IMAGE_TARGET) -------"