* [U-Boot] [PATCH v3] imximage: Remove failure when no IVT offset is found
@ 2018-03-09 11:25 Fabio Estevam
2018-03-09 12:08 ` Stefano Babic
2018-04-06 23:56 ` [U-Boot] [U-Boot, " Trent Piepho
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2018-03-09 11:25 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@nxp.com>
Sometimes imximage throws the following error:
CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
MKIMAGE u-boot-dtb.imx
Error: No BOOT_FROM tag in board/freescale/vf610twr/imximage.cfg.cfgtmp
arch/arm/mach-imx/Makefile:100: recipe for target 'u-boot-dtb.imx' failed
Later on, when running mkimage for the u-boot.imx it will succeed in
finding the IVT offset.
Looks like some race condition happening during parallel build when
processing mkimage for u-boot-dtb.imx and u-boot.imx.
A proper fix still needs to be implemented, but as a workaround let's
remove the error when the IVT offset is not found.
It is useful to have such message, especially during bring-up phase,
but the build error that it causes is severe, so better avoid the
build error for now.
The error checking can be re-implemented later when we have a proper
fix.
Reported-by: Breno Lima <breno.lima@nxp.com>
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v2:
- Use my NXP address in the From field.
tools/imximage.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/tools/imximage.c b/tools/imximage.c
index eb7e682..ed9d935 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -777,11 +777,6 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name)
(*set_dcd_rst)(imxhdr, dcd_len, name, lineno);
fclose(fd);
- /* Exit if there is no BOOT_FROM field specifying the flash_offset */
- if (imximage_ivt_offset == FLASH_OFFSET_UNDEFINED) {
- fprintf(stderr, "Error: No BOOT_FROM tag in %s\n", name);
- exit(EXIT_FAILURE);
- }
return dcd_len;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH v3] imximage: Remove failure when no IVT offset is found
2018-03-09 11:25 [U-Boot] [PATCH v3] imximage: Remove failure when no IVT offset is found Fabio Estevam
@ 2018-03-09 12:08 ` Stefano Babic
2018-04-06 23:56 ` [U-Boot] [U-Boot, " Trent Piepho
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2018-03-09 12:08 UTC (permalink / raw)
To: u-boot
On 09/03/2018 12:25, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> Sometimes imximage throws the following error:
>
> CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
> CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
> MKIMAGE u-boot-dtb.imx
> Error: No BOOT_FROM tag in board/freescale/vf610twr/imximage.cfg.cfgtmp
> arch/arm/mach-imx/Makefile:100: recipe for target 'u-boot-dtb.imx' failed
>
> Later on, when running mkimage for the u-boot.imx it will succeed in
> finding the IVT offset.
>
> Looks like some race condition happening during parallel build when
> processing mkimage for u-boot-dtb.imx and u-boot.imx.
>
> A proper fix still needs to be implemented, but as a workaround let's
> remove the error when the IVT offset is not found.
>
> It is useful to have such message, especially during bring-up phase,
> but the build error that it causes is severe, so better avoid the
> build error for now.
>
> The error checking can be re-implemented later when we have a proper
> fix.
>
> Reported-by: Breno Lima <breno.lima@nxp.com>
> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Changes since v2:
> - Use my NXP address in the From field.
>
> tools/imximage.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/tools/imximage.c b/tools/imximage.c
> index eb7e682..ed9d935 100644
> --- a/tools/imximage.c
> +++ b/tools/imximage.c
> @@ -777,11 +777,6 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name)
> (*set_dcd_rst)(imxhdr, dcd_len, name, lineno);
> fclose(fd);
>
> - /* Exit if there is no BOOT_FROM field specifying the flash_offset */
> - if (imximage_ivt_offset == FLASH_OFFSET_UNDEFINED) {
> - fprintf(stderr, "Error: No BOOT_FROM tag in %s\n", name);
> - exit(EXIT_FAILURE);
> - }
> return dcd_len;
> }
As discussed, applied as fix for the release - thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] [U-Boot, v3] imximage: Remove failure when no IVT offset is found
2018-03-09 11:25 [U-Boot] [PATCH v3] imximage: Remove failure when no IVT offset is found Fabio Estevam
2018-03-09 12:08 ` Stefano Babic
@ 2018-04-06 23:56 ` Trent Piepho
1 sibling, 0 replies; 3+ messages in thread
From: Trent Piepho @ 2018-04-06 23:56 UTC (permalink / raw)
To: u-boot
On Fri, 2018-03-09 at 08:25 -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> Sometimes imximage throws the following error:
>
> CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
> CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
> MKIMAGE u-boot-dtb.imx
> Error: No BOOT_FROM tag in
> board/freescale/vf610twr/imximage.cfg.cfgtmp
> arch/arm/mach-imx/Makefile:100: recipe for target 'u-boot-dtb.imx'
> failed
>
> Later on, when running mkimage for the u-boot.imx it will succeed in
> finding the IVT offset.
>
> Looks like some race condition happening during parallel build when
> processing mkimage for u-boot-dtb.imx and u-boot.imx.
>
> A proper fix still needs to be implemented, but as a workaround let's
> remove the error when the IVT offset is not found.
I think the real problem here is that the command to produce an imx
from a bin file:
%.imx: %.bin
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
Creates, as part of the command, a temp file, imximage.cfg.cfgtmp. If
two or more images are made, they both create temp files with the same
name. The "CFGS" commands can run in parallel with each other and with
the "MKIMAGE" that uses the cfgtmp file they both produce.
Usual make practice would dictate that when creating intermediate
files, give them unique names, otherwise the operation can not be run
in parallel on different inputs.
I think the original idea was that all the imx image targets would
share a common cfgtmp file. But this doesn't work since each imx image
is created via an independent submake.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-06 23:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09 11:25 [U-Boot] [PATCH v3] imximage: Remove failure when no IVT offset is found Fabio Estevam
2018-03-09 12:08 ` Stefano Babic
2018-04-06 23:56 ` [U-Boot] [U-Boot, " Trent Piepho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox