[General Questions and Answers] Bass_Face:
Hi there, ive almost posted atleast 5 times for errors and im really thankfull for all the help i got.

im building pac-5.1 from source from my phone. my phones manufacturer (lenovo) did not release the complete source so im using the kernel of surnia (moto e 2015 4g) which also has the same kernel. my mkboot.img looks like this -

# Use prebuilt dt.img
INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img

$(INSTALLED_DTIMAGE_TARGET):
@echo -e ${CL_CYN}"Start DT image: $@"${CL_RST}
$(call append-dtb)
$(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)")
@echo -e ${CL_CYN}"Made DT image: $@"${CL_RST}

## Overload bootimg generation: Same as the original, + --dt arg
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}

## Overload recoveryimg generation: Same as the original, + --dt arg
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \
$(recovery_ramdisk) \
$(recovery_kernel)
@echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}

and moto e's like this -

LOCAL_PATH := $(call my-dir)

## Build and run dtbtool
[COLOR="Red"]DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX)[/COLOR]
INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img

$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET)
$(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)")
$(hide) $(DTBTOOL) -2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/dts/
@echo -e ${CL_CYN}"Made DT image: $@"${CL_RST}

## Overload bootimg generation: Same as the original, + --dt arg
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}

## Overload recoveryimg generation: Same as the original, + --dt arg
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \
$(recovery_ramdisk) \
$(recovery_kernel)
@echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}

i had to remove the highlited part in my mkboot.img because of this error

make: *** No rule to make target '/ home/bassface/PAC/out/host/linux-x86/bin/dtbToolCM' necessary '/ home/bassface/PAC/out/target/product /a6000/dt.img '.

the rom succesfully compiles for 4+hours then stops saying it could not find dt.img in product/a6000 if i remove the

DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX

line. i just deleted the entire out ditrectory and im recompiling i placed the dt.img in now. but i want to know whats causing this error. why dont i have the dtbtool? is it supposed to be downloaded seperately.? evem if the rom builds succesfully after copying it and pasting in the out directory. what am i supposed to do for it to copy automatically in the future, if someone else wants to make something using my source? thankyou