From patchwork Mon Dec 3 07:50:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF7C8109C for ; Mon, 3 Dec 2018 07:51:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3E2A2AD48 for ; Mon, 3 Dec 2018 07:51:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E20422AD55; Mon, 3 Dec 2018 07:51:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48C652AD51 for ; Mon, 3 Dec 2018 07:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725846AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60228 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O2009296; Mon, 3 Dec 2018 16:51:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O2009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823465; bh=dCLplUBM+3R1bEdXjczaPed5zfwez0ZYRnU/1stqcvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=co1Q0A6S09DDXYdLbai/ARiMGRuDBTzjrztRh3tKnHV6lLzqM+7p1ZW8uykqIeZ3B Z5mSPpNSOtsMDChV2kO+V+DrN1/CXWePoZxwg3+aLsjiqLsWzVLZMAp0ZkTDkOgMTT +EEYd22lpK/IJVIwWYc1SVxNdMMoHRD+gazX31L+x71aB/lUu0NrSgscWkazKAiA+s DpqyMwt8Y2AdzjhHCTxj4nonDzbhGwjyGKuZWYgwL6yWs+8MGOUaQLbhdFq6FIcITn j6ZrkxQOd3Ps07Fvz3rW0vIdoMZISub/EIbG7kKPtRONjIYal+yTdNgvPd3toJenjK hL5OIO32hYfSQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 1/7] microblaze: fix cleaning of boot images Date: Mon, 3 Dec 2018 16:50:51 +0900 Message-Id: <1543823457-32478-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The simpleImage.
target generates the following files: arch/microblaze/boot/simpleImage.
arch/microblaze/boot/simpleImage.
.ub arch/microblaze/boot/simpleImage.
.strip arch/microblaze/boot/simpleImage.
.unstrip However, "make ARCH=microblaze clean" only cleans up the unstrip image. Fix the clean-files to take care of all the four. Adding linux.bin.ub to clean-files is redundant because it is already added into "targets". Signed-off-by: Masahiro Yamada Reviewed-by: Michal Simek --- arch/microblaze/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile index 600e5a1..e8684a2 100644 --- a/arch/microblaze/boot/Makefile +++ b/arch/microblaze/boot/Makefile @@ -37,4 +37,4 @@ $(obj)/simpleImage.%: vmlinux FORCE $(call if_changed,strip,.strip) @echo 'Kernel: $(UIMAGE_OUT) is ready' ' (#'`cat .version`')' -clean-files += simpleImage.*.unstrip linux.bin.ub +clean-files += simpleImage.* From patchwork Mon Dec 3 07:50:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CE1213AF for ; Mon, 3 Dec 2018 07:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2D8F2AD24 for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F10FC2AD8F; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFEE32AD24 for ; Mon, 3 Dec 2018 07:52:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725915AbeLCHvr (ORCPT ); Mon, 3 Dec 2018 02:51:47 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60226 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O3009296; Mon, 3 Dec 2018 16:51:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O3009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823466; bh=X+Ozr6bkbkkxWvX5eFcOqnRQyZl1A0qa0bpJxN9vF1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D1aZ88oQU7buOx7u7Z7XmXYq07dthDQsllFU/J2lWxPfDVpDDj+LeUx8m0uNXap0d 8uPs6M35aPTOAH4D564THzMJNCXpBr8wx3pF9N3zIAuYxifegzaFdC4YPWT2prDInM n8pa3AW5yPiaTszt6kmgmkNb3ELxSeoICXWjzf3JQMWeVile8NhDVBWGOMQhrYzBx4 n7Z7gDLiWHB2o1mP5PD8uHdUiOUz45cfLOewNYTyVeHeitvQ5nt4PW9GZ2HjidQwLB pekTXRm9JSjQZB0VKzwhLybFvIRliI+7hKXArdy0/Gll7RjnWjxEdq5Uz4lryxlDhO m8hhBfA2lEAng== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/7] microblaze: adjust the help to the real behavior Date: Mon, 3 Dec 2018 16:50:52 +0900 Message-Id: <1543823457-32478-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "make ARCH=microblaze help" mentions simpleImage.
.unstrip, but it never works because Makefile assumes "system.unstrip" is the name of DT. $ make ARCH=microblaze CROSS_COMPILE=microblaze-linux- simpleImage.system.unstrip [ snip ] make[1]: *** No rule to make target 'arch/microblaze/boot/dts/system.unstrip.dtb', needed by 'arch/microblaze/boot/dts/system.dtb'. Stop. make: *** [Makefile;1060: arch/microblaze/boot/dts] Error 2 make: *** Waiting for unfinished jobs.... Rip off the never-working target. In my understanding, simpleImage.
works like a phony target that generates multiple images. Reflect the behavior to the help message. Signed-off-by: Masahiro Yamada --- arch/microblaze/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 0823d29..97e1384 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -89,9 +89,7 @@ define archhelp echo '* linux.bin - Create raw binary' echo ' linux.bin.gz - Create compressed raw binary' echo ' linux.bin.ub - Create U-Boot wrapped raw binary' - echo ' simpleImage.
- ELF image with $(arch)/boot/dts/
.dts linked in' - echo ' - stripped elf with fdt blob' - echo ' simpleImage.
.unstrip - full ELF image with fdt blob' + echo ' simpleImage.
- Create images with $(arch)/boot/dts/
.dts linked in' echo ' *_defconfig - Select default config from arch/microblaze/configs' echo '' echo ' Targets with
embed a device tree blob inside the image' From patchwork Mon Dec 3 07:50:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3681D109C for ; Mon, 3 Dec 2018 07:52:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 299092AD67 for ; Mon, 3 Dec 2018 07:52:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27C542AD86; Mon, 3 Dec 2018 07:52:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C49532AD90 for ; Mon, 3 Dec 2018 07:52:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725845AbeLCHvq (ORCPT ); Mon, 3 Dec 2018 02:51:46 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60222 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O4009296; Mon, 3 Dec 2018 16:51:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O4009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823466; bh=Vb/3OPGyTEOlXKRrpP3pR6+EXfznXh75TNXsZGFgG5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UosMbsE9r86oY8zuhVPhKXTYvfuO+KGkDW/MfMF0ZL9Fg6V9k67jxJz4J4UHniaMg ZyDwApNHqd+KjJvC2okGlAIzRY9gfsrToRdiunxTuVd8xGQdvOMsoOHmP0bJbdIo7k 7fZ1Mxn9+AogTfDLbtaZOoyD2hUbAzN+rEBcHsxsb93b7HHrS0CoQ7j4kXO2mTHrBG /YY0VqtAly3JGbW9jAuX/c38ef6mEQMdy3xHi3v18Vcl1/5XmZ100ewlpGCZrfee0V EtjmsQezg7LvUKzgOsHXV818M71ZKxIDMqI0hnBXCIESHca099DjRKjUj5KzNmABQ2 KLhuUAOPzp0uw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 3/7] microblaze: move "... is ready" message to arch/microblaze/Makefile Date: Mon, 3 Dec 2018 16:50:53 +0900 Message-Id: <1543823457-32478-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To prepare for more fixes, move this to arch/microblaze/Makefile. Otherwise, the same "... is ready" would be printed multiple times. (Another solution would be, to remove these messages entirely unless people persist with them.) Signed-off-by: Masahiro Yamada --- arch/microblaze/Makefile | 2 ++ arch/microblaze/boot/Makefile | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 97e1384..cfd7bfca 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -81,9 +81,11 @@ archclean: linux.bin linux.bin.gz linux.bin.ub: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' simpleImage.%: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' define archhelp echo '* linux.bin - Create raw binary' diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile index e8684a2..c2579a7 100644 --- a/arch/microblaze/boot/Makefile +++ b/arch/microblaze/boot/Makefile @@ -9,15 +9,12 @@ OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary $(obj)/linux.bin: vmlinux FORCE $(call if_changed,objcopy) - @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' $(obj)/linux.bin.ub: $(obj)/linux.bin FORCE $(call if_changed,uimage) - @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE $(call if_changed,gzip) - @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' quiet_cmd_cp = CP $< $@$2 cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) @@ -35,6 +32,5 @@ $(obj)/simpleImage.%: vmlinux FORCE $(call if_changed,objcopy) $(call if_changed,uimage) $(call if_changed,strip,.strip) - @echo 'Kernel: $(UIMAGE_OUT) is ready' ' (#'`cat .version`')' clean-files += simpleImage.* From patchwork Mon Dec 3 07:50:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 249F813AF for ; Mon, 3 Dec 2018 07:52:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 199DC2AD63 for ; Mon, 3 Dec 2018 07:52:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E0F12AD72; Mon, 3 Dec 2018 07:52:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9159E2AD8B for ; Mon, 3 Dec 2018 07:52:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726031AbeLCHwf (ORCPT ); Mon, 3 Dec 2018 02:52:35 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60223 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbeLCHvq (ORCPT ); Mon, 3 Dec 2018 02:51:46 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O5009296; Mon, 3 Dec 2018 16:51:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O5009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823467; bh=N3TI1A9AeQ18M6YQzJK3Suotjnv/hQbugG9ua8UooFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qOXUclZnmGfmbYye2xzrhTbJ/HPvgbKywwAONv2rDzg78K8m8PKV9PCdRZFgF02DQ FQMPA8LE07kjpVBXJZc6Q2yNhdZ4yhedK0twttF9zlLsh488j5/DarYqqwy1lpbe/G tPLBPPTreOQ629DGmWsfJr13xfsoXW1u/7QQ1PPp/c6BP1SRaPNdzjKb6FvXQ6Y0Bw HcH+LeGV7AG60qaxXLRnk4+ng2siCf7p3IdJBvlvUBxKYuZUP7HUCUhFlp5TCvARvg yJAaZ/Uv2OXE4hAzanNqOuUETV+pRPe2SZbJfFXT0cAyFMWWeSYR3dZ196ndjskMH+ woaC0V4mvdXbA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 4/7] microblaze: fix multiple bugs in arch/microblaze/boot/Makefile Date: Mon, 3 Dec 2018 16:50:54 +0900 Message-Id: <1543823457-32478-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This Makefile is wrong in multiple ways. The first issue is the breakage of 'linux.bin.ub' target since commit ece97f3a5fb5 ("microblaze: Fix simpleImage format generation") because the addition of UIMAGE_{IN,OUT} obviously affected it. make ARCH=microblaze CROSS_COMPILE=microblaze-linux- linux.bin.ub [ snip ] OBJCOPY arch/microblaze/boot/linux.bin UIMAGE arch/microblaze/boot/linux.bin.ub.ub /usr/bin/mkimage: Can't open arch/microblaze/boot/linux.bin.ub: No such file or directory make[1]: *** [arch/microblaze/boot/Makefile;14: arch/microblaze/boot/linux.bin.ub] Error 1 make: *** [arch/microblaze/Makefile;83: linux.bin.ub] Error 2 The second issue is the use of the "if_changed" multiple times for the same target. As commit 92a4728608a8 ("x86/boot: Fix if_changed build flip/flop bug") pointed out, this never works properly. Moreover, generating multiple images as a side-effect is extremely confusing and wrong. As far as I understood, "simpleImage.
" works like a phony target to generate the following four images. - arch/microblaze/boot/simpleImage.
: identical to arch/microblaze/boot/linux.bin - arch/microblaze/boot/simpleImage.
.unstrip: identical to vmlinux - arch/microblaze/boot/simpleImage.
.ub: identical to arch/microblaze/boot/linux.bin.ub - arch/microblaze/boot/simpleImage.
.strip: stripped vmlinux The first three are just aliases of other images. Separate the recipe for each image. Signed-off-by: Masahiro Yamada Acked-by: Michal Simek --- arch/microblaze/Makefile | 2 +- arch/microblaze/boot/Makefile | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index cfd7bfca..c5d5b0e 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -84,7 +84,7 @@ linux.bin linux.bin.gz linux.bin.ub: vmlinux @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' simpleImage.%: vmlinux - $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + $(Q)$(MAKE) $(build)=$(boot) simple_images @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' define archhelp diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile index c2579a7..f12a9d7 100644 --- a/arch/microblaze/boot/Makefile +++ b/arch/microblaze/boot/Makefile @@ -3,7 +3,7 @@ # arch/microblaze/boot/Makefile # -targets := linux.bin linux.bin.gz linux.bin.ub simpleImage.% +targets := linux.bin linux.bin.gz linux.bin.ub simpleImage.*.strip OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary @@ -16,21 +16,26 @@ $(obj)/linux.bin.ub: $(obj)/linux.bin FORCE $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE $(call if_changed,gzip) -quiet_cmd_cp = CP $< $@$2 - cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) - quiet_cmd_strip = STRIP $< $@$2 cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \ -K _fdt_start $< -o $@$2 UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR) -UIMAGE_IN = $@ -UIMAGE_OUT = $@.ub -$(obj)/simpleImage.%: vmlinux FORCE - $(call if_changed,cp,.unstrip) - $(call if_changed,objcopy) - $(call if_changed,uimage) - $(call if_changed,strip,.strip) +PHONY += simple_images +simple_images: $(addprefix $(obj)/simpleImage., $(DTB) $(DTB).ub $(DTB).unstrip $(DTB).strip) + @: + +$(obj)/simpleImage.$(DTB): $(obj)/linux.bin + $(call cmd,shipped) + +$(obj)/simpleImage.$(DTB).ub: $(obj)/linux.bin.ub + $(call cmd,shipped) + +$(obj)/simpleImage.$(DTB).unstrip: vmlinux + $(call cmd,shipped) + +$(obj)/simpleImage.$(DTB).strip: vmlinux FORCE + $(call if_changed,strip) clean-files += simpleImage.* From patchwork Mon Dec 3 07:50:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F69D13AF for ; Mon, 3 Dec 2018 07:51:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 350BB2AD25 for ; Mon, 3 Dec 2018 07:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 294BF2AD5D; Mon, 3 Dec 2018 07:51:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F6232AD25 for ; Mon, 3 Dec 2018 07:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725842AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60227 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O6009296; Mon, 3 Dec 2018 16:51:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O6009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823468; bh=FqpO5zyD2YzdwZn60QrxTfZLs1HKycrr9Un4ocfeCp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EH0dGTpSvfi7tLAoqRthaOukjr3aF6e5c12jc0poD3DMKbnmLQaMmEpwea5mygBTo SlqFCaNd7+9WMnwKtBFIBRHr6AHKlyOltByXcWVAy8sJiyMr8xwenYXw+Ap+og7Q3h Bf230MH+FMvDz4YTdjaAaDvCBZ79X7X9I9igA3paNuEbl9GCpSrOjQ4MpgdWYEMCG9 Wv49gXnotJ5PVrLcfM/PR1ZgMW+wpnQGRln+PSOGUY3/23Vbjtxb61dqV4pSXnIrf4 Wd84u+NgbLvWkLd4o7OYlhiAcX6ssZZAqWpV6OTE2+7C0/CWOeIkkgscwasWD7eg5W aLjKoRWyTobGg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 5/7] microblaze: add linux.bin* and simpleImage.* to PHONY Date: Mon, 3 Dec 2018 16:50:55 +0900 Message-Id: <1543823457-32478-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP linux.bin, linux.bin.gz, and linux.bin.ub are phony targets to generate a corresponding image under arch/microblaze/boot/. simpleImage.% also works like a PHONY target, but a pattern that contains '%' cannot be a PHONY target. I renamed it to equivalent simpleImage.$(DTB). Signed-off-by: Masahiro Yamada Acked-by: Michal Simek --- arch/microblaze/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index c5d5b0e..7a5df02 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -79,11 +79,13 @@ all: linux.bin archclean: $(Q)$(MAKE) $(clean)=$(boot) +PHONY += linux.bin linux.bin.gz linux.bin.ub linux.bin linux.bin.gz linux.bin.ub: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' -simpleImage.%: vmlinux +PHONY += simpleImage.$(DTB) +simpleImage.$(DTB): vmlinux $(Q)$(MAKE) $(build)=$(boot) simple_images @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' From patchwork Mon Dec 3 07:50:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2263109C for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C787D2AD71 for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBDF92AD6D; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B6FC2AD3A for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725835AbeLCHvq (ORCPT ); Mon, 3 Dec 2018 02:51:46 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60224 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O7009296; Mon, 3 Dec 2018 16:51:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O7009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823468; bh=/bkD1AaEj77ORfzeA5lP0B9fBeG7hxBuHP/+JIDuorc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gYi/FM64UmEWhru1vPEsWksgX7+4FHQ/yeM0vaw/7w4qb0I0gZvTdsvNSo3eqWcua xqA9aSeYGR3iM4RMZysWfwtFtqDZKyzMVPB8qw4vgRa7C/dqHu5bTcrgxYEsXFrJVd JdcNRQxDjrbdxST93V4SQpssHnUFh2VJclPjJ1JHnFDrMFZ/1bnyUhC26ANl1dUEg2 MdMw3AO6RAF/55ZBRx6ALj1KqBFEYlsd6vlC7GhW8PigLdHkF7xGaKJOsjgaWxlENs h75chG7rpwz/pMkMPDNIqWehKGUH7NmLRY2QoM1YwdFRLdDxuSX92ZAk4J0QZCUvLP sD+umS9WKn3HA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 6/7] microblaze: fix race condition in building boot images Date: Mon, 3 Dec 2018 16:50:56 +0900 Message-Id: <1543823457-32478-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I fixed a race condition in the parallel building of ARM in commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images"). I see the same problem for MicroBlaze too. "make -j ARCH=microblaze all linux.bin.ub" results in a broken build since two threads descend into arch/microblaze/boot simultaneously. Add proper dependencies to avoid it. Signed-off-by: Masahiro Yamada --- arch/microblaze/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 7a5df02..544796d 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -79,13 +79,15 @@ all: linux.bin archclean: $(Q)$(MAKE) $(clean)=$(boot) +linux.bin.ub linux.bin.gz: linux.bin + PHONY += linux.bin linux.bin.gz linux.bin.ub linux.bin linux.bin.gz linux.bin.ub: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' PHONY += simpleImage.$(DTB) -simpleImage.$(DTB): vmlinux +simpleImage.$(DTB): linux.bin.ub $(Q)$(MAKE) $(build)=$(boot) simple_images @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' From patchwork Mon Dec 3 07:50:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89416109C for ; Mon, 3 Dec 2018 07:52:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E10E2AD76 for ; Mon, 3 Dec 2018 07:52:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BEE42AD75; Mon, 3 Dec 2018 07:52:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2477F2AD76 for ; Mon, 3 Dec 2018 07:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725842AbeLCHwO (ORCPT ); Mon, 3 Dec 2018 02:52:14 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60442 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbeLCHvx (ORCPT ); Mon, 3 Dec 2018 02:51:53 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O8009296; Mon, 3 Dec 2018 16:51:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O8009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823469; bh=XuSq2PAyWJ8SgmLhjLsNRYQS3C416oLEGtt8Uth20Ws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=04NndtQRfn4Vvm379KZRYQyu4MK14Ijbe2qNkcqGdnRPsy5kp2Q15g70bWu42T6BW PcHvZyDCLiFseO6EGGwFCGXC+GQamCYTZgXZagRiE7Y15PUleK3zLehToQc95MuyUP xwWA/NpwqFsencduPmhhTvakyZ7Q21bLFGz8TTnhpmC9nEVrmeLkwAJ9EqH6VZg5e1 E2081oIsFdTvME92rIllLNtwsfj15ZJILi6wQXvDqfEiENu2hGMVIDPCd7OnmYoP5E PCOG9hMkczMVKcLMHlPMc6hW2zMp4nTy9Y1APwD/Tc4Ewo0MbFMxJL7xMrjIr6Dbbe 4qcs8YH2RgHHQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , devicetree@vger.kernel.org, Mark Rutland , Rob Herring , linux-kernel@vger.kernel.org Subject: [PATCH 7/7] microblaze: remove the unneeded code just in case file copy fails Date: Mon, 3 Dec 2018 16:50:57 +0900 Message-Id: <1543823457-32478-8-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I guess || (rm -f $@ && echo false) ... should be || (rm -f $@ && false) since printing the string "false" on the console has no point. Moreover, no Makefile needs to delete a target on error explicitly since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). Reuse equivalent cmd_shipped from scripts/Makefile.lib. Signed-off-by: Masahiro Yamada Acked-by: Michal Simek --- arch/microblaze/boot/dts/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile index c7324e7..ef00dd3 100644 --- a/arch/microblaze/boot/dts/Makefile +++ b/arch/microblaze/boot/dts/Makefile @@ -12,12 +12,9 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb # Generate system.dtb from $(DTB).dtb ifneq ($(DTB),system) $(obj)/system.dtb: $(obj)/$(DTB).dtb - $(call if_changed,cp) + $(call if_changed,shipped) endif endif -quiet_cmd_cp = CP $< $@$2 - cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) - # Rule to build device tree blobs DTC_FLAGS := -p 1024