Difference between revisions of "Dtbtool"

From postmarketOS
Jump to navigation Jump to search
(→‎Using an alternative version: list the various dtbTools available as apk right now)
(Change formatting and notes)
 
Line 10: Line 10:
 
There exist lots of versions of this <code>dtbtool</code>. Most of our devices works with the (Python) version from Skales, which is properly versioned and maintained. However, it is incompatible with some (older?) kernels, where the <code>dt.img</code> file was properly generated with code based on the original C version. So, at the time of writing four different dtbTools have been packaged and are available:
 
There exist lots of versions of this <code>dtbtool</code>. Most of our devices works with the (Python) version from Skales, which is properly versioned and maintained. However, it is incompatible with some (older?) kernels, where the <code>dt.img</code> file was properly generated with code based on the original C version. So, at the time of writing four different dtbTools have been packaged and are available:
  
* dtbTool, Skales version mentioned before
+
* <code>dtbTool</code>, Skales version mentioned before
* dtbTool-exynos, required for exynos devices
+
* <code>dtbTool-exynos</code>, required for exynos devices
* dtbTool-sprd, used by finepower-f1, samsung-j1mini3g and samsung-j3xnlte
+
* <code>dtbTool-sprd</code> - Spreadtrum version
* pxa1088-dtbTool and pxa1908-dtbTool, packaged into pxa-mkbootimg and used by samsung-coreprimevelte
+
* <code>pxa1088-dtbTool</code> and <code>pxa1908-dtbTool</code>, packaged into <code>pxa-mkbootimg</code> and used by devices with Marvell PXA SoCs
  
 
If you would like to test if Skales' version produces the same output as the LineageOS version (which is what we had packaged before), download the files from [https://github.com/ollieparanoid/aports-extra/tree/master/dtbtool-lineage here] and place them in <code>aports/main/dtbtool-lineage</code>. Build it with <code>pmbootstrap build dtbtool-lineage</code> and depend on <code>dtbtool-lineage</code> instead of <code>dtbtool</code> in your kernel package, then change the <code>dtbTool</code> line in your kernel APKBUILD to <code>dtbTool-lineage</code>.
 
If you would like to test if Skales' version produces the same output as the LineageOS version (which is what we had packaged before), download the files from [https://github.com/ollieparanoid/aports-extra/tree/master/dtbtool-lineage here] and place them in <code>aports/main/dtbtool-lineage</code>. Build it with <code>pmbootstrap build dtbtool-lineage</code> and depend on <code>dtbtool-lineage</code> instead of <code>dtbtool</code> in your kernel package, then change the <code>dtbTool</code> line in your kernel APKBUILD to <code>dtbTool-lineage</code>.
  
 
[[Category:Technical Reference]]
 
[[Category:Technical Reference]]

Latest revision as of 22:50, 7 January 2021

The dtbtool is needed to combine multiple dtb (device tree blob) files into one dt.img file, that can then be attached to the end of the boot.img for Android devices (postmarketos-mkinitfs does that).

Do I need it?

You only need this tool if pmbootstrap bootimg_analyze on a known working boot.img file for your device outputs:

deviceinfo_bootimg_qcdt="true"

Using an alternative version

There exist lots of versions of this dtbtool. Most of our devices works with the (Python) version from Skales, which is properly versioned and maintained. However, it is incompatible with some (older?) kernels, where the dt.img file was properly generated with code based on the original C version. So, at the time of writing four different dtbTools have been packaged and are available:

  • dtbTool, Skales version mentioned before
  • dtbTool-exynos, required for exynos devices
  • dtbTool-sprd - Spreadtrum version
  • pxa1088-dtbTool and pxa1908-dtbTool, packaged into pxa-mkbootimg and used by devices with Marvell PXA SoCs

If you would like to test if Skales' version produces the same output as the LineageOS version (which is what we had packaged before), download the files from here and place them in aports/main/dtbtool-lineage. Build it with pmbootstrap build dtbtool-lineage and depend on dtbtool-lineage instead of dtbtool in your kernel package, then change the dtbTool line in your kernel APKBUILD to dtbTool-lineage.