[Exynos] [DTBH] Compiling a dtb.img with Linux

jcadduono

Recognized Developer
Jan 17, 2014
1,492
6,206
0
28
Thunder Bay
adduono.com
Hello developers of Exynos devices!

I've come up with a solution to integrate dtb.img building into Exynos kernel sources.
This will allow you to easily build your own dtb.img from Samsung's sources, rather than use dtb.img files pulled from stock kernels.

First, you'll need to apply a patch to the kernel sources.
This is an example taken from the Note 8 tree. You may need to make minor adjustments to get it to apply cleanly on your own tree. That means using git apply --rej then manually inserting contents from rej files most likely.
https://github.com/jcadduono/androi...45a8df88cf1d783407a36b660e8c767634a1968.patch

Once that's done, you will need to manually add some device specific additions. Samsung has already done this on a few of their kernel trees.
See https://github.com/jcadduono/androi...mmit/ebc62a93a80685a262516883b0b059d828d038b7 for an example on the Galaxy Note 8.
This is a config declaration of the variant of your device, used to determine which DTB files to build. You'll have to look around in arch/arm64/boot/dts folder for dts files regarding your device.

dtbtool_exynos is based on Ketut Putu Kumajaya's work, (using his load_dtbh_block function) then making a tool similar to Qualcomm's dtbTool. It takes arguments in a way that makes it easy to integrate in the Linux build system.
It produces 100% bit-exact dtb.img files compared to Samsung's stock images if you have the same dts sources.

Code:
[email protected]:~/build/kernel/android/samsung_universal8895$ build/scripts/dtbtool_exynos/dtbtool --help
usage: dtbtool
      -o|--output <filename>
      [ -s|--pagesize <pagesize> ]
      [ --platform <hex platform code> ]
      [ --subtype <hex subtype code> ]
      [ -d|--dtb <dtb path> ]...
      [ <dtb file> ]...
I have included defaults which apply across most Samsung devices. It requires at least 1 dtb file generated by the kernel build system to make a dtb.img.
Note that when using -d, it scans a directory's first level and sorts the dtbs in alphabetical order. (00, 01, 02, 05, 07, etc.)
When using dtb files by themselves as arguments, you will want to sort them yourself!
You can mix and match arguments however you like, so ./dtbtool -o dtb.img somefile1.dtb somefile2.dtb -d /somepath/ somefile3.dtb -d /someotherpath/ would actually scan and write them in that order.

You can use `make your-defconfig dtb.img` with CONFIG_EXYNOS_DTBTOOL=y in your device defconfig to immediately build the dtbtool, followed by the dtb files, followed by dtb.img. If CONFIG_EXYNOS_DTBTOOL=y then make/make all will build the dtb.img with your zImage.
I tried to make this as seamless and easy as possible. :)

You can then build your own boot image with https://github.com/jcadduono/android_external_libbootimg (make bootimg) or flash the dtb.img alongside ramdisk modifications, kernel images, etc. using LazyFlasher. (see more here)

HOW DO I KNOW THE PLATFORM/SUBTYPE CODES FOR MY DEVICE?

All you need is the original dtb.img from a stock boot/recovery image for your device.
If you only have a boot.img or recovery.img, use the above mentioned bootimg tool.
Code:
./bootimg x boot.img boot --dt
You will find dtb.img as boot/boot.img-dt.

This command will give you the values based on what is used in the original image:
Code:
xxd -e -s16 -l8 dtb.img | awk '{ print "platform code: 0x"$2; print "subtype code: 0x"$3 }'
The values will likely be the same on most devices. These are the defaults used by dtbtool_exynos:
Code:
platform code: 0x000050a6
subtype code: 0x217584da
 
Last edited:

minhka98

Senior Member
Nov 16, 2017
51
57
28
fixed thanks
i can patch in source 32bit? i have error

DTBTOOL arch/arm/boot/dtb.img
dtbtool: model_info-chip of arch/arm/boot/dts/exynos3475-universal3475.dtb is of invalid size, skipping
dtbtool: unable to locate any dtbs in the given path
error: could not load device tree blobs
/home/minhka98/m/arch/arm/boot/Makefile:44: formulas for destination “arch/arm/boot/dtb.img” error
 
Last edited:

jcadduono

Recognized Developer
Jan 17, 2014
1,492
6,206
0
28
Thunder Bay
adduono.com
i can patch in source 32bit? i have error

