[U-Boot] [PATCH] tegra: Indicate that binman makes all three output files

Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Signed-off-by: Simon Glass sjg@chromium.org ---
Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 4b3023b259..489b3deef3 100644 --- a/Makefile +++ b/Makefile @@ -1234,8 +1234,9 @@ endif
ifneq ($(CONFIG_TEGRA),) ifneq ($(CONFIG_BINMAN),) -u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin: \ - spl/u-boot-spl u-boot.bin FORCE +# Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin +%-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: \ + spl/%-spl %.bin FORCE $(call if_changed,binman) else OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)

On 07/20/2018 07:49 PM, Simon Glass wrote:
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Tested-by: Stephen Warren swarren@nvidia.com
(This make feature is very odd; specifying n targets without a % means they're separate rules, but specifying n targets with a % means it's a single rule that generates n targets. Nice inconsistency on make's part!)

On 07/23/2018 09:27 AM, Stephen Warren wrote:
On 07/20/2018 07:49 PM, Simon Glass wrote:
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Tested-by: Stephen Warren swarren@nvidia.com
(This make feature is very odd; specifying n targets without a % means they're separate rules, but specifying n targets with a % means it's a single rule that generates n targets. Nice inconsistency on make's part!)
Any chance we can apply this ASAP to the main u-boot.git master branch? Pretty much all my Jenkins builds are failing some random subset of boards because of this issue. Thanks.

On Thu, Jul 26, 2018 at 01:37:31PM -0600, Stephen Warren wrote:
On 07/23/2018 09:27 AM, Stephen Warren wrote:
On 07/20/2018 07:49 PM, Simon Glass wrote:
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Tested-by: Stephen Warren swarren@nvidia.com
(This make feature is very odd; specifying n targets without a % means they're separate rules, but specifying n targets with a % means it's a single rule that generates n targets. Nice inconsistency on make's part!)
Any chance we can apply this ASAP to the main u-boot.git master branch? Pretty much all my Jenkins builds are failing some random subset of boards because of this issue. Thanks.
If Tom W is fine, I'm happy to pick it up directly.

I don't usually weigh in on makefile issues, but if Stephen says it's needed, let's get it in.
-----Original Message----- From: Tom Rini trini@konsulko.com Sent: Thursday, July 26, 2018 12:40 PM To: Stephen Warren swarren@wwwdotorg.org Cc: Simon Glass sjg@chromium.org; U-Boot Mailing List u-boot@lists.denx.de; Stephen Warren swarren@nvidia.com; Tom Warren TWarren@nvidia.com Subject: Re: [PATCH] tegra: Indicate that binman makes all three output files
On Thu, Jul 26, 2018 at 01:37:31PM -0600, Stephen Warren wrote:
On 07/23/2018 09:27 AM, Stephen Warren wrote:
On 07/20/2018 07:49 PM, Simon Glass wrote:
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Tested-by: Stephen Warren swarren@nvidia.com
(This make feature is very odd; specifying n targets without a % means they're separate rules, but specifying n targets with a % means it's a single rule that generates n targets. Nice inconsistency on make's part!)
Any chance we can apply this ASAP to the main u-boot.git master branch? Pretty much all my Jenkins builds are failing some random subset of boards because of this issue. Thanks.
If Tom W is fine, I'm happy to pick it up directly.
-- Tom ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------

Hi Stephen,
On 23 July 2018 at 09:27, Stephen Warren swarren@wwwdotorg.org wrote:
On 07/20/2018 07:49 PM, Simon Glass wrote:
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Tested-by: Stephen Warren swarren@nvidia.com
(This make feature is very odd; specifying n targets without a % means they're separate rules, but specifying n targets with a % means it's a single rule that generates n targets. Nice inconsistency on make's part!)
I know. It's like they are trying to reuse syntax across different functionality. I don't really understand why, but there might be a theoretical basis.
Regards, Simon

On Fri, Jul 20, 2018 at 07:49:27PM -0600, Simon Glass wrote:
Use GNU make pattern rules to indicate that a single run of binman produces all three Tegra output files. The avoids make running binman three times (perhaps in parallel) and those instances inteferring with each other.
See http://patchwork.ozlabs.org/patch/944611/ for the bug report.
Signed-off-by: Simon Glass sjg@chromium.org Tested-by: Stephen Warren swarren@nvidia.com
Applied to u-boot/master, thanks!
participants (4)
-
Simon Glass
-
Stephen Warren
-
Tom Rini
-
Tom Warren