Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | ## Build and run dtbtool |
Zvikomborero VIncent Zvikaramba | 0650dd4 | 2016-08-28 23:57:06 -0400 | [diff] [blame] | 4 | DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX) |
| 5 | INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 6 | |
| 7 | ifneq ($(TARGET_KERNEL_ARCH),) |
| 8 | KERNEL_ARCH := $(TARGET_KERNEL_ARCH) |
| 9 | else |
| 10 | KERNEL_ARCH := $(TARGET_ARCH) |
| 11 | endif |
Zvikomborero VIncent Zvikaramba | 0650dd4 | 2016-08-28 23:57:06 -0400 | [diff] [blame] | 12 | |
| 13 | #generate the dtimage |
| 14 | $(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET) |
| 15 | $(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)") |
| 16 | $(hide) $(DTBTOOL) -2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/ |
| 17 | @echo -e ${CL_CYN}"Made DT image: $@"${CL_RST} |
| 18 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 19 | ## Overload bootimg generation: Same as the original, + --dt arg |
| 20 | $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET) |
| 21 | $(call pretty,"Target boot image: $@") |
| 22 | $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) \ |
Zvikomborero VIncent Zvikaramba | b88b635 | 2016-08-21 23:30:25 -0400 | [diff] [blame] | 23 | --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) \ |
| 24 | --dt $(INSTALLED_DTIMAGE_TARGET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --output $@ |
| 25 | @echo -e ${CL_CYN}"Making image SEAndroid Enforcing..."${CL_RST} |
| 26 | echo -n "SEANDROIDENFORCE" >> $@ |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 27 | $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) |
| 28 | @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST} |
| 29 | |
| 30 | ## Overload recoveryimg generation: Same as the original, + --dt arg |
| 31 | $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \ |
| 32 | $(recovery_ramdisk) \ |
| 33 | $(recovery_kernel) |
| 34 | @echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST} |
| 35 | $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) \ |
Zvikomborero VIncent Zvikaramba | b88b635 | 2016-08-21 23:30:25 -0400 | [diff] [blame] | 36 | --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) \ |
| 37 | --dt $(INSTALLED_DTIMAGE_TARGET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --output $@ |
| 38 | @echo -e ${CL_CYN}"Making image SEAndroid Enforcing..."${CL_RST} |
| 39 | echo -n "SEANDROIDENFORCE" >> $@ |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 40 | $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) |
| 41 | @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST} |
| 42 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 43 | |