Re: [U-Boot] [PATCH v4] ARM: mxs: tools: Add support for boot progress display flag

2014-11-20 Thread Stefano Babic
Hi Alexey,

On 11/10/2014 23:43, Alexey Ignatov wrote:
 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 lexsz...@gmail.com
 ---

After fixing a couple of checkpatch's warnings:

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4] ARM: mxs: tools: Add support for boot progress display flag

2014-10-12 Thread Alexey Ignatov
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 lexsz...@gmail.com
---
 arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg |  1 +
 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg   |  1 +
 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg   |  1 +
 doc/README.mxsimage| 13 +
 tools/mxsimage.c   | 16 ++--
 tools/mxsimage.h   |  5 +++--
 6 files changed, 25 insertions(+), 12 deletions(-)

Changes in v4:
- minor fix, removed parentheses in SB_IMAGE_FLAGS_MASK definition

Changes in v3:
- removed VERBOSEPROGRESS flag
- added DISPLAYPROGRESS flag to default mkimage configs, added documentation

v2 contained an error, don't use it.

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 @@ These semantics and rules will be outlined now.
 - 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 @@ These semantics and rules will be outlined now.
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..ab18041 100644
--- a/tools/mxsimage.c
+++ b/tools/mxsimage.c
@@ -125,7 +125,7 @@ struct sb_image_ctx {
unsigned intin_section:1;
unsigned intin_dcd:1;
/* Image configuration */
-   unsigned intverbose_boot:1;
+   unsigned intdisplay_progress:1;
unsigned intsilent_dump:1;
char*input_filename;
char*output_filename;
@@ -1308,8 +1308,7 @@ static int sb_prefill_image_header(struct sb_image_ctx 
*ictx)
sizeof(struct sb_sections_header) / SB_BLOCK_SIZE;
hdr-timestamp_us = sb_get_timestamp() * 100;
 
-   /* 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;
@@ -1427,6 +1426,12 @@ static int sb_parse_line(struct sb_image_ctx *ictx, 
struct sb_cmd_list *cmd)
}
 
cmd-cmd = rptr;
+   
+   /* set DISPLAY_PROGRESS flag */
+   if (!strcmp(tok, DISPLAYPROGRESS)) {
+   ictx-display_progress = 1;
+   return 0;
+   }
 
/* DCD */
if (!strcmp(tok, DCD)) {
@@ -1681,10 +1686,10 @@ static int sb_verify_image_header(struct sb_image_ctx 
*ictx,
 ntohs(hdr-component_version.minor),
 ntohs(hdr-component_version.revision));
 
-   if 

Re: [U-Boot] [PATCH v4] ARM: mxs: tools: Add support for boot progress display flag

2014-10-11 Thread Marek Vasut
On Saturday, October 11, 2014 at 11:43:30 PM, Alexey Ignatov wrote:
 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 lexsz...@gmail.com

Acked-by: Marek Vasut ma...@denx.de

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot