From patchwork Wed Jul 12 06:42:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau via B4 Relay X-Patchwork-Id: 13309628 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 E6869EB64D9 for ; Wed, 12 Jul 2023 06:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbjGLGmb (ORCPT ); Wed, 12 Jul 2023 02:42:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbjGLGmX (ORCPT ); Wed, 12 Jul 2023 02:42:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB8719B; Tue, 11 Jul 2023 23:42:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6A530616E3; Wed, 12 Jul 2023 06:42:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id BE665C433CB; Wed, 12 Jul 2023 06:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689144141; bh=Lts7Ttry/DWypJyUuGIPywZ4oz1JjOWCv4NgY2hLjS8=; h=From:Date:Subject:To:Cc:Reply-To:From; b=UPjhm3r0ruTcSU8J/DisQuvVFubBpmkrQiRG66SNPMUZWT3Z/wPH1lRv6QTCidhPT 4p5mM4KYSLep6ITrOE6dfkpqT+13PI1ojUBBLOyYhbjDudjaoCW+y7Qg4GpOAu4S1O c32vGGvFK9tdXdAp46iIDy2sgLv0uDvsT41U6eYcsIxXzfDlbj1j2RpqpS0VvjHCmZ do69/LbC//53GfcfddojTfRaK2mkDRg8Y+0BFwBKEpkG+DMf0DrNZTx0DiTLM5q8QT sMOe9EO3iIqDyPBYXfmUpj8waqwj6l5w6m0IipXUkEy2LqSnZ1AA2TIb0k6dGUNyvB 4DAa+sSNLWlNQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A56FFEB64DA; Wed, 12 Jul 2023 06:42:21 +0000 (UTC) From: Janne Grunau via B4 Relay Date: Wed, 12 Jul 2023 08:42:20 +0200 Subject: [PATCH] kbuild: rpm-pkg: Add dtbs support MIME-Version: 1.0 Message-Id: <20230712-kbuild_rpm_dtbs-v1-1-99693e8faaaf@jannau.net> X-B4-Tracking: v=1; b=H4sIAEtLrmQC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2MDc0Mj3eyk0syclPiigtz4lJKkYt0UA1PTRGNzC4OkpFQloK6CotS0zAq widGxtbUAJFQ7cGEAAAA= To: Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2064; i=j@jannau.net; h=from:subject:message-id; bh=pqGGqDq9keUrENGYOALz/M+BMKf1FbSWOisiewqrdWw=; b=owJ4nJvAy8zAJbZQ2uZ2r35qGuNptSSGlHXePilL8v9Nb7kXvHy/hEax8s0vUYeldk7jW13n1 KO9OHr5Mo2OUhYGMS4GWTFFliTtlx0Mq2sUY2ofhMHMYWUCGcLAxSkAEzknx8jw4oDAK1Hh2vur 3s03twqYv7793qWJ7fafPl+ut0lvVmo1YPgrx3zOoOFWRt/0e78kL5m05J+Yc/s9/yHTrvka6ks WqacxAwBrX0jq X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Endpoint-Received: by B4 Relay for j@jannau.net/default with auth_id=62 X-Original-From: Janne Grunau Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Janne Grunau Based on the dtbs support in builddeb. Both Fedora and openSUSE kernel rpm install their dtbs in "/boot/dtb-${KERNELRELEASE}". There seems no other popular rpm based distributions which would benefit from dtbs support and are not derived from those two. Signed-off-by: Janne Grunau Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor --- scripts/package/mkspec | 11 +++++++++++ 1 file changed, 11 insertions(+) --- base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 change-id: 20230712-kbuild_rpm_dtbs-d055a3780bbe Best regards, diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 8049f0e2c110..a170b0c0a93f 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -28,6 +28,14 @@ else M=DEL fi +# Only some architectures with OF support have the dtbs_install target +if grep -q CONFIG_OF_EARLY_FLATTREE=y include/config/auto.conf && \ + [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then + D= +else + D=DEL +fi + __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \ --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \ @@ -38,6 +46,8 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \ # Labels: # $S: this line is enabled only when building source package # $M: this line is enabled only when CONFIG_MODULES is enabled +# $D: this line is enabled only when CONFIG_OF_EARLY_FLATTREE is enabled and +# the arch has a dts directory sed -e '/^DEL/d' -e 's/^\t*//' <