Amit Pundir | bd765d6 | 2024-03-08 22:31:43 +0530 | [diff] [blame] | 1 | ifneq ($(filter db845c db845c_mini linaro_swr sm8x50, $(TARGET_DEVICE)),) |
Amit Pundir | c0ad894 | 2021-12-14 19:45:56 +0530 | [diff] [blame] | 2 | |
Amit Pundir | bd765d6 | 2024-03-08 22:31:43 +0530 | [diff] [blame] | 3 | DTC := $(HOST_OUT)/bin/dtc |
| 4 | FDTOVERLAY := $(HOST_OUT)/bin/fdtoverlay |
| 5 | SM8550HDK_DTS_OVERLAY := device/linaro/dragonboard/sm8x50/dtb-overlays/sm8550-hdk.dts |
| 6 | SM8550QRD_DTS_OVERLAY := device/linaro/dragonboard/sm8x50/dtb-overlays/sm8550-qrd.dts |
| 7 | SM8650QRD_DTS_OVERLAY := device/linaro/dragonboard/sm8x50/dtb-overlays/sm8650-qrd.dts |
| 8 | |
| 9 | DB845C_DTB := $(TARGET_KERNEL_DIR)/sdm845-db845c.dtb |
| 10 | RB5_DTB := $(wildcard $(TARGET_KERNEL_DIR)/qrb5165-rb5.dtb) |
| 11 | SM8550HDK_DTB := $(wildcard $(TARGET_KERNEL_DIR)/sm8550-hdk.dtb) |
| 12 | SM8550QRD_DTB := $(wildcard $(TARGET_KERNEL_DIR)/sm8550-qrd.dtb) |
| 13 | SM8650QRD_DTB := $(wildcard $(TARGET_KERNEL_DIR)/sm8650-qrd.dtb) |
| 14 | |
| 15 | $(PRODUCT_OUT)/dtb.img: $(DTC) $(FDTOVERLAY) |
| 16 | -$(DTC) -@ -I dts -O dtb -o $(PRODUCT_OUT)/sm8550-hdk.dtbo $(SM8550HDK_DTS_OVERLAY) |
| 17 | -$(FDTOVERLAY) -i $(SM8550HDK_DTB) -o $(PRODUCT_OUT)/sm8550-hdk.dtb $(PRODUCT_OUT)/sm8550-hdk.dtbo |
| 18 | -$(DTC) -@ -I dts -O dtb -o $(PRODUCT_OUT)/sm8550-qrd.dtbo $(SM8550QRD_DTS_OVERLAY) |
| 19 | -$(FDTOVERLAY) -i $(SM8550QRD_DTB) -o $(PRODUCT_OUT)/sm8550-qrd.dtb $(PRODUCT_OUT)/sm8550-qrd.dtbo |
| 20 | -$(DTC) -@ -I dts -O dtb -o $(PRODUCT_OUT)/sm8650-qrd.dtbo $(SM8650QRD_DTS_OVERLAY) |
| 21 | -$(FDTOVERLAY) -i $(SM8650QRD_DTB) -o $(PRODUCT_OUT)/sm8650-qrd.dtb $(PRODUCT_OUT)/sm8650-qrd.dtbo |
| 22 | -cat $(DB845C_DTB) $(RB5_DTB) $(PRODUCT_OUT)/sm8550-hdk.dtb $(PRODUCT_OUT)/sm8550-qrd.dtb $(PRODUCT_OUT)/sm8650-qrd.dtbo > $@ |
| 23 | -rm $(PRODUCT_OUT)/sm8*dtb* |
Amit Pundir | c0ad894 | 2021-12-14 19:45:56 +0530 | [diff] [blame] | 24 | |
| 25 | droidcore: $(PRODUCT_OUT)/dtb.img |
| 26 | |
| 27 | endif |