DTBTOOL arch/arm/boot/dtb.img
dtbtool: model_info-chip of arch/arm/boot/dts/exynos3475-universal3475.dtb is of invalid size, skipping
dtbtool: unable to locate any dtbs in the given path
error: could not load device tree blobs
/home/minhka98/m/arch/arm/boot/Makefile:44: formulas for destination “arch/arm/boot/dtb.img” error
hmm I will need to clone your repository and see why it is doing this
 

jcadduono

Recognized Developer
Jan 17, 2014
1,492
6,206
0
28
Thunder Bay
adduono.com
it's because you didn't do the 2nd step, you were building dtb for a non-existent device
here is a patch...you might want to adjust it or add SWA as a variant if you are building for that device, I only added XX/EUR

it is possible you can get away with just adding them to CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES=
rather than needing this patch as well

ex.
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos3475-j2lte_eur_open_01 exynos3475-j2lte_eur_open_02 exynos3475-j2lte_eur_open_03"

this might still cause problems though because other exynos dtb might be built which are not actually usable in a dtb.img. this is why we add an override rule (dtb-$(X) := ...) near the end of the dts makefile that is triggered by MACH config.

Code:
From a469b896f66c49ca2ae34e953a8a715626a71104 Mon Sep 17 00:00:00 2001
From: James Christopher Adduono <[email protected]>
Date: Sun, 17 Dec 2017 18:52:06 -0500
Subject: [PATCH] Add j2ltexx mach target

---
 arch/arm/boot/dts/Makefile                     |  5 +++++
 arch/arm/configs/exynos3475-j2lteswa_defconfig |  4 ++--
 arch/arm/mach-exynos/Kconfig                   | 14 ++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d1341b51..c4f8465c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -213,6 +213,11 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
 	wm8850-w70v2.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb
 
+dtb-$(CONFIG_MACH_EXYNOS3475_J2LTE_EUR) := \
+	exynos3475-j2lte_eur_open_01.dtb \
+	exynos3475-j2lte_eur_open_02.dtb \
+	exynos3475-j2lte_eur_open_03.dtb
+
 DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))
 ifneq ($(DTB_NAMES),)
 DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
diff --git a/arch/arm/configs/exynos3475-j2lteswa_defconfig b/arch/arm/configs/exynos3475-j2lteswa_defconfig
index 92a9f011..25de34cb 100755
--- a/arch/arm/configs/exynos3475-j2lteswa_defconfig
+++ b/arch/arm/configs/exynos3475-j2lteswa_defconfig
@@ -334,6 +334,7 @@ CONFIG_S5P_SLEEP=y
 CONFIG_ARCH_EXYNOS3=y
 # CONFIG_ARCH_EXYNOS4 is not set
 # CONFIG_ARCH_EXYNOS5 is not set
+CONFIG_MACH_EXYNOS3475_J2LTE_EUR=y
 CONFIG_EXYNOS_DTBTOOL=y
 CONFIG_EXYNOS_DTBH_PLATFORM_CODE=0x50a6
 CONFIG_EXYNOS_DTBH_SUBTYPE_CODE=0x217584da
@@ -518,8 +519,7 @@ CONFIG_SECCOMP=y
 #
 CONFIG_USE_OF=y
 # CONFIG_ATAGS is not set
-CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
-CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos3475-universal3475"
+# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ARM_APPENDED_DTB=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d565c183..a05510a9 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -18,6 +18,20 @@ config ARCH_EXYNOS3
 	select HAVE_EXYNOS5_HSI2C if I2C
 	help
 	  Samsung EXYNOS3 (Cortex-A7) SoC based systems
+
+choice
+	prompt "Exynos device target"
+	default MACH_EXYNOS3575_NONE
+
+config MACH_EXYNOS3475_NONE
+	bool "None"
+
+config MACH_EXYNOS3475_J2LTE_EUR
+	bool "Galaxy J2 International (j2ltexx)"
+	select EXYNOS_DTBTOOL
+
+endchoice
+
 menuconfig EXYNOS_DTBTOOL
  	bool "Build dtbtool for Exynos"
 	select DTC
-- 
2.11.0
 
Last edited:
  • Like
Reactions: minhka98

minhka98

