blob: 1801a16753b4915c814adbce9ddf62ea13788391 [file] [log] [blame]
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001LOCAL_PATH := $(call my-dir)
2
3## Build and run dtbtool
Zvikomborero VIncent Zvikaramba0650dd42016-08-28 23:57:06 -04004DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX)
5INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04006
7ifneq ($(TARGET_KERNEL_ARCH),)
8KERNEL_ARCH := $(TARGET_KERNEL_ARCH)
9else
10KERNEL_ARCH := $(TARGET_ARCH)
11endif
Zvikomborero VIncent Zvikaramba0650dd42016-08-28 23:57:06 -040012
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 Zvikarambaa25011a2016-07-21 16:32:35 -040019## 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 Zvikarambab88b6352016-08-21 23:30:25 -040023 --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 Zvikarambaa25011a2016-07-21 16:32:35 -040027 $(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 Zvikarambab88b6352016-08-21 23:30:25 -040036 --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 Zvikarambaa25011a2016-07-21 16:32:35 -040040 $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
41 @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}
42
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040043