From patchwork Fri Jan 27 16:19:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13118935 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1F67C61DA4 for ; Fri, 27 Jan 2023 16:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233885AbjA0QT7 (ORCPT ); Fri, 27 Jan 2023 11:19:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234174AbjA0QT7 (ORCPT ); Fri, 27 Jan 2023 11:19:59 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94209AD17; Fri, 27 Jan 2023 08:19:58 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F30261CC3; Fri, 27 Jan 2023 16:19:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D360C433EF; Fri, 27 Jan 2023 16:19:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674836397; bh=dWkUXrk0g8ak0BjqJ52KwIBrpaKr1aFEKuCxJYYFurI=; h=From:To:Cc:Subject:Date:From; b=t7xEkFKOfRPsnN5oKe3OF1cn9OhAJNwfDcM7cj1tjE1WBrPQ775VJ33ZDoJNKcyAA 2V3sAhAq5z61UBLNFKR91E8oYX47DUOb8lukaG2yV+UmJtrLSOF7XQ3ajeiIZopY2n DeuUmfr1Hcl2DD/zTAXwtoG/pzk6Rd4kyqp/cTa5BIWa8BJa3r9EFPkQqNQ0Mdeh3p ueBP6QLSk4PZp8AO4ImuDE6DIJhGKYLd7ZWsXF/ynUeEY0IctBAQE6KlHWK/4xdcgH if/0alOp1fDItKnLt5FsNPM4bmGDOodR0R59PJWkjuymV3ciGne4Z0NDKkQuYlYf6Z BOrDUWCm74JQQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH] kbuild: save overridden KERNELRELEASE in include/config/kernel.release Date: Sat, 28 Jan 2023 01:19:42 +0900 Message-Id: <20230127161942.543483-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org ${KERNELRELEASE} is used as a part of the installation path. (INSTALL_DTBS_PATH, MODLIB, etc.) When KERNELRELEASE is overridden from the command line, it should be saved in include/config/kernel.release, so that it will be consistently used for the installation steps. Signed-off-by: Masahiro Yamada --- This patch will replace the buggy https://lore.kernel.org/linux-kbuild/20230122141428.115372-6-masahiroy@kernel.org/T/#u Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 203b86e95197..aeea900eff71 100644 --- a/Makefile +++ b/Makefile @@ -1258,7 +1258,11 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost # make sure no implicit rule kicks in $(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ; +ifeq ($(origin KERNELRELEASE),file) filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree) +else +filechk_kernel.release = echo $(KERNELRELEASE) +endif # Store (new) KERNELRELEASE string in include/config/kernel.release include/config/kernel.release: FORCE