Senior Member
Nov 16, 2017
51
57
28
it's because you didn't do the 2nd step, you were building dtb for a non-existent device
here is a patch...you might want to adjust it or add SWA as a variant if you are building for that device, I only added XX/EUR

it is possible you can get away with just adding them to CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES=
rather than needing this patch as well

ex.
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos3475-j2lte_eur_open_01 exynos3475-j2lte_eur_open_02 exynos3475-j2lte_eur_open_03"

this might still cause problems though because other exynos dtb might be built which are not actually usable in a dtb.img. this is why we add an override rule (dtb-$(X) := ...) near the end of the dts makefile that is triggered by MACH config.

Code:
From a469b896f66c49ca2ae34e953a8a715626a71104 Mon Sep 17 00:00:00 2001
From: James Christopher Adduono <[email protected]>
Date: Sun, 17 Dec 2017 18:52:06 -0500
Subject: [PATCH] Add j2ltexx mach target

---
 arch/arm/boot/dts/Makefile                     |  5 +++++
 arch/arm/configs/exynos3475-j2lteswa_defconfig |  4 ++--
 arch/arm/mach-exynos/Kconfig                   | 14 ++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d1341b51..c4f8465c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -213,6 +213,11 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
 	wm8850-w70v2.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb
 
+dtb-$(CONFIG_MACH_EXYNOS3475_J2LTE_EUR) := \
+	exynos3475-j2lte_eur_open_01.dtb \
+	exynos3475-j2lte_eur_open_02.dtb \
+	exynos3475-j2lte_eur_open_03.dtb
+
 DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))
 ifneq ($(DTB_NAMES),)
 DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
diff --git a/arch/arm/configs/exynos3475-j2lteswa_defconfig b/arch/arm/configs/exynos3475-j2lteswa_defconfig
index 92a9f011..25de34cb 100755
--- a/arch/arm/configs/exynos3475-j2lteswa_defconfig
+++ b/arch/arm/configs/exynos3475-j2lteswa_defconfig
@@ -334,6 +334,7 @@ CONFIG_S5P_SLEEP=y
 CONFIG_ARCH_EXYNOS3=y
 # CONFIG_ARCH_EXYNOS4 is not set
 # CONFIG_ARCH_EXYNOS5 is not set
+CONFIG_MACH_EXYNOS3475_J2LTE_EUR=y
 CONFIG_EXYNOS_DTBTOOL=y
 CONFIG_EXYNOS_DTBH_PLATFORM_CODE=0x50a6
 CONFIG_EXYNOS_DTBH_SUBTYPE_CODE=0x217584da
@@ -518,8 +519,7 @@ CONFIG_SECCOMP=y
 #
 CONFIG_USE_OF=y
 # CONFIG_ATAGS is not set
-CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
-CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos3475-universal3475"
+# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ARM_APPENDED_DTB=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d565c183..a05510a9 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -18,6 +18,20 @@ config ARCH_EXYNOS3
 	select HAVE_EXYNOS5_HSI2C if I2C
 	help
 	  Samsung EXYNOS3 (Cortex-A7) SoC based systems
+
+choice
+	prompt "Exynos device target"
+	default MACH_EXYNOS3575_NONE
+
+config MACH_EXYNOS3475_NONE
+	bool "None"
+
+config MACH_EXYNOS3475_J2LTE_EUR
+	bool "Galaxy J2 International (j2ltexx)"
+	select EXYNOS_DTBTOOL
+
+endchoice
+
 menuconfig EXYNOS_DTBTOOL
  	bool "Build dtbtool for Exynos"
 	select DTC
-- 
2.11.0
ok. thanks

---------- Post added at 07:55 AM ---------- Previous post was at 07:44 AM ----------

it's because you didn't do the 2nd step, you were building dtb for a non-existent device
here is a patch...you might want to adjust it or add SWA as a variant if you are building for that device, I only added XX/EUR

it is possible you can get away with just adding them to CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES=
rather than needing this patch as well

ex.
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos3475-j2lte_eur_open_01 exynos3475-j2lte_eur_open_02 exynos3475-j2lte_eur_open_03"

this might still cause problems though because other exynos dtb might be built which are not actually usable in a dtb.img. this is why we add an override rule (dtb-$(X) := ...) near the end of the dts makefile that is triggered by MACH config.

