[Xiaomi Mi 4i] dh.harald:
I try to follow Xiaomi's wiki about boot.img creation with caf build environment, but it's not too informative... (kernel compiled successfully [vmlinux], i've got ramdisk.img, but something wrong with dt.img)

Here's the command:

$ out/host/linux-x86/bin/dtbTool -v -s 2048 -o out/target/product/msm8916_64/dt.img -p kernel/scripts/dtc out/target/product/msm8916_64/obj/KERNEL_OBJ/arch/arm64/boot/dts/
DTB combiner:
Input directory: 'out/target/product/msm8916_64/obj/KERNEL_OBJ/arch/arm64/boot/dts/'
Output file: 'out/target/product/msm8916_64/dt.img'
=> Found 0 unique DTB(s)

But the directory is full with *.dtbs:

$ ls -la out/target/product/msm8916_64/obj/KERNEL_OBJ/arch/arm64/boot/dts/*.dtb|wc -l
15

EDIT:

i've tried dtbToolCM, and it looks working:

Target dt image: out/target/product/msm8916_64/dt.img
DTB combiner:
Input directory: 'out/target/product/msm8916_64/obj/KERNEL_OBJ/arch/arm64/boot/dts/'
Output file: 'out/target/product/msm8916_64/dt.img'
Found file: msm8916-mtp.dtb ... chipset: 206, rev: 248, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 249, subtype: 0
Found file: msm8916-mtp-smb1360.dtb ... chipset: 206, rev: 248, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 249, subtype: 0
... duplicate info, skipped
Found file: msm8939-sim.dtb ... chipset: 239, rev: 241, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 263, subtype: 0
Found file: msm8939-cdp.dtb ... chipset: 239, rev: 241, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 263, subtype: 0
... duplicate info, skipped
Found file: msm8939-cdp-jdi.dtb ... chipset: 239, rev: 241, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 263, subtype: 0
... duplicate info, skipped
Found file: msm8939-mtp.dtb ... chipset: 239, rev: 241, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 263, subtype: 0
... duplicate info, skipped
Found file: msm8939-mtp-jdi.dtb ... chipset: 239, rev: 241, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 263, subtype: 0
... duplicate info, skipped
Found file: msm8939-mtp-smb1360.dtb ... chipset: 239, rev: 241, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 263, subtype: 0
... duplicate info, skipped
Found file: msm8936-qrd-skuk.dtb ... chipset: 233, rev: 240, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 242, subtype: 0
Found file: msm8936-cdp.dtb ... chipset: 233, rev: 240, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 242, subtype: 0
... duplicate info, skipped
Found file: msm8936-cdp-smb1360.dtb ... chipset: 233, rev: 240, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 242, subtype: 0
... duplicate info, skipped
Found file: msm8936-mtp.dtb ... chipset: 233, rev: 240, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 242, subtype: 0
... duplicate info, skipped
Found file: msmtellurium-rumi.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
Found file: msm8936-mtp-smb1360.dtb ... chipset: 233, rev: 240, platform: 0, subtype: 0
additional chipset: 0, rev: 0, platform: 242, subtype: 0
... duplicate info, skipped
Found file: msmtellurium-sim.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
=> Found 6 unique DTB(s)

Generating master DTB... completed
Target boot image: out/target/product/msm8916_64/boot.img
out/host/linux-x86/bin/boot_signer /boot out/target/product/msm8916_64/boot.img build/target/product/security/verity_private_dev_key out/target/product/msm8916_64/boot.img
out/target/product/msm8916_64/boot.img maxsize=34197504 blocksize=135168 total=25780480 reserve=405504

fingers crossed :)

EDIT:

# fastboot boot boot.img
downloading 'boot.img'...
OKAY [ 0.792s]
booting...
FAILED (remote: dtb not found)
finished. total time: 1.041s

EDIT:

I've tried to

- extract dt.img from original bootloader, and repack into boot.img

- replace only kernel image on original boot.img

with /mkbootimg_tools, but the phone won't boot :(

Any helps are welcome :(

Thanks