All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks
@ 2018-04-23 18:35 Bryan O'Donoghue
  2018-04-23 18:37 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan O'Donoghue @ 2018-04-23 18:35 UTC (permalink / raw)
  To: u-boot

commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line")
adds an 0x prefix to each HAB Block number to make it easier for host tools
to process the HAB Block output, however it neglects to apply the same
prefix to the DCD Blocks directive. You need the DCD Blocks directive if
you are making a u-boot recovery image which the BootROM will accept via
the USB upload utility.

This disparity results in a fruity output like this with HAB Blocks
prefixed but DCD Blocks not prefixed - which is pretty inconsistent.

This patch fixes the difference assuming the original commit was a
legitimate change.

Old:
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00066c00
DCD Blocks:   00910000 0000002c 000001d4

New:
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00066c00
DCD Blocks:   0x00910000 0x0000002c 0x000001d4

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
---
 tools/imximage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/imximage.c b/tools/imximage.c
index 6dabb13520..6f16d45351 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -520,7 +520,7 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
 			       (uint32_t)fhdr_v2->self, 0,
 			       hdr_v2->boot_data.size - imximage_ivt_offset -
 			       imximage_csf_size);
-			printf("DCD Blocks:   00910000 %08x %08x\n",
+			printf("DCD Blocks:   0x00910000 0x%08x 0x%08x\n",
 			       offs, be16_to_cpu(dcdlen));
 		}
 	} else {
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks
  2018-04-23 18:35 [U-Boot] [PATCH] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks Bryan O'Donoghue
@ 2018-04-23 18:37 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2018-04-23 18:37 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 23, 2018 at 3:35 PM, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
> commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line")
> adds an 0x prefix to each HAB Block number to make it easier for host tools
> to process the HAB Block output, however it neglects to apply the same
> prefix to the DCD Blocks directive. You need the DCD Blocks directive if
> you are making a u-boot recovery image which the BootROM will accept via
> the USB upload utility.
>
> This disparity results in a fruity output like this with HAB Blocks
> prefixed but DCD Blocks not prefixed - which is pretty inconsistent.
>
> This patch fixes the difference assuming the original commit was a
> legitimate change.
>
> Old:
> Image Type:   Freescale IMX Boot Image
> Image Ver:    2 (i.MX53/6/7 compatible)
> Mode:         DCD
> Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
> Load Address: 877ff420
> Entry Point:  87800000
> HAB Blocks:   0x877ff400 0x00000000 0x00066c00
> DCD Blocks:   00910000 0000002c 000001d4
>
> New:
> Image Type:   Freescale IMX Boot Image
> Image Ver:    2 (i.MX53/6/7 compatible)
> Mode:         DCD
> Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
> Load Address: 877ff420
> Entry Point:  87800000
> HAB Blocks:   0x877ff400 0x00000000 0x00066c00
> DCD Blocks:   0x00910000 0x0000002c 0x000001d4
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Breno Lima <breno.lima@nxp.com>

I am all for consistency :-)

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-23 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 18:35 [U-Boot] [PATCH] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks Bryan O'Donoghue
2018-04-23 18:37 ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.