All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Stefan Agner <stefan@agner.ch>
Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] boot/grub2: fix build race condition
Date: Sat, 6 Aug 2022 11:08:21 +0200	[thread overview]
Message-ID: <20220806090821.GA3774782@scaer> (raw)
In-Reply-To: <c225549c7b76f63429e7fddcb13e38de3c8d30c9.1659683491.git.stefan@agner.ch>

Stefan, All,

On 2022-08-05 09:12 +0200, Stefan Agner spake thusly:
> Sometimes buildroot fails with:
> ../grub-core/kern/emu/hostfs.c:20:10: fatal error: config-util.h: No such file or directory
>    20 | #include <config-util.h>
>       |          ^~~~~~~~~~~~~~~
> 
> Add a patch which fixes the Makefile to correctly generate config-util.h
> first.
> 
> Note: This readds a work around to avoid re-running autoconf. This has
> previously been used to avoid having to run the rather complex build
> file generation machinery of GRUB2. See 7e64a050fb ("boot/grub2: Fix
> GRUB i386-pc build with Ubuntu gcc").

7e64a050fb also touched Makefile.util.am, so I had to check that this
was no onger needed, so I extended the commit log that touching
Makefile.in is indeed sufficient.

> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
[--SNIP--]
> diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
> index 57593330dd..6c9c80dc15 100644
> --- a/boot/grub2/grub2.mk
> +++ b/boot/grub2/grub2.mk
> @@ -13,6 +13,12 @@ GRUB2_DEPENDENCIES = host-bison host-flex host-grub2
>  HOST_GRUB2_DEPENDENCIES = host-bison host-flex
>  GRUB2_INSTALL_IMAGES = YES
>  
> +define GRUB2_AVOID_AUTORECONF

We usually add a comment to refer to the patch that requires such a
hook, so I added one.

> +       $(Q)touch $(@D)/Makefile.in

    $ make check-package
    boot/grub2/grub2.mk:18: expected indent with tabs

I fixed that too, and applied to master, thanks.

Regards,
Yann E. MORIN.

> +endef
> +GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF
> +HOST_GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF
> +
>  # CVE-2019-14865 is about a flaw in the grub2-set-bootflag tool, which
>  # doesn't exist upstream, but is added by the Redhat/Fedora
>  # packaging. Not applicable to Buildroot.
> -- 
> 2.37.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-08-06  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  7:12 [Buildroot] [PATCH v2] boot/grub2: fix build race condition Stefan Agner
2022-08-06  9:08 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220806090821.GA3774782@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=stefan@agner.ch \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.