[U-Boot] No BOOT_FROM tag build error

Hi,
My colleague Breno reported an issue with vf610twr_defconfig in U-Boot mainline.
Sometimes it fails like this:
CAT u-boot-dtb.bin COPY u-boot.dtb COPY u-boot.bin 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 make[1]: *** [u-boot-dtb.imx] Error 1 Makefile:911: recipe for target 'u-boot-dtb.imx' failed make: *** [u-boot-dtb.imx] Error 2 make: *** Waiting for unfinished jobs.... MKIMAGE u-boot.imx rm u-boot.imx
After this fails, if I run 'make -j4' then the build successfully completes in the second attempt.
I am able to reproduce it (not 100% though) with these steps:
make mrproper make vf610twr_defconfig make -j4
If I use just 'make' to build with a single core I never see the failure.
Recently Thomas also reported the same problem in the Buildroot autobuilder : http://lists.busybox.net/pipermail/buildroot/2018-March/215036.html
Does anyone have any idea on how to properly fix this issue?
Thanks,
Fabio Estevam

Hi Fabio,
On 08/03/2018 17:49, Fabio Estevam wrote:
Hi,
My colleague Breno reported an issue with vf610twr_defconfig in U-Boot mainline.
Sometimes it fails like this:
CAT u-boot-dtb.bin COPY u-boot.dtb COPY u-boot.bin 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 make[1]: *** [u-boot-dtb.imx] Error 1 Makefile:911: recipe for target 'u-boot-dtb.imx' failed make: *** [u-boot-dtb.imx] Error 2 make: *** Waiting for unfinished jobs.... MKIMAGE u-boot.imx rm u-boot.imx
After this fails, if I run 'make -j4' then the build successfully completes in the second attempt.
I am able to reproduce it (not 100% though) with these steps:
make mrproper make vf610twr_defconfig make -j4
If I use just 'make' to build with a single core I never see the failure.
I can confirm this - something happened after my last PR. I build vf610, too, before sending my PR to Tom, and there was no issue. Now buildman fails.
Recently Thomas also reported the same problem in the Buildroot autobuilder : http://lists.busybox.net/pipermail/buildroot/2018-March/215036.html
Does anyone have any idea on how to properly fix this issue?
Anyway, I) have just done what the error is saying:
diff --git a/board/freescale/vf610twr/imximage.cfg b/board/freescale/vf610twr/imximage.cfg index 70157ed..9ff4890 100644 --- a/board/freescale/vf610twr/imximage.cfg +++ b/board/freescale/vf610twr/imximage.cfg @@ -13,5 +13,7 @@ /* image version */ IMAGE_VERSION 2
+BOOT_FROM sd + /* Boot Offset 0x400, valid for both SD and NAND boot */ BOOT_OFFSET FLASH_OFFSET_STANDARD
And build works again. And I confirmed because I implemented in tools/imximage.c that there is a check: BOOT_FROM is mandatory to set the offset. Now, why this is reported just now and it did not happen before, and why this results just building with multiple thread, it is still a mistery for me.
Best regards, Stefano

Hi Stefano,
On Thu, Mar 8, 2018 at 2:00 PM, Stefano Babic sbabic@denx.de wrote:
Anyway, I) have just done what the error is saying:
diff --git a/board/freescale/vf610twr/imximage.cfg b/board/freescale/vf610twr/imximage.cfg index 70157ed..9ff4890 100644 --- a/board/freescale/vf610twr/imximage.cfg +++ b/board/freescale/vf610twr/imximage.cfg @@ -13,5 +13,7 @@ /* image version */ IMAGE_VERSION 2
+BOOT_FROM sd
/* Boot Offset 0x400, valid for both SD and NAND boot */ BOOT_OFFSET FLASH_OFFSET_STANDARD
Yes, I tried this change before here and it works for me, but still fails for Breno.
The curious thing is that sometime it builds fine, sometimes not in his machine even with this change applied.
It looks like a parallel build problem because I never see a failure when only 'make' is used instead of 'make -j4'.
Thanks

On 08/03/2018 18:20, Fabio Estevam wrote:
Hi Stefano,
On Thu, Mar 8, 2018 at 2:00 PM, Stefano Babic sbabic@denx.de wrote:
Anyway, I) have just done what the error is saying:
diff --git a/board/freescale/vf610twr/imximage.cfg b/board/freescale/vf610twr/imximage.cfg index 70157ed..9ff4890 100644 --- a/board/freescale/vf610twr/imximage.cfg +++ b/board/freescale/vf610twr/imximage.cfg @@ -13,5 +13,7 @@ /* image version */ IMAGE_VERSION 2
+BOOT_FROM sd
/* Boot Offset 0x400, valid for both SD and NAND boot */ BOOT_OFFSET FLASH_OFFSET_STANDARD
Yes, I tried this change before here and it works for me, but still fails for Breno.
The curious thing is that sometime it builds fine, sometimes not in his machine even with this change applied.
It looks like a parallel build problem because I never see a failure when only 'make' is used instead of 'make -j4'.
Confirmed - even with patch, running in a loop:
make mrproper;make vf610twr_defconfig; make -j8
I can trigger the error. In most cases it works. It looks to me that mkimake is called before board/freescale/vf610twr/imximage.cfg.cfgtmp has finished.
Stefano

Hi Stefano,
On Thu, Mar 8, 2018 at 2:40 PM, Stefano Babic sbabic@denx.de wrote:
Confirmed - even with patch, running in a loop:
make mrproper;make vf610twr_defconfig; make -j8
I can trigger the error. In most cases it works. It looks to me that mkimake is called before board/freescale/vf610twr/imximage.cfg.cfgtmp has finished.
I managed to fix this problem.
We are running some more build tests and then I will send a patch later today.
participants (2)
-
Fabio Estevam
-
Stefano Babic