From patchwork Mon Jan 30 10:43:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 1733817 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P54Xh6n1Pz23gY for ; Mon, 30 Jan 2023 21:43:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9A0DE4174C; Mon, 30 Jan 2023 10:43:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9A0DE4174C X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BaDSbTODuF_J; Mon, 30 Jan 2023 10:43:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 9A68641744; Mon, 30 Jan 2023 10:43:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9A68641744 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5AB261BF30D for ; Mon, 30 Jan 2023 10:43:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 341C760EE4 for ; Mon, 30 Jan 2023 10:43:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 341C760EE4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YFQVgLnuV2IG for ; Mon, 30 Jan 2023 10:43:25 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1F8E260E09 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by smtp3.osuosl.org (Postfix) with ESMTPS id 1F8E260E09 for ; Mon, 30 Jan 2023 10:43:25 +0000 (UTC) Received: by mail-wm1-x32f.google.com with SMTP id d4-20020a05600c3ac400b003db1de2aef0so7817124wms.2 for ; Mon, 30 Jan 2023 02:43:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wx/6oWjEZlZ4SgLT+AQbEtia2t3lOPcBKDtfWeUtTP0=; b=Sv0IUjiz9Rn7HyK35J40Oi+MyOpTNMh8H9EblzzWGB68DQ1y4PTbTaH8FSKEIunZYR ozfHdTF6E1zgshaICppyW80V1DvNiG1n51xevO4V1MviwdwhMGyUry3dQ5VWvDIkdIZb szUTHAtCe7vrcF3pjs7Oo1V2Xw15rC9Kua9fsY1nAbBLvQlzGs43yzqb59GBOAy4p18y Ja1Z0AtzYfCLhsbmj1bfmZEwIYG+X+Xx2oyDeeU6ljW+3F8CjVKlOX6LPUo+B7pnpoFV TRnKB962EGM6+mZ9LHxzmX3T3ImgsPWGQv44aEAGwGT+iUsmBiGF+5pRDHsdhbHUUDcX ApYA== X-Gm-Message-State: AO0yUKVujPzlsqte3I8WYbtRe6RE9fJo1fNqVCTSmKrj6ZHFiY6KSzVX jTa4TL2lRCrVfh6XEEP7MhqX6voh8rRT8Q== X-Google-Smtp-Source: AK7set+f/PAywNLAMz5KBG1e1dzQjTLqQ6UjuBwa6jSQh2/SI6A56MhoEybl+fceYl25LcAzOuB5fA== X-Received: by 2002:a7b:c3c9:0:b0:3da:2032:6c0f with SMTP id t9-20020a7bc3c9000000b003da20326c0fmr5231759wmj.31.1675075402813; Mon, 30 Jan 2023 02:43:22 -0800 (PST) Received: from goliat.wr25.org (82-209-154-112.cust.bredband2.com. [82.209.154.112]) by smtp.gmail.com with ESMTPSA id q17-20020a05600c46d100b003dc530186e1sm5573064wmo.45.2023.01.30.02.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 02:43:22 -0800 (PST) From: Marcus Folkesson To: buildroot@buildroot.org Date: Mon, 30 Jan 2023 11:43:07 +0100 Message-Id: <20230130104308.483243-1-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wx/6oWjEZlZ4SgLT+AQbEtia2t3lOPcBKDtfWeUtTP0=; b=qbZwgWf+pVsfR2T+MtYa4k90oPkBfI+efLcCB3uoPvSk+9/e8nyRKmUwvcpcNGhg48 fN048dDW7pnRPiiN0tB2ZG2wSk6UyNy9bnQYW4soKx0eKmxrA0VOVAmrWORFuShtfAxB A0LqfeRNQ3ZqHQYuS4TvSOugWCT9YGsJiEgUnuxYIRDSCA35esJnw7nAeKi5dhGrykec nLN6sIxwwtaKqLfrhOrj7v/bJBxVy/v5IsbTFLAHseRVqNx4KPnPjdDoW4ANMzAyqMJh NZDJ8Y2Mi72u7EwqoGDAq7f0monMx+LomDnKwZVmT2UfcZkneU1jzcqwQy/mhF9ZB5K2 HiKQ== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=qbZwgWf+ Subject: [Buildroot] [PATCH v2 1/2] package/pkg-kconfig.mk new -show-fragment target X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcus Folkesson , Thomas De Schampheleire Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This patch introduce the new target to simplify the generation of configuration fragments as the output could be directly copied into a fragment file as-is. It is *heavily* based on the -diff-config target, but serves a different purpose. Output from linux-diff-config: -CONFIG_GCC_PLUGIN_ARM_SSP_PER_TASK y -CONFIG_GCC_PLUGIN_CYC_COMPLEXITY n -CONFIG_GCC_PLUGIN_LATENT_ENTROPY n -CONFIG_GCC_PLUGIN_RANDSTRUCT n -CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF n -CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL n -CONFIG_GCC_PLUGIN_STRUCTLEAK_USER n -CONFIG_STACKPROTECTOR_PER_TASK y CONFIG_CRYPTO_DH n -> y CONFIG_CRYPTO_KPP m -> y CONFIG_GCC_PLUGINS y -> n CONFIG_KEY_DH_OPERATIONS n -> y CONFIG_PKCS8_PRIVATE_KEY_PARSER n -> y CONFIG_VIDEO_IMX274 n -> m Output from linux-show-fragment: CONFIG_CRYPTO_DH=y CONFIG_CRYPTO_KPP=y CONFIG_KEY_DH_OPERATIONS=y CONFIG_PKCS8_PRIVATE_KEY_PARSER=y CONFIG_VIDEO_IMX274=m Signed-off-by: Marcus Folkesson --- package/pkg-kconfig.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk index f4f35bf96a..ee96525c47 100644 --- a/package/pkg-kconfig.mk +++ b/package/pkg-kconfig.mk @@ -309,12 +309,26 @@ $(1)-diff-config: $(1)-check-configuration-done $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak +# Target to output differences between the configuration obtained via the +# defconfig + fragments (if any) and the current configuration. +# Output format is suitable to be used as-is in fragment files. +# Note: it preserves the timestamp of the current configuration when moving it +# around. +$(1)-show-fragment: $(1)-check-configuration-done + $$(Q)cp -a $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_DIR)/.config.dc.bak + $$(call kconfig-package-merge-config,$(2),$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG),\ + $$($(2)_KCONFIG_FRAGMENT_FILES)) + $$(Q)utils/diffconfig -m $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) \ + $$($(2)_DIR)/.config.dc.bak + $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) + $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak endif # package enabled .PHONY: \ $(1)-diff-config \ $(1)-check-configuration-done \ + $(1)-show-fragment \ $$($(2)_DIR)/.kconfig_editor_% \ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)) From patchwork Mon Jan 30 10:43:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 1733818 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P54Xx1830z23gY for ; Mon, 30 Jan 2023 21:43:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6C36B60EE4; Mon, 30 Jan 2023 10:43:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6C36B60EE4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jIZxMX_pxwQg; Mon, 30 Jan 2023 10:43:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id C2D2860E40; Mon, 30 Jan 2023 10:43:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C2D2860E40 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6E9841BF30D for ; Mon, 30 Jan 2023 10:43:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C9EF560E09 for ; Mon, 30 Jan 2023 10:43:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C9EF560E09 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lHTHRJ_UboN3 for ; Mon, 30 Jan 2023 10:43:26 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0D7E160E90 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0D7E160E90 for ; Mon, 30 Jan 2023 10:43:25 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id j32-20020a05600c1c2000b003dc4fd6e61dso2828851wms.5 for ; Mon, 30 Jan 2023 02:43:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8VAiJvUYKVEi0Mydfe6kd3e06McV4XtKG6e+UE9nw/0=; b=oaCUmnzcrNEZ8ICOgsdr8hoGIMN1+ggLfk3Ngop4/9lQ74hdNCYdLytEAGutAg113+ oe7rwrJT8Q/P/liHupk6cCumbAp+jOm9/noX3C6mOfXLGF+FWuB2hSD69kxl/aRKOxUA w+H3todtLDSLBtI61tDN6jdwoziUItW9W+pBF2MoCF3CEVm9H+jPhkAYrAjOP3868JWa 6iahm6yJbyG/j4NbRiWtbnmjHmlMSILZCAs9Wo83z+TsHz8c52rk1YEd/aQFXk7gz5rl f0LTdhh0g+WwPTHpCJeuXjuoJIJLBUaI5m9Hn4Rgxu0RWfIInXXG6pqHFo49wOOo3lDj dZ0Q== X-Gm-Message-State: AO0yUKVIFASR1GqqKqouDUZIKRYXe4nQ8VKOL6O9aHzy3ZglMY/oZKv1 RbXUxlCrRnyYnWRUz2siYr6/REp4Me87Ww== X-Google-Smtp-Source: AK7set+Ceko/Ra5l+FAruvL7D/0SB1Nh0MqdbzrG+qzV87KYWWeRheC4ewCe492Vtbwzu8PJ84Qxbw== X-Received: by 2002:a1c:7205:0:b0:3dc:523c:229a with SMTP id n5-20020a1c7205000000b003dc523c229amr5138454wmc.7.1675075403859; Mon, 30 Jan 2023 02:43:23 -0800 (PST) Received: from goliat.wr25.org (82-209-154-112.cust.bredband2.com. [82.209.154.112]) by smtp.gmail.com with ESMTPSA id q17-20020a05600c46d100b003dc530186e1sm5573064wmo.45.2023.01.30.02.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 02:43:23 -0800 (PST) From: Marcus Folkesson To: buildroot@buildroot.org Date: Mon, 30 Jan 2023 11:43:08 +0100 Message-Id: <20230130104308.483243-2-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230130104308.483243-1-marcus.folkesson@gmail.com> References: <20230130104308.483243-1-marcus.folkesson@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8VAiJvUYKVEi0Mydfe6kd3e06McV4XtKG6e+UE9nw/0=; b=Vo1uYeXWfe6P3oA0bV0kmwosVzMNafKdS7Yb0i6vP4XzwT5RB6swDbSbMFWtaCHbHr ithQ+s4jd1rErxX77qzmYZMU5Fg8KzedB+NivwbsRwgQFNohSfGigRlIY1eVka6JdaSC uzyczwrrUJtcWNsyJpKdb+46rN0RJVG/YflTAVfREogoP2+iufzUC/WkMgd3Tmm6crYg +hmQy1ZT3o0SvK0t/5+p6f3LuGqYJNtX8MO/3jRiJL/9Nv44e1jUH9lRLMcjBuhOkAeP ysb6F9R7+JSQh9VMK/kb0xFyk0y97URz4Lu8+Kmayv5dNy1SQdebp2DCsNBrWxSfpXkz 0erw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Vo1uYeXW Subject: [Buildroot] [PATCH v2 2/2] docs/manual: update pkg-kconfig doc about -show-fragment X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcus Folkesson , Thomas De Schampheleire Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Describe this new target. Signed-off-by: Marcus Folkesson --- docs/manual/adding-packages-kconfig.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/manual/adding-packages-kconfig.txt b/docs/manual/adding-packages-kconfig.txt index a35681775f..b67430c85f 100644 --- a/docs/manual/adding-packages-kconfig.txt +++ b/docs/manual/adding-packages-kconfig.txt @@ -45,9 +45,11 @@ This snippet creates the following make targets: * +foo-diff-config+, which outputs the differences between the current configuration and the one defined in the Buildroot configuration for - this kconfig package. The output is useful to identify the - configuration changes that may have to be propagated to - configuration fragments for example. + this kconfig package. The output is useful to identify + configuration changes. + +* +foo-show-fragment+, Similiar to +foo-diff-config+, but with an output + format more suitable to be used in fragment files. and ensures that the source configuration file is copied to the build directory at the right moment.