forked from Hashcode/android_device_amazon_hdx-common
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mkboot.mk
34 lines (30 loc) · 1.88 KB
/
mkboot.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
30
31
32
33
34
LOCAL_PATH := $(call my-dir)
## Build and run dtbtool
DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX)
INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img
LZMA := $(shell which lzma)
$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET)
@echo -e ${CL_CYN}"Start DT image: $@"${CL_RST}
$(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)")
$(hide) $(DTBTOOL) -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/
@echo -e ${CL_CYN}"Made DT image: $@"${CL_RST}
# Hacked boot image
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET)
@echo -e ${CL_CYN}"Building hdx hacked boot image: $@"${CL_RST}
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(COMMON_FOLDER)/pyCuber/pyCuber.sh $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made hdx hacked boot image: $@"${CL_RST}
# Hacked recovery image
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \
$(recovery_uncompressed_ramdisk) \
$(recovery_kernel)
@echo -e ${CL_CYN}"Building hdx hacked recovery image: $@"${CL_RST}
$(hide) rm -f $(OUT)/ramdisk-recovery.cpio.lzma
@echo -e ${CL_CYN}"Compressing recovery ramdisk..."${CL_RST}
$(hide) $(LZMA) -z -9 $(recovery_uncompressed_ramdisk)
$(hide) cp $(recovery_uncompressed_ramdisk).lzma $(recovery_ramdisk)
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(COMMON_FOLDER)/pyCuber/pyCuber.sh $@
#$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made hdx hacked recovery image: $@"${CL_RST}