-
Notifications
You must be signed in to change notification settings - Fork 28
/
mkbootimg.mk
58 lines (50 loc) · 2.44 KB
/
mkbootimg.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Custom creation of Motorola MSM8960DT devtree
LOCAL_PATH := $(call my-dir)
# Device trees from kernel
MSM8960DT_DEVTREE := mmi-8960pro.dtb \
msm8960ab-ghost-p0.dtb \
msm8960ab-ghost-p1b4.dtb \
msm8960ab-ghost-p1.dtb \
msm8960ab-ghost-p2b.dtb \
msm8960ab-ghost-p2.dtb \
msm8960ab-ghost-p3.dtb \
msm8960ab-ghost-pc.dtb \
msm8960ab-ghost-pd.dtb \
msm8960ab-ghost-pe.dtb \
msm8960ab-ghost-pe.dtb \
msm8960ab-ultra-maxx-p0.dtb \
msm8960ab-ultra-maxx-p1.dtb \
msm8960ab-ultra-maxx-p2.dtb \
msm8960ab-ultra-maxx-p3.dtb \
msm8960ab-ultram-p0.dtb \
msm8960ab-ultram-p1.dtb \
msm8960ab-ultram-p2c.dtb \
msm8960ab-ultram-p2.dtb \
msm8960ab-ultram-p3.dtb \
msm8960ab-ultra-p0.dtb \
msm8960ab-ultra-p1.dtb \
msm8960ab-ultra-p2.dtb \
msm8960ab-ultra-p3.dtb
MSM8960DT_DEVTREE_OBJ := $(addprefix $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/arch/arm/boot/,$(MSM8960DT_DEVTREE))
MOTO_DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolMoto$(HOST_EXECUTABLE_SUFFIX)
INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img
$(INSTALLED_DTIMAGE_TARGET): $(MOTO_DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET)
$(call pretty,"Create device tree image: $@")
$(hide) $(MOTO_DTBTOOL) -o $(INSTALLED_DTIMAGE_TARGET) $(MSM8960DT_DEVTREE_OBJ)
@echo -e ${CL_CYN}"Made device tree image: $@"${CL_RST}
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) $(INTERNAL_BOOTIMAGE_FILES) $(BOOTIMAGE_EXTRA_DEPS)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE))
@echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}
.PHONY: bootimage-nodeps
bootimage-nodeps: $(MKBOOTIMG)
@echo "make $@: ignoring dependencies"
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET)
$(hide) $(call assert-max-image-size,$(INSTALLED_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
@echo -e ${CL_INS}"Made boot image: $@"${CL_RST}
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) $(recovery_ramdisk) $(recovery_kernel)
$(call pretty,"Target recovery image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE))
@echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}