Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Issues with Freescale defconfigs
@ 2018-11-22  9:45 Thomas Petazzoni
  2018-11-22 11:05 ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-11-22  9:45 UTC (permalink / raw)
  To: buildroot

Hello Fabio,

We have a similar issue with several Freescale defconfigs in Buildroot.
The U-Boot build fails with:

  CFGS    board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp
  CFGS    board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp
mv: cannot stat 'board/freescale/mx6qsabreauto/.mx6dl.cfg.cfgtmp.tmp': No such file or directory
arch/arm/imx-common/Makefile:75: recipe for target 'board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp' failed
make[2]: *** [board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp] Error 1

See:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/123771053
  https://gitlab.com/buildroot.org/buildroot/-/jobs/123771054
  https://gitlab.com/buildroot.org/buildroot/-/jobs/123771055

I started looking into this, but the problem is not really obvious.
Apparently, the if_changed_dep function does a mv:

if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ),                  \
        @set -e;                                                             \
        $(echo-cmd) $(cmd_$(1));                                             \
        scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\
        rm -f $(depfile);                                                    \
        mv -f $(dot-target).tmp $(dot-target).cmd)

And this final mv fails because the file $(dot-target).tmp has not been
created. Indeed, the command creates mx6dl.cfg.cfgtmp, but the mv
expects .mx6dl.cfg.cfgtmp

Are you aware of this issue ? Any solution ?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] Issues with Freescale defconfigs
  2018-11-22  9:45 [Buildroot] Issues with Freescale defconfigs Thomas Petazzoni
@ 2018-11-22 11:05 ` Fabio Estevam
  2018-11-22 12:43   ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2018-11-22 11:05 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Thu, Nov 22, 2018 at 7:46 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Fabio,
>
> We have a similar issue with several Freescale defconfigs in Buildroot.
> The U-Boot build fails with:
>
>   CFGS    board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp
>   CFGS    board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp
> mv: cannot stat 'board/freescale/mx6qsabreauto/.mx6dl.cfg.cfgtmp.tmp': No such file or directory
> arch/arm/imx-common/Makefile:75: recipe for target 'board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp' failed
> make[2]: *** [board/freescale/mx6qsabreauto/mx6dl.cfg.cfgtmp] Error 1

I sent a workaround for Buildroot for some targets:
0c4bccf9e882 ("configs/imxsabre: Fix U-Boot parallel build issue")

Then later this issue was properly fixed in U-Boot mainline by commit:

commit f916757300c15aa1a3f0ccc98e7abb8a84c97da0
Author: Trent Piepho <tpiepho@impinj.com>
Date:   Fri Apr 6 17:11:27 2018 -0700

    imx: Create distinct pre-processed mkimage config files

    Each imx image is created by a separate sub-make and during this process
    the mkimage config file is run though cpp.

    The cpp output is to the same file no matter what imx image is being
    created.

    This means if two imx images are generated in parallel they will attempt
    to independently produce the same pre-processed mkimage config file at
    the same time.

    Avoid the problem by making the pre-processed config file name unique
    based on the imx image it will be used in.  This way each image will
    create a unique config file and they won't clobber each other when run
    in parallel.

    This should fixed the build bug referenced in b5b0e4e3 ("imximage:
    Remove failure when no IVT offset is found").

    Cc: Breno Lima <breno.lima@nxp.com>
    Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
    Cc: Fabio Estevam <fabio.estevam@nxp.com>
    Signed-off-by: Trent Piepho <tpiepho@impinj.com>
    Tested-by: Fabio Estevam <fabio.estevam@nxp.com>

which does not exist in the NXP U-Boot tree.

So the proper fix is to apply either Trent's official fix or my
workaround to all rel_imx_4.9.x_1.0.0_ga NXP U-Boot users.

I haven't checked whether Trent's patch would apply cleanly or with
some minor changes.

Any preferences?

Will investigate it.

Regards,

Fabio Estevam

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

* [Buildroot] Issues with Freescale defconfigs
  2018-11-22 11:05 ` Fabio Estevam
@ 2018-11-22 12:43   ` Thomas Petazzoni
  2018-11-22 18:57     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-11-22 12:43 UTC (permalink / raw)
  To: buildroot

Hello Fabio,

Thanks for your feedback!

On Thu, 22 Nov 2018 09:05:30 -0200, Fabio Estevam wrote:

> So the proper fix is to apply either Trent's official fix or my
> workaround to all rel_imx_4.9.x_1.0.0_ga NXP U-Boot users.

The fix from Trent looks like the right thing to do. Can we backport it
for the few boards that are affected, and add the patch in Buildroot ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] Issues with Freescale defconfigs
  2018-11-22 12:43   ` Thomas Petazzoni
@ 2018-11-22 18:57     ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-11-22 18:57 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Thu, Nov 22, 2018 at 10:43 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:

> The fix from Trent looks like the right thing to do. Can we backport it
> for the few boards that are affected, and add the patch in Buildroot ?

Just sent a patch. Could you please verify if it fixes the build error
on the autobuiilder?

Thanks

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

end of thread, other threads:[~2018-11-22 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22  9:45 [Buildroot] Issues with Freescale defconfigs Thomas Petazzoni
2018-11-22 11:05 ` Fabio Estevam
2018-11-22 12:43   ` Thomas Petazzoni
2018-11-22 18:57     ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox