diff options
author | Thibaut VARENE <hacks@slashdirt.org> | 2017-07-30 12:40:25 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-08-03 00:11:25 +0200 |
commit | b70a96285c0f489be68bfea7a84a7950a58ddc79 (patch) | |
tree | 35a3ea38b1b1f464a95999fba8301ddf9da6c1e5 | |
parent | 695f5ea85a20d14b179053496ff007cb5d947923 (diff) | |
download | mtk-20170518-b70a96285c0f489be68bfea7a84a7950a58ddc79.zip mtk-20170518-b70a96285c0f489be68bfea7a84a7950a58ddc79.tar.gz mtk-20170518-b70a96285c0f489be68bfea7a84a7950a58ddc79.tar.bz2 |
tools/firmware-utils: document reserved fields in mkchkimg
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
-rw-r--r-- | tools/firmware-utils/src/mkchkimg.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/firmware-utils/src/mkchkimg.c b/tools/firmware-utils/src/mkchkimg.c index e152f7d..0fe01f0 100644 --- a/tools/firmware-utils/src/mkchkimg.c +++ b/tools/firmware-utils/src/mkchkimg.c @@ -31,6 +31,20 @@ #define MAX_BOARD_ID_LEN (64) +/* + * Note on the reserved field of the chk_header: + * OFW naming scheme is typically: DEVICENAME-VA.B.C.D_E.F.G.chk, with A-G + * between 0 and 255. For instance: EX3700_EX3800-V1.0.0.58_1.0.38.chk + * The reserved field works like this: + * reserved[0]: region code. 1 for WW (WorldWide) and 2 for NA (North America) + * reserved[1]: A + * reserved[2]: B + * reserved[3]: C + * reserved[4]: D + * reserved[5]: E + * reserved[6]: F + * reserved[7]: G + */ struct chk_header { uint32_t magic; uint32_t header_len; @@ -248,10 +262,10 @@ main (int argc, char * argv[]) hdr->reserved[1] = 1; /* Major */ hdr->reserved[2] = 1; /* Minor */ hdr->reserved[3] = 99; /* Build */ - hdr->reserved[4] = 0; /* Unknown t1 ? was 1 */ - hdr->reserved[5] = 0; /* Unknonw t2 ? was 0 */ - hdr->reserved[6] = 0; /* Unknonw t3 ? was 1 */ - hdr->reserved[7] = 0; /* Unused ? */ + hdr->reserved[4] = 0; + hdr->reserved[5] = 0; + hdr->reserved[6] = 0; + hdr->reserved[7] = 0; message (" Board Id: %s", board_id); message (" Region: %s", region == 1 ? "World Wide (WW)" : (region == 2 ? "North America (NA)" : "Unknown")); |