From patchwork Tue Oct 16 09:10: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: 148924 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4828451lji; Tue, 16 Oct 2018 02:12:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV61SzJoVwi/snq0Oz5/U+ZTrTdiUkiNk38kkI4RU5XqE2/yYuFEUM1t058+xAwL8o8suFPFe X-Received: by 2002:a63:2c8a:: with SMTP id s132-v6mr18949050pgs.73.1539681138371; Tue, 16 Oct 2018 02:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539681138; cv=none; d=google.com; s=arc-20160816; b=ytArEH3SU3scqu9wjCxl4S84Fhx008xllf0Dbs2w7jTYZMJRlBJZ1cUit8o0yjKbnT ABJ+1idbOh1dHDIY1xWZzgGeiDAhYMSKwfkljWAUa1mdD61gDEf6BbMTkxvsJ/SgktGF iRyLYyJn6bkSShWt8edU1qUDxX2PdtHDhAAP7lFltkPxsp8CnWhgoYD88sEct+fo8TnX wjGtM/sBubSVj4vuwAkjSV1l1SU10JqTyjN0sLuc4aCSRKtsIuAptWuhznU/FuUkEvrd 2izIyNrvm0Dd0r0yuHjHGVw9LGTUobcZ5NG8q5oSROoleJuysnCIXUCbdtTripuKiXI7 XWYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=oOu070Ru7d+JJagPqx7fCHtw6LbcaDKL54LM4cesph4=; b=OTrcqyZ1NwmjfRL5+3MfK1Czlv2DPdUHoZnG2awYggsgDCU7oM8GEqip3vR5LhFrbR kzYQBKhnSV30vLvibEE3DO9XjQBkE/iG6+RDCZ8x8mdUIjbeZ7ER43uITzAoRd5J3G6T ZvIbgjePyCU+Apj/rndPQoNiyt6vCicFSAJBhayd39MbzZ4fkQVGatsrIrAs99mIIkuc elJ8BP564wHxhnL3gjQk7bWa07nyV0xAQVSeSpqmg8iJf7NnBpYw617b9BT3vPboa15e Idb8K1rQbEYtbulRMO95wOuPjE68NVfqFzPtKDhInef3sFgu7ttr/f+15QyViFz6laIu xU5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=xu1LPVbJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k25-v6si13364119pgl.239.2018.10.16.02.12.18; Tue, 16 Oct 2018 02:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=xu1LPVbJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727291AbeJPRBn (ORCPT + 32 others); Tue, 16 Oct 2018 13:01:43 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57743 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727042AbeJPRBm (ORCPT ); Tue, 16 Oct 2018 13:01:42 -0400 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 w9G9BLLx029692; Tue, 16 Oct 2018 18:11:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w9G9BLLx029692 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1539681084; bh=oOu070Ru7d+JJagPqx7fCHtw6LbcaDKL54LM4cesph4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xu1LPVbJscQBy8rpYl0T7P+sapQdLxQs6liVk992m/r3XP3O3rAiF0aa/8ER7hh7O wYwsOxYSY8T/krf/Su1ZuFd4wRKrOMAHWxtPoxXfEos5vmJcL9IxtDM4/BFU85XpBv BGGkqRPasp4jQfzMJ7/0lsHkogLSSEZUY0w74EwZXFwj1vYbUC2O0Mdg6CTZ2qFRQd lAtZQ2rL19vMORhaggPfScKJXBW8Q89bNAsQ9LFMcak6ERw8gLKzZcc4Bvq6JdhL/o e0ZLgep1/pSQ8fHz9/rVU+npzFG3jBJd9S1XQtEAdqxteamYXKzdzY3vRX7xFVG2mk c/BSyJ5akimwQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ingo Molnar , Josh Poimboeuf , Bernd Edlinger , Borislav Petkov , Sam Ravnborg , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] kbuild: check the presence of lzo and lz4 tools when necessary Date: Tue, 16 Oct 2018 18:10:53 +0900 Message-Id: <1539681053-24388-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539681053-24388-1-git-send-email-yamada.masahiro@socionext.com> References: <1539681053-24388-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_KERNEL_LZ4 is enabled without lz4 tool installed on the system, the build fails at the very last stage (reported by Borislav Petkov [1]). LZO arch/x86/boot/compressed/vmlinux.bin.lzo /bin/sh: 1: lzop: not found arch/x86/boot/compressed/Makefile:141: recipe for target 'arch/x86/boot/compressed/vmlinux.bin.lzo' failed make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lzo] Error 1 arch/x86/boot/Makefile:112: recipe for target 'arch/x86/boot/compressed/vmlinux' failed make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2 arch/x86/Makefile:284: recipe for target 'bzImage' failed make: *** [bzImage] Error 2 Check the tools in scripts/Makefile.toolcheck to fail the build earlier with a more readable message. [1] https://patchwork.kernel.org/patch/10635381/ Suggested-by: Borislav Petkov Signed-off-by: Masahiro Yamada --- scripts/Makefile.toolcheck | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.7.4 diff --git a/scripts/Makefile.toolcheck b/scripts/Makefile.toolcheck index bc26fc0..5e336e4 100644 --- a/scripts/Makefile.toolcheck +++ b/scripts/Makefile.toolcheck @@ -17,6 +17,14 @@ msg_stack_validation = "libelf is necessary for building the objtool." \ "Please install libelf-dev, libelf-devel or elfutils-libelf-devel." toolcheck-$(CONFIG_STACK_VALIDATION) += stack_validation +chk_lzo = command -v lzop +msg_lzo = "lzo tool not found. Please install it." +toolcheck-$(CONFIG_KERNEL_LZO) += lzo + +chk_lz4 = command -v lz4c +msg_lz4 = "lz4 tool not found. Please install it." +toolcheck-$(CONFIG_KERNEL_LZ4) += lz4 + PHONY += $(toolcheck-y) __toolcheck: $(toolcheck-y)