ddsect.sh: small cleanups
[ddsect.git] / README
1 ddsect is a data dump dissecting tool based on dd.
2
3 It can be used, for example, to dissect firmware files after their structure
4 has been derived with tools like binwalk (https://code.google.com/p/binwalk/),
5 or to split a raw flash dump into its MTD partitions.
6
7 The format for describing each memory section in a map file is:
8
9   HexStartingAddress-HexEndingAddress : "name"
10
11 where HexEndingAddress is actually the address of the byte _after_ the last
12 one of the section (HexStartingAddress + size); this is because of how the
13 output of the MTD driver in linux is formed (see drivers/mtd/mtdpart.c).
14
15         printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n", (unsigned long long)slave->offset,
16                 (unsigned long long)(slave->offset + slave->mtd.size), slave->mtd.name);
17
18 This is slightly different from the format used in other memory layout files
19 (like for instance the one used by flashrom, which specifies the actual end
20 address), but it allows to just reuse the output of the linux mtd driver.
21
22 Empty lines and lines starting with the '#' character will be ignored
23 in the map file.