From: Antonio Ospite Date: Sat, 28 Jun 2014 08:44:24 +0000 (+0200) Subject: README: more details about the format used for the map file X-Git-Url: https://git.ao2.it/ddsect.git/commitdiff_plain/0cf32b433cd2b1c528cf273c9d589841c25c9d90 README: more details about the format used for the map file --- diff --git a/README b/README index 0c292b2..dc5a0d6 100644 --- a/README +++ b/README @@ -6,9 +6,18 @@ or to split a raw flash dump into its MTD partitions. The format for describing each memory section in a map file is: - HexStartingAddres-HexEndingAddress : "name" + HexStartingAddress-HexEndingAddress : "name" -just like the output of the MTD driver in linux. +where HexEndingAddress is actually the address of the byte _after_ the last +one of the section (HexStartingAddress + size); this is because of how the +output of the MTD driver in linux is formed (see drivers/mtd/mtdpart.c). + + printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n", (unsigned long long)slave->offset, + (unsigned long long)(slave->offset + slave->mtd.size), slave->mtd.name); + +This is slightly different from the format used in other memory layout files +(like for instance the one used by flashrom, which specifies the actual end +address), but it allows to just reuse the output of the linux mtd driver. Empty lines and lines starting with the '#' character will be ignored in the map file.