Code:
From a469b896f66c49ca2ae34e953a8a715626a71104 Mon Sep 17 00:00:00 2001
From: James Christopher Adduono <[email protected]>
Date: Sun, 17 Dec 2017 18:52:06 -0500
Subject: [PATCH] Add j2ltexx mach target

---
 arch/arm/boot/dts/Makefile                     |  5 +++++
 arch/arm/configs/exynos3475-j2lteswa_defconfig |  4 ++--
 arch/arm/mach-exynos/Kconfig                   | 14 ++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d1341b51..c4f8465c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -213,6 +213,11 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
 	wm8850-w70v2.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb
 
+dtb-$(CONFIG_MACH_EXYNOS3475_J2LTE_EUR) := \
+	exynos3475-j2lte_eur_open_01.dtb \
+	exynos3475-j2lte_eur_open_02.dtb \
+	exynos3475-j2lte_eur_open_03.dtb
+
 DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))
 ifneq ($(DTB_NAMES),)
 DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
diff --git a/arch/arm/configs/exynos3475-j2lteswa_defconfig b/arch/arm/configs/exynos3475-j2lteswa_defconfig
index 92a9f011..25de34cb 100755
--- a/arch/arm/configs/exynos3475-j2lteswa_defconfig
+++ b/arch/arm/configs/exynos3475-j2lteswa_defconfig
@@ -334,6 +334,7 @@ CONFIG_S5P_SLEEP=y
 CONFIG_ARCH_EXYNOS3=y
 # CONFIG_ARCH_EXYNOS4 is not set
 # CONFIG_ARCH_EXYNOS5 is not set
+CONFIG_MACH_EXYNOS3475_J2LTE_EUR=y
 CONFIG_EXYNOS_DTBTOOL=y
 CONFIG_EXYNOS_DTBH_PLATFORM_CODE=0x50a6
 CONFIG_EXYNOS_DTBH_SUBTYPE_CODE=0x217584da
@@ -518,8 +519,7 @@ CONFIG_SECCOMP=y
 #
 CONFIG_USE_OF=y
 # CONFIG_ATAGS is not set
-CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
-CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos3475-universal3475"
+# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ARM_APPENDED_DTB=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d565c183..a05510a9 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -18,6 +18,20 @@ config ARCH_EXYNOS3
 	select HAVE_EXYNOS5_HSI2C if I2C
 	help
 	  Samsung EXYNOS3 (Cortex-A7) SoC based systems
+
+choice
+	prompt "Exynos device target"
+	default MACH_EXYNOS3575_NONE
+
+config MACH_EXYNOS3475_NONE
+	bool "None"
+
+config MACH_EXYNOS3475_J2LTE_EUR
+	bool "Galaxy J2 International (j2ltexx)"
+	select EXYNOS_DTBTOOL
+
+endchoice
+
 menuconfig EXYNOS_DTBTOOL
  	bool "Build dtbtool for Exynos"
 	select DTC
-- 
2.11.0
if dont have file *.dtb What can I do. In another kernel source I do not see any * .dtb files
 
Last edited:

jcadduono

Recognized Developer
Jan 17, 2014
1,492
6,206
0
28
Thunder Bay
adduono.com
ok. thanks

---------- Post added at 07:55 AM ---------- Previous post was at 07:44 AM ----------



if dont have file *.dtb What can I do. In another kernel source I do not see any * .dtb files
kernel source should not come with *.dtb files, those are files we build, it should come with *.dts files!

if it does not come with *.dts files specific to your device then you may need to try downloading other kernel sources for your chipset (ex. exynos 3475) and they may come with your device's *.dts files.

in the case of samsung devices, they dts are named like exynosXXXX-devicecodename_region_subregion_XX.dts
the number on the end usually correlates to newer revisions of the device, and you most likely won't need all of the revisions (some are probably unreleased) but it is good to have them anyway. they will get sorted by that number when the dtb.img is built.
you should NOT mix different region/variant dts, so don't use a eur_open dtb and a swa dtb. they can share hardware revision/subtype numbers and it will confuse the bootloader and they won't be able to load the correct ones.

also please do not bump threads on xda unless your bump consists of useful information that may help others
 
Last edited:

minhka98

Senior Member
Nov 16, 2017
51
57
28
kernel source should not come with *.dtb files, those are files we build, it should come with *.dts files!

if it does not come with *.dts files specific to your device then you may need to try downloading other kernel sources for your chipset (ex. exynos 3475) and they may come with your device's *.dts files.

