Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Jun 25, 2017
1 parent b427fe1 commit fe9e51a
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion README.md
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
```

0 comments on commit fe9e51a

Please sign in to comment.