From patchwork Mon Feb 8 05:04:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 8246681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 186E69F3CD for ; Mon, 8 Feb 2016 05:07:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 410AB201C8 for ; Mon, 8 Feb 2016 05:07:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E2D1201C7 for ; Mon, 8 Feb 2016 05:07:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSe0O-00040p-Ek; Mon, 08 Feb 2016 05:04:56 +0000 Received: from conuserg009.nifty.com ([202.248.44.35] helo=conuserg009-v.nifty.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSe0D-0003yl-EX for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2016 05:04:47 +0000 Received: from beagle.diag.org (p14090-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.90]) (authenticated) by conuserg009-v.nifty.com with ESMTP id u1854F9O012733; Mon, 8 Feb 2016 14:04:18 +0900 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: descend into arch/arm/boot only once to generate boot images Date: Mon, 8 Feb 2016 14:04:59 +0900 Message-Id: <1454907899-32101-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454907899-32101-1-git-send-email-yamada.masahiro@socionext.com> References: <1454907899-32101-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160207_210445_742869_736A1277 X-CRM114-Status: GOOD ( 10.40 ) X-Spam-Score: 3.9 (+++) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , Russell King , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images") fixed bad images generation in the parallel building, but it is not efficient to descend into arch/arm/boot over and over again. It is also clumsy to display the same log message "Kernel: arch/arm/boot/Image is ready" a couple of times. $ make ARCH=arm UIMAGE_LOADADDR=0x80208000 all uImage [snip] Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready Building modules, stage 2. MODPOST 279 modules Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready UIMAGE arch/arm/boot/uImage Image Name: Linux-4.5.0-rc3 Created: Mon Feb 8 13:22:53 2016 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 6768768 Bytes = 6610.12 kB = 6.46 MB Load Address: 80208000 Entry Point: 80208000 Image arch/arm/boot/uImage is ready This commit allows arch/arm/boot/Makefile to build boot images at once instead of generating them one by one. Of course, it works correctly also in parallel building. Signed-off-by: Masahiro Yamada --- arch/arm/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index d6d453f..6db669e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -315,13 +315,17 @@ archprepare: BOOT_TARGETS = zImage Image xipImage bootpImage uImage INSTALL_TARGETS = zinstall uinstall install -PHONY += $(BOOT_TARGETS) $(INSTALL_TARGETS) +PHONY += $(BOOT_TARGETS) $(INSTALL_TARGETS) __build_images -bootpImage uImage: zImage -zImage: Image +$(BOOT_TARGETS): __build_images + @: -$(BOOT_TARGETS): vmlinux - $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ +__build_images: vmlinux + $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) \ + $(addprefix $(boot)/, + $(sort $(filter $(BOOT_TARGETS),$(MAKECMDGOALS)) \ + $(if $(filter all,$(MAKECMDGOALS)), $(KBUILD_IMAGE)) \ + $(if $(MAKECMDGOALS),,$(KBUILD_IMAGE)))) $(INSTALL_TARGETS): $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@