How to split dtb.img from boot.img of OTA.zip

  • Hi,Everybody,

    Recently I got a box with S812, 1G Ram, 4G Nand, RTL8189 wifi,100M lan, I tried to boot from SD card with libreelec, but I can not find a useful DTB file due to the box is not popular.

    I searched by Google, and got a script called " split_bootimg.pl" according to instruction from website:How to Extract a Device Tree File from Android Firmware Files. but the script reported error

    " Android Magic not found in boot.img. Giving up."

    I searched again found some boo.img don't have some kind of character so the script can not identify it so it can not split dtb.img from boot.img.

    then I tried another script from below website:

    GitHub - PabloCastellano/extract-dtb: Extract device tree blobs (dtb) from kernel images

    it works but it split many files with suffix "dtb".

    ./extract-dtb.py /home/pi/b860a/boot.img -o /home/pi/test

    Dumped 00_kernel, start=0 end=2617

    Dumped 01_dtbdump_`@0M<p.dtb, start=2617 end=7188576

    Dumped 02_dtbdump_m8m2_n200_2gsdhc.dtb, start=7188576 end=7211104

    Dumped 03_dtbdump_m8m2_n200_2gsdio.dtb, start=7211104 end=7233632

    Dumped 04_dtbdump_m8m2_n200_sdhc.dtb, start=7233632 end=7256160

    Dumped 05_dtbdump_m8m2_n200_sdio.dtb, start=7256160 end=7279336

    Extracted 5 appended dtbs + kernel to /home/pi/test


    the dtb files look like:

    total 7120

    -rw-r--r-- 1 pi pi 2617 Jun 11 21:47 00_kernel

    -rw-r--r-- 1 pi pi 7185959 Jun 11 21:47 01_dtbdump_`@0M<p.dtb

    -rw-r--r-- 1 pi pi 22528 Jun 11 21:48 02_dtbdump_m8m2_n200_2gsdhc.dtb

    -rw-r--r-- 1 pi pi 22528 Jun 11 21:48 03_dtbdump_m8m2_n200_2gsdio.dtb

    -rw-r--r-- 1 pi pi 22528 Jun 11 21:48 04_dtbdump_m8m2_n200_sdhc.dtb

    -rw-r--r-- 1 pi pi 23176 Jun 11 21:48 05_dtbdump_m8m2_n200_sdio.dtb


    I know normally for libreelec system there have only one dtb.img. but here have 5 files named with dtb.

    Here I don't know what the next step is. combine these files or something?

    Could someone help to give me some instruction?

    Thanks!:)