blob: a17a1398ccb4311a55146e38e4c48c41379ccbec [file] [log] [blame]
Vincent Zvikarambaf26f6cf2016-07-18 21:44:10 -04001LOCAL_PATH := $(call my-dir)
2
3## Build and run dtbtool
4INSTALLED_DTIMAGE_TARGET := $(LOCAL_PATH)/dt.img
5
6ifneq ($(TARGET_KERNEL_ARCH),)
7KERNEL_ARCH := $(TARGET_KERNEL_ARCH)
8else
9KERNEL_ARCH := $(TARGET_ARCH)
10endif
11## Overload bootimg generation: Same as the original, + --dt arg
12$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET)
13 $(call pretty,"Target boot image: $@")
14 $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) \
15 --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) --dt $(INSTALLED_DTIMAGE_TARGET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --output $@
16# --second_offset $(BOARD_SECOND_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) \
17 $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
18 @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}
19
20## Overload recoveryimg generation: Same as the original, + --dt arg
21$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \
22 $(recovery_ramdisk) \
23 $(recovery_kernel)
24 @echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
25 $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) \
26 --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) --dt $(INSTALLED_DTIMAGE_TARGET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --output $@
27# --second_offset $(BOARD_SECOND_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) \
28 $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
29 @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}
30
31