ARM: mxs: tools: Add support for boot progress display flag
mkimage -T mxs now support new flag in config file:
DISPLAYPROGRESS - makes boot process print HTLLC characters for each BootROM
instruction.
Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg
index 1520bba..83953da 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg
+++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg
@@ -1,3 +1,4 @@
+DISPLAYPROGRESS
SECTION 0x0 BOOTABLE
TAG LAST
LOAD 0x1000 spl/u-boot-spl.bin
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
index 55510e9..e702809 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
+++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
@@ -1,3 +1,4 @@
+DISPLAYPROGRESS
SECTION 0x0 BOOTABLE
TAG LAST
LOAD 0x1000 spl/u-boot-spl.bin
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg
index bb78cb0..3f7bf59 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg
+++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg
@@ -1,3 +1,4 @@
+DISPLAYPROGRESS
SECTION 0x0 BOOTABLE
TAG LAST
LOAD 0x1000 spl/u-boot-spl.bin
diff --git a/doc/README.mxsimage b/doc/README.mxsimage
index 0d31cba..c3975ee 100644
--- a/doc/README.mxsimage
+++ b/doc/README.mxsimage
@@ -27,7 +27,7 @@
- Each line of the configuration file contains exactly one instruction.
- Every numeric value must be encoded in hexadecimal and in format 0xabcdef12 .
- The configuration file is a concatenation of blocks called "sections" and
- optionally "DCD blocks" (see below).
+ optionally "DCD blocks" (see below), and optional flags lines.
- Each "section" is started by the "SECTION" instruction.
- The "SECTION" instruction has the following semantics:
@@ -139,9 +139,14 @@
NOOP
- This instruction does nothing.
-- If the verbose output from the BootROM is enabled, the BootROM will produce a
- letter on the Debug UART for each instruction it started processing. Here is a
- mapping between the above instructions and the BootROM verbose output:
+ - An optional flags lines can be one of the following:
+
+ DISPLAYPROGRESS
+ - Enable boot progress output form the BootROM.
+
+- If the boot progress output from the BootROM is enabled, the BootROM will
+ produce a letter on the Debug UART for each instruction it started processing.
+ Here is a mapping between the above instructions and the BootROM output:
H -- SB Image header loaded
T -- TAG instruction
diff --git a/tools/mxsimage.c b/tools/mxsimage.c
index 81c7f2d..0d5b0ea 100644
--- a/tools/mxsimage.c
+++ b/tools/mxsimage.c
@@ -125,7 +125,7 @@
unsigned int in_section:1;
unsigned int in_dcd:1;
/* Image configuration */
- unsigned int verbose_boot:1;
+ unsigned int display_progress:1;
unsigned int silent_dump:1;
char *input_filename;
char *output_filename;
@@ -1308,8 +1308,8 @@
sizeof(struct sb_sections_header) / SB_BLOCK_SIZE;
hdr->timestamp_us = sb_get_timestamp() * 1000000;
- /* FIXME -- add proper config option */
- hdr->flags = ictx->verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0,
+ hdr->flags = ictx->display_progress ?
+ SB_IMAGE_FLAG_DISPLAY_PROGRESS : 0;
/* FIXME -- We support only default key */
hdr->key_count = 1;
@@ -1428,6 +1428,12 @@
cmd->cmd = rptr;
+ /* set DISPLAY_PROGRESS flag */
+ if (!strcmp(tok, "DISPLAYPROGRESS")) {
+ ictx->display_progress = 1;
+ return 0;
+ }
+
/* DCD */
if (!strcmp(tok, "DCD")) {
ictx->in_section = 0;
@@ -1681,10 +1687,11 @@
ntohs(hdr->component_version.minor),
ntohs(hdr->component_version.revision));
- if (hdr->flags & ~SB_IMAGE_FLAG_VERBOSE)
+ if (hdr->flags & ~SB_IMAGE_FLAGS_MASK)
ret = -EINVAL;
soprintf(ictx, "%s Image flags: %s\n", stat[!!ret],
- hdr->flags & SB_IMAGE_FLAG_VERBOSE ? "Verbose_boot" : "");
+ hdr->flags & SB_IMAGE_FLAG_DISPLAY_PROGRESS ?
+ "Display_progress" : "");
if (ret)
return ret;
@@ -2287,7 +2294,6 @@
ctx.cfg_filename = params->imagename;
ctx.output_filename = params->imagefile;
- ctx.verbose_boot = 1;
ret = sb_build_tree_from_cfg(&ctx);
if (ret)
diff --git a/tools/mxsimage.h b/tools/mxsimage.h
index 6cd59d2..88f72eb 100644
--- a/tools/mxsimage.h
+++ b/tools/mxsimage.h
@@ -81,8 +81,9 @@
#define SB_VERSION_MAJOR 1
#define SB_VERSION_MINOR 1
-/* Enable to HTLLC verbose boot report. */
-#define SB_IMAGE_FLAG_VERBOSE (1 << 0)
+/* Enable to HTLLC boot report. */
+#define SB_IMAGE_FLAG_DISPLAY_PROGRESS (1 << 0)
+#define SB_IMAGE_FLAGS_MASK SB_IMAGE_FLAG_DISPLAY_PROGRESS
struct sb_key_dictionary_key {
/* The CBC-MAC of image and sections header. */