Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A25AC54EBC for ; Thu, 12 Jan 2023 10:50:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4325D84E8F; Thu, 12 Jan 2023 11:50:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1673520631; bh=U5AjvzX+f29H3QsCKg4B9sbelnvBS/dKXB6C64m7p0Y=; h=Subject:From:To:Cc:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=lfQ/qU2b7RUw7wpAT742fErfyK+7lNP9GAUAO16w5FFBXmHB2AT64OIAAWFHjbXMJ 5+MirXGEBCNCUksmH2J+HczzW/peVqChNxzxJ80bSc0KJIHd8YgAb32fiD6ptphR1h dznJ9eh8xCxTM9qAUBQH2iY8e0Rmyp3RiOL6TC2APrnAL+HsLkQ+ihSBYAxthaU5LA SiWFZ4rii1EkSxfGyQT33VgbSbDnHjsu3eiLwrh28gShszpQ2Dl1Fy4XlueRUUgCI6 cy/LF+m/ROmTGiegIWr7CGrsiBCY320argH+GyJbm71o9JKu9XBck92HirqSF5VNk9 AGhYEaSm8sMCw== Received: from [192.168.1.107] (fibhost-66-247-38.fibernet.hu [85.66.247.38]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hs@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 3D0D084954; Thu, 12 Jan 2023 11:50:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1673520629; bh=U5AjvzX+f29H3QsCKg4B9sbelnvBS/dKXB6C64m7p0Y=; h=Reply-To:Subject:From:To:Cc:References:Date:In-Reply-To:From; b=X8unEYZhrNI1tqmgRhUc9Zm9possPoBQP5EgZ2yEzSuxGgxamysFI44BPZQaI+A9I m702rB1kL3Tk4eXCE7RDfEPm5nsFNZ/DIQYm0Bwt4oF36K6ErZYOhoizBmsmbx3QSr x5c43CWU08IKVbmWIHjRH+BHUlX/rT7VH9/wCWDrCdcUgM0kQ8LMH6dQJXKOlI7rYD fRJ9XfjuuOTqbGEDR3rvB9N3l9xphUmIE3Y2X41lgolvC0V4bW1m0eU3wMzqzFHUfV PB5bbNpnwnS9xGz6Ob4Dg6ux5qfegXQFg1lDTTaOrmnW+2zbzENbiAZbRRj6One2IZ U1sx80XM0g+2A== Subject: Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx From: Heiko Schocher To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: Tom Rini , u-boot@lists.denx.de, Simon Glass References: <20221230191238.6rcnia6rzoqcezx6@pali> <20230103170522.xngoc64fkyul5ojz@pali> <20230111001212.hel2amjcdjd5mdsz@pali> <9d583fd6-e750-a160-f547-8b400fab3959@denx.de> <20230111140137.GM3787616@bill-the-cat> <20230111175540.i3oguvf5lm7q4eyc@pali> <20230111180238.ucwi7iul46o2x2we@pali> <20230111181343.cpqn4yqb2jtlpgun@pali> Message-ID: Date: Thu, 12 Jan 2023 11:50:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: hs@denx.de Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hello Pali, On 12.01.23 07:27, Heiko Schocher wrote: > Hello Pali, > > On 11.01.23 19:13, Pali Rohár wrote: >> On Wednesday 11 January 2023 19:02:38 Pali Rohár wrote: >>> On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote: >>>> On Wednesday 11 January 2023 09:01:37 Tom Rini wrote: >>>>> On Wed, Jan 11, 2023 at 01:52:24PM +0100, Heiko Schocher wrote: >>>>>> Hello Pali, Tom, >>>>>> >>>>>> I just tried azure build with my socrates board updates based on >>>>>> v2023.01 and the 2 patches from Pali: >>>>>> >>>>>> http://patchwork.ozlabs.org/project/uboot/patch/20221228200437.30971-1-pali@kernel.org/ >>>>>> http://patchwork.ozlabs.org/project/uboot/patch/20221228200437.30971-2-pali@kernel.org/ >>>> >>>> At the time when I sent those two patches to ML, I checked that P1/P2 >>>> powerpc boards and also socrates board compiles successfully. >>>> >>>> Now I imported those two patches on top of the current master branch and >>>> they still compiles without any problems for socrates board. >>>> >>>>>> and get errors for powerpc build: >>>>>> >>>>>> https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601 >>>>>> >>>>>> socrates board builds fine ... my patches are socrates board specfic, >>>>>> so hopefully no impact for other boards ... >>>> >>>> From that build log it looks like that u-boot fails for socrates and >>>> kmcent2 board. Which is strange as you said that too that socrates is >>>> building fine... > > misreaded azure output, so socrates is failing because missing u-boot.dtb, > sorry. Interesting is, that my yocto build works ... > >>> >>> kmcent2 is expected to fail with my above two patches on top of the >>> v2023.01 without this kmcent2 commit which is now already in master: >>> https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7 >> >> And now I think I see the reason why it is failing also for socrates >> board. Error in the build log is: >> >> 2023-01-11T12:16:04.4937207Z +binman: [Errno 2] No such file or directory: 'u-boot.dtb' >> 2023-01-11T12:16:04.4937685Z +make[1]: *** [Makefile:1613: u-boot-dtb.bin] Error 1 > > Yup. > >> u-boot.dtb builds make by Makefile rule: >> >> u-boot.dtb: dts/dt.dtb >> $(call cmd,copy) >> >> But socrates-u-boot.dtsi has specified that use dts/dt.dtb and this >> dependency is also specified in Makefile. >> >> And it looks like that binman needs also u-boot.dtb file. So it is >> possible to hit a race condition, that make builds u-boot.dtb later than >> rule for binman. > > Exactly over this I stumbled yesterday in the evening and I made a local > fix: > > diff --git a/Makefile b/Makefile > index fb1454552a..60f5cffccd 100644 > --- a/Makefile > +++ b/Makefile > @@ -1609,7 +1609,7 @@ OBJCOPYFLAGS_u-boot-br.bin := -O binary -j .bootpg -j .resetvec > u-boot-br.bin: u-boot FORCE > $(call if_changed,objcopy) > else ifeq ($(CONFIG_TARGET_SOCRATES),y) > -u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE > +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb u-boot.dtb FORCE > $(call if_changed,binman) > endif > > >> I would suggest to try to apply this patch, which should instruct make >> to do not call binman until u-boot.dtb is correctly built: >> >> diff --git a/Makefile b/Makefile >> index 3c76486a620e..5d2ef8cc81c5 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1603,7 +1603,7 @@ OBJCOPYFLAGS_u-boot-br.bin := -O binary -j .bootpg -j .resetvec >> u-boot-br.bin: u-boot FORCE >> $(call if_changed,objcopy) >> else ifeq ($(CONFIG_TARGET_SOCRATES),y) >> -u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE >> +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE >> $(call if_changed,binman) >> endif >> >> diff --git a/arch/powerpc/dts/socrates-u-boot.dtsi b/arch/powerpc/dts/socrates-u-boot.dtsi >> index ba2e56d35675..f6af611b513c 100644 >> --- a/arch/powerpc/dts/socrates-u-boot.dtsi >> +++ b/arch/powerpc/dts/socrates-u-boot.dtsi >> @@ -9,7 +9,7 @@ >> pad-byte = <0xff>; >> // Place dtb one sector before u-boot-nodtb.bin >> blob { >> - filename = "dts/dt.dtb"; >> + filename = "u-boot.dtb"; >> }; >> u-boot-nodtb { >> filename = "u-boot-nodtb.bin"; >> >> >> Heiko, could you try to put commit 499fe577c8011dd8a9184548c419db42aef079a7 >> and above patch to your branch and retest it again? > > Of course! Just have to wait until other azure build finished... > > In the meantime I rebased my patchset to current HEAD, so above > commit is already in, and I had to adapt some patches for socrates. > > I write the results hopefully soon. Azure build successfully finished: https://dev.azure.com/hs0298/hs/_build/results?buildId=95&view=results U-Boot tree (contains the discussed fix on top): https://github.com/hsdenx/u-boot-test/commits/socrates-2023.01-v1 So, would you send a v2 of your 2 patches, including the above fix? If so, I pick them than up, and run a second azure build with them, before I post the socrates board updates... Else I can add the fix to my series... Thanks! bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de