-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b427fe1
commit fe9e51a
Showing
1 changed file
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,51 @@ | ||
# extract-dtb | ||
Extract device tree blobs (dtb) from kernel images | ||
|
||
Tool to split a kernel image with appended dtbs into separated kernel and dtb files. | ||
|
||
A Device Tree is a data structure for describing hardware. They are used in a lot of | ||
ARM devices (e.g. Android), otherwise these would not be able to boot. | ||
|
||
This tool is similar to [split-appended-dtb](https://github.com/dianlujitao/split-appended-dtb) | ||
but it is written in Python and its code is simpler and almost 3x shorter. | ||
|
||
If you want to learn more about DTB you can have a look at the | ||
[Device Tree Reference](http://elinux.org/Device_Tree_Reference). | ||
|
||
## Usage | ||
|
||
``` | ||
$ ./extract-dtb.py --help | ||
usage: extract-dtb.py [-h] [-n] filename | ||
Extract dtbs from kernel images. | ||
positional arguments: | ||
filename Android kernel image | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
-n Do not extract, just output information | ||
``` | ||
|
||
Example: | ||
|
||
``` | ||
$ ./extract-dtb.py -n vmlinuz-motorola-titan | ||
Found 8 appended dtbs | ||
$ ./extract-dtb.py vmlinuz-motorola-titan | ||
Extracted 8 appended dtbs + kernel | ||
$ ls -l | ||
total 8808 | ||
-rw-rw-r-- 1 pablo pablo 194829 jun 25 17:14 dtbdump_1.dtb | ||
-rw-rw-r-- 1 pablo pablo 194829 jun 25 17:14 dtbdump_2.dtb | ||
-rw-rw-r-- 1 pablo pablo 194829 jun 25 17:14 dtbdump_3.dtb | ||
-rw-rw-r-- 1 pablo pablo 194829 jun 25 17:14 dtbdump_4.dtb | ||
-rw-rw-r-- 1 pablo pablo 194829 jun 25 17:14 dtbdump_5.dtb | ||
-rw-rw-r-- 1 pablo pablo 192593 jun 25 17:14 dtbdump_6.dtb | ||
-rw-rw-r-- 1 pablo pablo 193324 jun 25 17:14 dtbdump_7.dtb | ||
-rw-rw-r-- 1 pablo pablo 193384 jun 25 17:14 dtbdump_8.dtb | ||
-rw-rw-r-- 1 pablo pablo 7368984 jun 25 17:14 kernel | ||
-rw-r--r-- 1 pablo pablo 9115814 jun 22 23:54 vmlinuz-motorola-titan | ||
``` |