diff options
author | Chris Packham <judge.packham@gmail.com> | 2016-11-09 22:21:45 +1300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2016-12-01 09:10:49 +0100 |
commit | 2611c05e840033e4c4ab83115836d7657f5b316b (patch) | |
tree | e2f8dddf724ac0fcb5f9a45628a44f6ec4dc511b /tools/kwbimage.c | |
parent | 4bdb547978a289dc33be9ba72dbb0e861b4aa31b (diff) | |
download | u-boot-2611c05e840033e4c4ab83115836d7657f5b316b.zip u-boot-2611c05e840033e4c4ab83115836d7657f5b316b.tar.gz u-boot-2611c05e840033e4c4ab83115836d7657f5b316b.tar.bz2 |
tools/kwbimage: add DEBUG option
Offset 0x1 in the generated kwb image file is a set of flags, bit 0
enables debug output from the BootROM firmware. Allow a DEBUG option in
the kwb configuration to request debug output from the BootROM firmware.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools/kwbimage.c')
-rw-r--r-- | tools/kwbimage.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c index ad182c5..69844d9 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -69,6 +69,7 @@ struct image_cfg_element { IMAGE_CFG_PAYLOAD, IMAGE_CFG_DATA, IMAGE_CFG_BAUDRATE, + IMAGE_CFG_DEBUG, } type; union { unsigned int version; @@ -87,6 +88,7 @@ struct image_cfg_element { unsigned int nandpagesz; struct ext_hdr_v0_reg regdata; unsigned int baudrate; + unsigned int debug; }; }; @@ -425,6 +427,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, e = image_find_option(IMAGE_CFG_BAUDRATE); if (e) main_hdr->options = baudrate_to_option(e->baudrate); + e = image_find_option(IMAGE_CFG_DEBUG); + if (e) + main_hdr->flags = e->debug ? 0x1 : 0; binarye = image_find_option(IMAGE_CFG_BINARY); if (binarye) { @@ -579,6 +584,10 @@ static int image_create_config_parse_oneline(char *line, char *value = strtok_r(NULL, deliminiters, &saveptr); el->type = IMAGE_CFG_BAUDRATE; el->baudrate = strtoul(value, NULL, 10); + } else if (!strcmp(keyword, "DEBUG")) { + char *value = strtok_r(NULL, deliminiters, &saveptr); + el->type = IMAGE_CFG_DEBUG; + el->debug = strtoul(value, NULL, 10); } else { fprintf(stderr, "Ignoring unknown line '%s'\n", line); } |