in the case of samsung devices, they dts are named like exynosXXXX-devicecodename_region_subregion_XX.dts
the number on the end usually correlates to newer revisions of the device, and you most likely won't need all of the revisions (some are probably unreleased) but it is good to have them anyway. they will get sorted by that number when the dtb.img is built.
you should NOT mix different region/variant dts, so don't use a eur_open dtb and a swa dtb. they can share hardware revision/subtype numbers and it will confuse the bootloader and they won't be able to load the correct ones.

also please do not bump threads on xda unless your bump consists of useful information that may help others
@@ -213,6 +213,11 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
wm8850-w70v2.dtb
dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb

+dtb-$(CONFIG_MACH_EXYNOS3475_J2LTE_EUR) := \
+ exynos3475-j2lte_eur_open_01.dtb \
+ exynos3475-j2lte_eur_open_02.dtb \
+ exynos3475-j2lte_eur_open_03.dtb
+
DTB_NAMES := $(subst $",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))

i dont see any file "exynos3475-j2lte_eur_open_0*.dtb" just "exynos3475-j2lte_eur_open_0*.dts" why different?
 

jcadduono

Recognized Developer
Jan 17, 2014
1,492
6,206
0
28
Thunder Bay
adduono.com
i dont see any file "exynos3475-j2lte_eur_open_0*.dtb" just "exynos3475-j2lte_eur_open_0*.dts" why different?
as i said in my last post....dtb is MADE FROM dts, you only should have dts NOT dtb!
by specifying dtb in the makefile as a dependency, the build system will compile *.dts into *.dtb during build! it is automatic, just see *.dts files that exist and add them to makefile as done in my patches, but change dts to dtb for extension and it will make dtb from dts.
finally my build system additions combine the dtb files into a dtb.img
 
  • Like
Reactions: minhka98

minhka98

Senior Member
Nov 16, 2017
51
57
28
as i said in my last post....dtb is MADE FROM dts, you only should have dts NOT dtb!
by specifying dtb in the makefile as a dependency, the build system will compile *.dts into *.dtb during build! it is automatic, just see *.dts files that exist and add them to makefile as done in my patches, but change dts to dtb for extension and it will make dtb from dts.
finally my build system additions combine the dtb files into a dtb.img
ok. thanks
 

jaran kepang

Member
Mar 19, 2016
49
16
0
In here.
hello bro.
i successfully build kernel for galaxy note fe running on nougat.
and now i want build for oreo.but sammy not give fully dts source..then i asked to osrc team to give full source..they reupload the source with full dts source..
but it cant boot in my device..when i only compile zimage.its successfully booted..i got null pointer error with dtb-image..
here my Logcat
 
Last edited:

jcadduono

Recognized Developer
Jan 17, 2014
1,492
6,206
0
28
Thunder Bay
adduono.com
hello bro.
i successfully build kernel for galaxy note fe running on nougat.
and now i want build for oreo.but sammy not give fully dts source..then i asked to osrc team to give full source..they reupload the source with full dts source..
but it cant boot in my device..when i only compile zimage.its successfully booted..i got null pointer error with dtb-image..
here my Logcat
compare your built dtb.img with original one from your stock kernel on same android version
make sure that compatible matches and you have the right values for the dtb magics, you can use hexdump on each dtb.img, also make sure they are in right order and have same amount of dtb
you can separate the original dtb.img into dtb files by breaking them up at dtb magic and then use kernel dts tool to convert them back into dtsi format and compare to see if any values are different too

HXD is a really useful tool with its visual compare function, you can run it in Wine i think (i use windows as a host with linux in vm, and just samba share my work directory)
 
Last edited:

jaran kepang

Member
Mar 19, 2016
49
16
0
In here.
compare your built dtb.img with original one from your stock kernel on same android version
make sure that compatible matches and you have the right values for the dtb magics, you can use hexdump on each dtb.img, also make sure they are in right order and have same amount of dtb
you can separate the original dtb.img into dtb files by breaking them up at dtb magic and then use kernel dts tool to convert them back into dtsi format and compare to see if any values are different too

HXD is a really useful tool with its visual compare function, you can run it in Wine i think (i use windows as a host with linux in vm, and just samba share my work directory)
thank you for your response.
i asked djb77 and he give me tool to extract dtb from boot.img
to dts file..i guess this tools is simillar about what u say..