* [ptxdist] [PATCH] doc: add section about kconfig diffs
@ 2021-04-26 21:59 Roland Hieber
2021-04-27 8:30 ` [ptxdist] [PATCH v2] " Roland Hieber
0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2021-04-26 21:59 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
doc/dev_kconfig_diffs.rst | 79 +++++++++++++++++++++++++++++++++++
doc/dev_layers_in_ptxdist.rst | 3 +-
doc/dev_manual.rst | 1 +
3 files changed, 82 insertions(+), 1 deletion(-)
create mode 100644 doc/dev_kconfig_diffs.rst
diff --git a/doc/dev_kconfig_diffs.rst b/doc/dev_kconfig_diffs.rst
new file mode 100644
index 000000000000..5673bd2d2dd6
--- /dev/null
+++ b/doc/dev_kconfig_diffs.rst
@@ -0,0 +1,79 @@
+.. _kconfig-diffs:
+
+Kconfig Diffs
+-------------
+
+For packages using Kconfig as their configuration system, PTXdist can generate
+their config file from another *reference config file* and a *Kconfig diff* on
+the fly.
+This mechanism can be used to build configuration variants of a kernel or
+barebox package.
+For example, a "debug" kernel package can refer to the config file of the
+"production" kernel as its reference config file, and its Kconfig diff then
+only contains the Kconfig symbols that were changed in the "debug" variant:
+
++-----------------------------------+-------------------------------------+-----------------------------------+
+| release config symbol | debug kconfig diff | resulting debug config symbol |
++===================================+=====================================+===================================+
+| CONFIG_LOCALVERSION="release" | CONFIG_LOCALVERSION="debug" | CONFIG_LOCALVERSION="debug" |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| # CONFIG_ARCH_MULTI_V6 is not set | | # CONFIG_ARCH_MULTI_V6 is not set |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_ARCH_MULTI_V7=y | | CONFIG_ARCH_MULTI_V7=y |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| # CONFIG_CGROUP_DEBUG is not set | CONFIG_CGROUP_DEBUG=y | CONFIG_CGROUP_DEBUG=y |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| # CONFIG_DEBUG_PREEMPT is not set | CONFIG_DEBUG_PREEMPT=y | CONFIG_DEBUG_PREEMPT=y |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_WATCHDOG=y | # CONFIG_WATCHDOG is not set | # CONFIG_WATCHDOG is not set |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_WATCHDOG_CORE=y | # CONFIG_WATCHDOG_CORE is undefined | |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_BCM2835_WDT=y | # CONFIG_BCM2835_WDT is undefined | |
++-----------------------------------+-------------------------------------+-----------------------------------+
+
+Kconfig does not write symbols to the config file that have unfulfilled dependencies (e.g., in the
+above example ``CONFIG_WATCHDOG_CORE`` and ``CONFIG_BCM2835_WDT`` depend on ``CONFIG_WATCHDOG``).
+Those symbols that are not present in the resulting debug config file are represented as ``… is
+undefined`` in the diff.
+
+The first line of the Kconfig diff file contains the MD5 sum of the reference config file.
+PTXdist uses this checksum to detect when the reference config has changed,
+in which case the diff needs to be regenerated from the package's config file,
+and to make sure that the diff is applicable to the reference config.
+
+Using Kconfig diffs
+~~~~~~~~~~~~~~~~~~~
+
+The main part is setting the ``<PKG>_REF_CONFIG`` variable of a package to the reference config
+file, for example::
+
+ # rules/kernel.make:
+ KERNEL_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-release)
+
+::
+
+ # rules/kernel-debug.make:
+ KERNEL_DEBUG_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-debug)
+ KERNEL_DEBUG_REF_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-release)
+
+PTXdist will now automatically generate ``kernelconfig-debug`` from ``kernelconfig-release`` and
+``kernelconfig-debug.diff`` whenever doing and *oldconfig* or *menuconfig* on the *kernel-debug*
+package.
+If any symbols were changed by that operation, both the ``kernelconfig-debug.diff`` and the
+``kernelconfig-debug`` are updated afterwards.
+
+Kconfig diffs and layers
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+PTXdist uses the same diff mechanism whenever the config file of a Kconfig-style package is changed
+in an inherited layer (see :ref:`layers-in-ptxdist`).
+In that case, the diff is calculated between the package's config file in the base layer and the
+package's (adapted) config file in the current layer.
+
+.. note::
+ When using both ``<PKG>_REF_CONFIG`` and inter-layer Kconfig diffs, the inter-layer diff takes
+ precedence, and the reference config file in the inherited layer is ignored.
+ In the following example, arrows represent the config diff relation:
+
+ .. image:: dev_kconfig_diffs_layer_precedence.svg
diff --git a/doc/dev_layers_in_ptxdist.rst b/doc/dev_layers_in_ptxdist.rst
index ec92c8c8a86c..a1066396ca28 100644
--- a/doc/dev_layers_in_ptxdist.rst
+++ b/doc/dev_layers_in_ptxdist.rst
@@ -98,7 +98,8 @@ Packages with kconfig Based Config Files
For packages such as the Linux kernel that have kconfig based config files,
a lot of the infrastructure to handle config files and deltas across
-multiple layers can be reused. Consistency validation is done implicitly
+multiple layers can be reused (see :ref:`kconfig-diffs`).
+Consistency validation is done implicitly
and ``menuconfig`` and other kconfig commands will use config files and
deltas as expected.
diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index 03a05a661a97..c232cc91428a 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -14,4 +14,5 @@ This chapter shows all (or most) of the details of how PTXdist works.
dev_add_bin_only_files
dev_create_new_pkg_templates
dev_layers_in_ptxdist
+ dev_kconfig_diffs
dev_code_signing
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v2] doc: add section about kconfig diffs
2021-04-26 21:59 [ptxdist] [PATCH] doc: add section about kconfig diffs Roland Hieber
@ 2021-04-27 8:30 ` Roland Hieber
2021-04-27 11:49 ` Roland Hieber
2021-05-07 6:07 ` [ptxdist] [APPLIED] doc: add section about kconfig diffs Michael Olbrich
0 siblings, 2 replies; 5+ messages in thread
From: Roland Hieber @ 2021-04-27 8:30 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
v2: also include the referenced SVG
---
doc/dev_kconfig_diffs.rst | 79 ++++++
doc/dev_kconfig_diffs_layer_precedence.svg | 315 +++++++++++++++++++++
doc/dev_layers_in_ptxdist.rst | 3 +-
doc/dev_manual.rst | 1 +
4 files changed, 397 insertions(+), 1 deletion(-)
create mode 100644 doc/dev_kconfig_diffs.rst
create mode 100644 doc/dev_kconfig_diffs_layer_precedence.svg
diff --git a/doc/dev_kconfig_diffs.rst b/doc/dev_kconfig_diffs.rst
new file mode 100644
index 000000000000..5673bd2d2dd6
--- /dev/null
+++ b/doc/dev_kconfig_diffs.rst
@@ -0,0 +1,79 @@
+.. _kconfig-diffs:
+
+Kconfig Diffs
+-------------
+
+For packages using Kconfig as their configuration system, PTXdist can generate
+their config file from another *reference config file* and a *Kconfig diff* on
+the fly.
+This mechanism can be used to build configuration variants of a kernel or
+barebox package.
+For example, a "debug" kernel package can refer to the config file of the
+"production" kernel as its reference config file, and its Kconfig diff then
+only contains the Kconfig symbols that were changed in the "debug" variant:
+
++-----------------------------------+-------------------------------------+-----------------------------------+
+| release config symbol | debug kconfig diff | resulting debug config symbol |
++===================================+=====================================+===================================+
+| CONFIG_LOCALVERSION="release" | CONFIG_LOCALVERSION="debug" | CONFIG_LOCALVERSION="debug" |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| # CONFIG_ARCH_MULTI_V6 is not set | | # CONFIG_ARCH_MULTI_V6 is not set |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_ARCH_MULTI_V7=y | | CONFIG_ARCH_MULTI_V7=y |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| # CONFIG_CGROUP_DEBUG is not set | CONFIG_CGROUP_DEBUG=y | CONFIG_CGROUP_DEBUG=y |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| # CONFIG_DEBUG_PREEMPT is not set | CONFIG_DEBUG_PREEMPT=y | CONFIG_DEBUG_PREEMPT=y |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_WATCHDOG=y | # CONFIG_WATCHDOG is not set | # CONFIG_WATCHDOG is not set |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_WATCHDOG_CORE=y | # CONFIG_WATCHDOG_CORE is undefined | |
++-----------------------------------+-------------------------------------+-----------------------------------+
+| CONFIG_BCM2835_WDT=y | # CONFIG_BCM2835_WDT is undefined | |
++-----------------------------------+-------------------------------------+-----------------------------------+
+
+Kconfig does not write symbols to the config file that have unfulfilled dependencies (e.g., in the
+above example ``CONFIG_WATCHDOG_CORE`` and ``CONFIG_BCM2835_WDT`` depend on ``CONFIG_WATCHDOG``).
+Those symbols that are not present in the resulting debug config file are represented as ``… is
+undefined`` in the diff.
+
+The first line of the Kconfig diff file contains the MD5 sum of the reference config file.
+PTXdist uses this checksum to detect when the reference config has changed,
+in which case the diff needs to be regenerated from the package's config file,
+and to make sure that the diff is applicable to the reference config.
+
+Using Kconfig diffs
+~~~~~~~~~~~~~~~~~~~
+
+The main part is setting the ``<PKG>_REF_CONFIG`` variable of a package to the reference config
+file, for example::
+
+ # rules/kernel.make:
+ KERNEL_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-release)
+
+::
+
+ # rules/kernel-debug.make:
+ KERNEL_DEBUG_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-debug)
+ KERNEL_DEBUG_REF_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-release)
+
+PTXdist will now automatically generate ``kernelconfig-debug`` from ``kernelconfig-release`` and
+``kernelconfig-debug.diff`` whenever doing and *oldconfig* or *menuconfig* on the *kernel-debug*
+package.
+If any symbols were changed by that operation, both the ``kernelconfig-debug.diff`` and the
+``kernelconfig-debug`` are updated afterwards.
+
+Kconfig diffs and layers
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+PTXdist uses the same diff mechanism whenever the config file of a Kconfig-style package is changed
+in an inherited layer (see :ref:`layers-in-ptxdist`).
+In that case, the diff is calculated between the package's config file in the base layer and the
+package's (adapted) config file in the current layer.
+
+.. note::
+ When using both ``<PKG>_REF_CONFIG`` and inter-layer Kconfig diffs, the inter-layer diff takes
+ precedence, and the reference config file in the inherited layer is ignored.
+ In the following example, arrows represent the config diff relation:
+
+ .. image:: dev_kconfig_diffs_layer_precedence.svg
diff --git a/doc/dev_kconfig_diffs_layer_precedence.svg b/doc/dev_kconfig_diffs_layer_precedence.svg
new file mode 100644
index 000000000000..babd0db3fd6d
--- /dev/null
+++ b/doc/dev_kconfig_diffs_layer_precedence.svg
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ width="442"
+ height="234.77905"
+ viewBox="0 0 116.94583 62.118626"
+ version="1.1"
+ id="svg8">
+ <defs
+ id="defs2">
+ <marker
+ style="overflow:visible"
+ id="marker1611"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1609" />
+ </marker>
+ <marker
+ style="overflow:visible"
+ id="marker1565"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1563" />
+ </marker>
+ <marker
+ style="overflow:visible"
+ id="marker1525"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1523" />
+ </marker>
+ <marker
+ style="overflow:visible"
+ id="marker1347"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1345" />
+ </marker>
+ <marker
+ style="overflow:visible"
+ id="marker1265"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path1263" />
+ </marker>
+ <marker
+ style="overflow:visible"
+ id="Arrow1Lend"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path879" />
+ </marker>
+ <marker
+ style="overflow:visible"
+ id="Arrow1Mend-8"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path885-9" />
+ </marker>
+ </defs>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ transform="translate(-26.821236,-51.558839)">
+ <g
+ id="g2061">
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
+ x="53.600998"
+ y="60.742458"
+ id="text839"><tspan
+ id="tspan837"
+ x="53.591736"
+ y="60.742458"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;stroke-width:0.2">base layer</tspan></text>
+ <g
+ id="g862"
+ style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ id="rect857"
+ width="47.625"
+ height="7.9375"
+ x="29.731653"
+ y="68.030975" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
+ x="53.608234"
+ y="73.528664"
+ id="text843"><tspan
+ id="tspan841"
+ x="53.598976"
+ y="73.528664"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-common</tspan></text>
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;line-height:1.2;font-family:'Roboto Mono';-inkscape-font-specification:'Roboto Mono';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-rule:evenodd;stroke:none;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ x="70.570671"
+ y="82.401321"
+ id="text1186"><tspan
+ id="tspan1184"
+ x="70.552147"
+ y="82.401321"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:'Roboto Mono';-inkscape-font-specification:'Roboto Mono';text-align:end;text-anchor:end;fill:#000000;stroke:none;stroke-width:0.529167"><PKG>_REF_CONFIG</tspan></text>
+ <g
+ id="g870"
+ transform="translate(1.3229138,18.520815)">
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ id="rect868"
+ width="39.6875"
+ height="7.9375"
+ x="36.346237"
+ y="68.030975" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
+ x="56.292305"
+ y="73.528664"
+ id="text866"><tspan
+ id="tspan864"
+ x="56.283047"
+ y="73.528664"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">barebox-rpi2</tspan></text>
+ </g>
+ <g
+ id="g1437"
+ transform="translate(1.3229138,30.42707)">
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ id="rect1431"
+ width="39.6875"
+ height="7.9375"
+ x="36.346237"
+ y="68.030975" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
+ x="56.248898"
+ y="73.528664"
+ id="text1435"><tspan
+ id="tspan1433"
+ x="56.239635"
+ y="73.528664"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">barebox-am335x</tspan></text>
+ </g>
+ <path
+ style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#Arrow1Mend);stop-color:#000000"
+ d="M 37.669149,90.52054 H 33.700402"
+ id="path1439" />
+ <path
+ style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1347);stop-color:#000000"
+ d="M 37.669149,102.42673 H 33.700402 V 76.753111"
+ id="path1441" />
+ </g>
+ <path
+ style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1611);stop-color:#000000"
+ d="M 93.231651,71.999725 H 78.150399"
+ id="path1511" />
+ <path
+ style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1525);stop-color:#000000"
+ d="M 93.231651,90.52054 H 78.150399"
+ id="path1513" />
+ <path
+ style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1565);stop-color:#000000"
+ d="M 93.231651,102.42679 H 78.150399"
+ id="path1515" />
+ <g
+ id="g2035">
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
+ x="116.98627"
+ y="60.742458"
+ id="text835"><tspan
+ id="tspan833"
+ x="116.97701"
+ y="60.742458"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">inherited layer</tspan></text>
+ <g
+ id="g1493"
+ style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
+ transform="translate(63.499998)">
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ id="rect1487"
+ width="47.625"
+ height="7.9375"
+ x="29.731653"
+ y="68.030975" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
+ x="53.608234"
+ y="73.528664"
+ id="text1491"><tspan
+ id="tspan1489"
+ x="53.598976"
+ y="73.528664"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-common</tspan></text>
+ </g>
+ <g
+ id="g1753"
+ style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
+ transform="translate(63.499998,18.520815)">
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ id="rect1747"
+ width="47.625"
+ height="7.9375"
+ x="29.731653"
+ y="68.030975" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
+ x="53.608234"
+ y="73.528664"
+ id="text1751"><tspan
+ id="tspan1749"
+ x="53.598976"
+ y="73.528664"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-rpi2</tspan></text>
+ </g>
+ <g
+ id="g1761"
+ style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
+ transform="translate(63.499998,30.42707)">
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
+ id="rect1755"
+ width="47.625"
+ height="7.9375"
+ x="29.731653"
+ y="68.030975" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
+ x="53.608234"
+ y="73.528664"
+ id="text1759"><tspan
+ id="tspan1757"
+ x="53.598972"
+ y="73.528664"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-am335x</tspan></text>
+ </g>
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
+ x="52.98016"
+ y="118.56184"
+ id="text847"><tspan
+ id="tspan845"
+ x="52.98016"
+ y="118.56184"
+ style="stroke-width:0.2" /></text>
+ <path
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2.11667, 2.11667;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="M 85.823322,54.204674 V 111.03163"
+ id="path1343" />
+ </g>
+</svg>
diff --git a/doc/dev_layers_in_ptxdist.rst b/doc/dev_layers_in_ptxdist.rst
index ec92c8c8a86c..a1066396ca28 100644
--- a/doc/dev_layers_in_ptxdist.rst
+++ b/doc/dev_layers_in_ptxdist.rst
@@ -98,7 +98,8 @@ Packages with kconfig Based Config Files
For packages such as the Linux kernel that have kconfig based config files,
a lot of the infrastructure to handle config files and deltas across
-multiple layers can be reused. Consistency validation is done implicitly
+multiple layers can be reused (see :ref:`kconfig-diffs`).
+Consistency validation is done implicitly
and ``menuconfig`` and other kconfig commands will use config files and
deltas as expected.
diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index 03a05a661a97..c232cc91428a 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -14,4 +14,5 @@ This chapter shows all (or most) of the details of how PTXdist works.
dev_add_bin_only_files
dev_create_new_pkg_templates
dev_layers_in_ptxdist
+ dev_kconfig_diffs
dev_code_signing
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH v2] doc: add section about kconfig diffs
2021-04-27 8:30 ` [ptxdist] [PATCH v2] " Roland Hieber
@ 2021-04-27 11:49 ` Roland Hieber
2021-05-07 6:42 ` [ptxdist] [PATCH] ptxd_make_world_package_info: improve rev config handling when layers are involved Michael Olbrich
2021-05-07 6:07 ` [ptxdist] [APPLIED] doc: add section about kconfig diffs Michael Olbrich
1 sibling, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2021-04-27 11:49 UTC (permalink / raw)
To: ptxdist
On Tue, Apr 27, 2021 at 10:30:31AM +0200, Roland Hieber wrote:
> +Kconfig diffs and layers
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +PTXdist uses the same diff mechanism whenever the config file of a Kconfig-style package is changed
> +in an inherited layer (see :ref:`layers-in-ptxdist`).
> +In that case, the diff is calculated between the package's config file in the base layer and the
> +package's (adapted) config file in the current layer.
> +
> +.. note::
> + When using both ``<PKG>_REF_CONFIG`` and inter-layer Kconfig diffs, the inter-layer diff takes
> + precedence, and the reference config file in the inherited layer is ignored.
Hmm, the package-info output is not helpful in this case, as it shows
the ref config as calculated by $(call ptx/in-platformconfigdir):
-----------------------------------
target: barebox-am335x.package-info
-----------------------------------
package: barebox-am335x
version: 2020.09.0
config: redundant-update/configs/platform-v7a/barebox-am335x.config
ref config: redundant-update/configs/platform-v7a/barebox.config
However the diff is actually calculated between layers, as the md5sum in
barebox-am335x.config.diff shows.
Michael, do you have an idea how to improve this?
- Roland
> + In the following example, arrows represent the config diff relation:
> +
> + .. image:: dev_kconfig_diffs_layer_precedence.svg
> diff --git a/doc/dev_kconfig_diffs_layer_precedence.svg b/doc/dev_kconfig_diffs_layer_precedence.svg
> new file mode 100644
> index 000000000000..babd0db3fd6d
> --- /dev/null
> +++ b/doc/dev_kconfig_diffs_layer_precedence.svg
> @@ -0,0 +1,315 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<svg
> + xmlns:dc="http://purl.org/dc/elements/1.1/"
> + xmlns:cc="http://creativecommons.org/ns#"
> + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> + xmlns:svg="http://www.w3.org/2000/svg"
> + xmlns="http://www.w3.org/2000/svg"
> + width="442"
> + height="234.77905"
> + viewBox="0 0 116.94583 62.118626"
> + version="1.1"
> + id="svg8">
> + <defs
> + id="defs2">
> + <marker
> + style="overflow:visible"
> + id="marker1611"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1609" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1565"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1563" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1525"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1523" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1347"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1345" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1265"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1263" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="Arrow1Lend"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.8,0,0,-0.8,-10,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path879" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="Arrow1Mend-8"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path885-9" />
> + </marker>
> + </defs>
> + <metadata
> + id="metadata5">
> + <rdf:RDF>
> + <cc:Work
> + rdf:about="">
> + <dc:format>image/svg+xml</dc:format>
> + <dc:type
> + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
> + <dc:title></dc:title>
> + </cc:Work>
> + </rdf:RDF>
> + </metadata>
> + <g
> + id="layer1"
> + transform="translate(-26.821236,-51.558839)">
> + <g
> + id="g2061">
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="53.600998"
> + y="60.742458"
> + id="text839"><tspan
> + id="tspan837"
> + x="53.591736"
> + y="60.742458"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;stroke-width:0.2">base layer</tspan></text>
> + <g
> + id="g862"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect857"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text843"><tspan
> + id="tspan841"
> + x="53.598976"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-common</tspan></text>
> + </g>
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;line-height:1.2;font-family:'Roboto Mono';-inkscape-font-specification:'Roboto Mono';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-rule:evenodd;stroke:none;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + x="70.570671"
> + y="82.401321"
> + id="text1186"><tspan
> + id="tspan1184"
> + x="70.552147"
> + y="82.401321"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:'Roboto Mono';-inkscape-font-specification:'Roboto Mono';text-align:end;text-anchor:end;fill:#000000;stroke:none;stroke-width:0.529167"><PKG>_REF_CONFIG</tspan></text>
> + <g
> + id="g870"
> + transform="translate(1.3229138,18.520815)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect868"
> + width="39.6875"
> + height="7.9375"
> + x="36.346237"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="56.292305"
> + y="73.528664"
> + id="text866"><tspan
> + id="tspan864"
> + x="56.283047"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">barebox-rpi2</tspan></text>
> + </g>
> + <g
> + id="g1437"
> + transform="translate(1.3229138,30.42707)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1431"
> + width="39.6875"
> + height="7.9375"
> + x="36.346237"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="56.248898"
> + y="73.528664"
> + id="text1435"><tspan
> + id="tspan1433"
> + x="56.239635"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">barebox-am335x</tspan></text>
> + </g>
> + <path
> + style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#Arrow1Mend);stop-color:#000000"
> + d="M 37.669149,90.52054 H 33.700402"
> + id="path1439" />
> + <path
> + style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1347);stop-color:#000000"
> + d="M 37.669149,102.42673 H 33.700402 V 76.753111"
> + id="path1441" />
> + </g>
> + <path
> + style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1611);stop-color:#000000"
> + d="M 93.231651,71.999725 H 78.150399"
> + id="path1511" />
> + <path
> + style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1525);stop-color:#000000"
> + d="M 93.231651,90.52054 H 78.150399"
> + id="path1513" />
> + <path
> + style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1565);stop-color:#000000"
> + d="M 93.231651,102.42679 H 78.150399"
> + id="path1515" />
> + <g
> + id="g2035">
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="116.98627"
> + y="60.742458"
> + id="text835"><tspan
> + id="tspan833"
> + x="116.97701"
> + y="60.742458"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">inherited layer</tspan></text>
> + <g
> + id="g1493"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
> + transform="translate(63.499998)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1487"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text1491"><tspan
> + id="tspan1489"
> + x="53.598976"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-common</tspan></text>
> + </g>
> + <g
> + id="g1753"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
> + transform="translate(63.499998,18.520815)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1747"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text1751"><tspan
> + id="tspan1749"
> + x="53.598976"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-rpi2</tspan></text>
> + </g>
> + <g
> + id="g1761"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
> + transform="translate(63.499998,30.42707)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1755"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text1759"><tspan
> + id="tspan1757"
> + x="53.598972"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-am335x</tspan></text>
> + </g>
> + </g>
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="52.98016"
> + y="118.56184"
> + id="text847"><tspan
> + id="tspan845"
> + x="52.98016"
> + y="118.56184"
> + style="stroke-width:0.2" /></text>
> + <path
> + style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2.11667, 2.11667;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
> + d="M 85.823322,54.204674 V 111.03163"
> + id="path1343" />
> + </g>
> +</svg>
> diff --git a/doc/dev_layers_in_ptxdist.rst b/doc/dev_layers_in_ptxdist.rst
> index ec92c8c8a86c..a1066396ca28 100644
> --- a/doc/dev_layers_in_ptxdist.rst
> +++ b/doc/dev_layers_in_ptxdist.rst
> @@ -98,7 +98,8 @@ Packages with kconfig Based Config Files
>
> For packages such as the Linux kernel that have kconfig based config files,
> a lot of the infrastructure to handle config files and deltas across
> -multiple layers can be reused. Consistency validation is done implicitly
> +multiple layers can be reused (see :ref:`kconfig-diffs`).
> +Consistency validation is done implicitly
> and ``menuconfig`` and other kconfig commands will use config files and
> deltas as expected.
>
> diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
> index 03a05a661a97..c232cc91428a 100644
> --- a/doc/dev_manual.rst
> +++ b/doc/dev_manual.rst
> @@ -14,4 +14,5 @@ This chapter shows all (or most) of the details of how PTXdist works.
> dev_add_bin_only_files
> dev_create_new_pkg_templates
> dev_layers_in_ptxdist
> + dev_kconfig_diffs
> dev_code_signing
> --
> 2.29.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [APPLIED] doc: add section about kconfig diffs
2021-04-27 8:30 ` [ptxdist] [PATCH v2] " Roland Hieber
2021-04-27 11:49 ` Roland Hieber
@ 2021-05-07 6:07 ` Michael Olbrich
1 sibling, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2021-05-07 6:07 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
Thanks, applied as 2b3d8affa79e8b5603c6cfe31d195e1ef5672a9f.
Michael
[sent from post-receive hook]
On Fri, 07 May 2021 08:07:08 +0200, Roland Hieber <rhi@pengutronix.de> wrote:
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
>
> Message-Id: <20210427083030.7632-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/doc/dev_kconfig_diffs.rst b/doc/dev_kconfig_diffs.rst
> new file mode 100644
> index 000000000000..5673bd2d2dd6
> --- /dev/null
> +++ b/doc/dev_kconfig_diffs.rst
> @@ -0,0 +1,79 @@
> +.. _kconfig-diffs:
> +
> +Kconfig Diffs
> +-------------
> +
> +For packages using Kconfig as their configuration system, PTXdist can generate
> +their config file from another *reference config file* and a *Kconfig diff* on
> +the fly.
> +This mechanism can be used to build configuration variants of a kernel or
> +barebox package.
> +For example, a "debug" kernel package can refer to the config file of the
> +"production" kernel as its reference config file, and its Kconfig diff then
> +only contains the Kconfig symbols that were changed in the "debug" variant:
> +
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| release config symbol | debug kconfig diff | resulting debug config symbol |
> ++===================================+=====================================+===================================+
> +| CONFIG_LOCALVERSION="release" | CONFIG_LOCALVERSION="debug" | CONFIG_LOCALVERSION="debug" |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| # CONFIG_ARCH_MULTI_V6 is not set | | # CONFIG_ARCH_MULTI_V6 is not set |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| CONFIG_ARCH_MULTI_V7=y | | CONFIG_ARCH_MULTI_V7=y |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| # CONFIG_CGROUP_DEBUG is not set | CONFIG_CGROUP_DEBUG=y | CONFIG_CGROUP_DEBUG=y |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| # CONFIG_DEBUG_PREEMPT is not set | CONFIG_DEBUG_PREEMPT=y | CONFIG_DEBUG_PREEMPT=y |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| CONFIG_WATCHDOG=y | # CONFIG_WATCHDOG is not set | # CONFIG_WATCHDOG is not set |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| CONFIG_WATCHDOG_CORE=y | # CONFIG_WATCHDOG_CORE is undefined | |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +| CONFIG_BCM2835_WDT=y | # CONFIG_BCM2835_WDT is undefined | |
> ++-----------------------------------+-------------------------------------+-----------------------------------+
> +
> +Kconfig does not write symbols to the config file that have unfulfilled dependencies (e.g., in the
> +above example ``CONFIG_WATCHDOG_CORE`` and ``CONFIG_BCM2835_WDT`` depend on ``CONFIG_WATCHDOG``).
> +Those symbols that are not present in the resulting debug config file are represented as ``… is
> +undefined`` in the diff.
> +
> +The first line of the Kconfig diff file contains the MD5 sum of the reference config file.
> +PTXdist uses this checksum to detect when the reference config has changed,
> +in which case the diff needs to be regenerated from the package's config file,
> +and to make sure that the diff is applicable to the reference config.
> +
> +Using Kconfig diffs
> +~~~~~~~~~~~~~~~~~~~
> +
> +The main part is setting the ``<PKG>_REF_CONFIG`` variable of a package to the reference config
> +file, for example::
> +
> + # rules/kernel.make:
> + KERNEL_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-release)
> +
> +::
> +
> + # rules/kernel-debug.make:
> + KERNEL_DEBUG_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-debug)
> + KERNEL_DEBUG_REF_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-release)
> +
> +PTXdist will now automatically generate ``kernelconfig-debug`` from ``kernelconfig-release`` and
> +``kernelconfig-debug.diff`` whenever doing and *oldconfig* or *menuconfig* on the *kernel-debug*
> +package.
> +If any symbols were changed by that operation, both the ``kernelconfig-debug.diff`` and the
> +``kernelconfig-debug`` are updated afterwards.
> +
> +Kconfig diffs and layers
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +PTXdist uses the same diff mechanism whenever the config file of a Kconfig-style package is changed
> +in an inherited layer (see :ref:`layers-in-ptxdist`).
> +In that case, the diff is calculated between the package's config file in the base layer and the
> +package's (adapted) config file in the current layer.
> +
> +.. note::
> + When using both ``<PKG>_REF_CONFIG`` and inter-layer Kconfig diffs, the inter-layer diff takes
> + precedence, and the reference config file in the inherited layer is ignored.
> + In the following example, arrows represent the config diff relation:
> +
> + .. image:: dev_kconfig_diffs_layer_precedence.svg
> diff --git a/doc/dev_kconfig_diffs_layer_precedence.svg b/doc/dev_kconfig_diffs_layer_precedence.svg
> new file mode 100644
> index 000000000000..babd0db3fd6d
> --- /dev/null
> +++ b/doc/dev_kconfig_diffs_layer_precedence.svg
> @@ -0,0 +1,315 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<svg
> + xmlns:dc="http://purl.org/dc/elements/1.1/"
> + xmlns:cc="http://creativecommons.org/ns#"
> + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> + xmlns:svg="http://www.w3.org/2000/svg"
> + xmlns="http://www.w3.org/2000/svg"
> + width="442"
> + height="234.77905"
> + viewBox="0 0 116.94583 62.118626"
> + version="1.1"
> + id="svg8">
> + <defs
> + id="defs2">
> + <marker
> + style="overflow:visible"
> + id="marker1611"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1609" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1565"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1563" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1525"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1523" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1347"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1345" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="marker1265"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path1263" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="Arrow1Lend"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.8,0,0,-0.8,-10,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path879" />
> + </marker>
> + <marker
> + style="overflow:visible"
> + id="Arrow1Mend-8"
> + refX="0"
> + refY="0"
> + orient="auto">
> + <path
> + transform="matrix(-0.4,0,0,-0.4,-4,0)"
> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
> + d="M 0,0 5,-5 -12.5,0 5,5 Z"
> + id="path885-9" />
> + </marker>
> + </defs>
> + <metadata
> + id="metadata5">
> + <rdf:RDF>
> + <cc:Work
> + rdf:about="">
> + <dc:format>image/svg+xml</dc:format>
> + <dc:type
> + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
> + <dc:title></dc:title>
> + </cc:Work>
> + </rdf:RDF>
> + </metadata>
> + <g
> + id="layer1"
> + transform="translate(-26.821236,-51.558839)">
> + <g
> + id="g2061">
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="53.600998"
> + y="60.742458"
> + id="text839"><tspan
> + id="tspan837"
> + x="53.591736"
> + y="60.742458"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;stroke-width:0.2">base layer</tspan></text>
> + <g
> + id="g862"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect857"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text843"><tspan
> + id="tspan841"
> + x="53.598976"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-common</tspan></text>
> + </g>
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;line-height:1.2;font-family:'Roboto Mono';-inkscape-font-specification:'Roboto Mono';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-rule:evenodd;stroke:none;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + x="70.570671"
> + y="82.401321"
> + id="text1186"><tspan
> + id="tspan1184"
> + x="70.552147"
> + y="82.401321"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:'Roboto Mono';-inkscape-font-specification:'Roboto Mono';text-align:end;text-anchor:end;fill:#000000;stroke:none;stroke-width:0.529167"><PKG>_REF_CONFIG</tspan></text>
> + <g
> + id="g870"
> + transform="translate(1.3229138,18.520815)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect868"
> + width="39.6875"
> + height="7.9375"
> + x="36.346237"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="56.292305"
> + y="73.528664"
> + id="text866"><tspan
> + id="tspan864"
> + x="56.283047"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">barebox-rpi2</tspan></text>
> + </g>
> + <g
> + id="g1437"
> + transform="translate(1.3229138,30.42707)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1431"
> + width="39.6875"
> + height="7.9375"
> + x="36.346237"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="56.248898"
> + y="73.528664"
> + id="text1435"><tspan
> + id="tspan1433"
> + x="56.239635"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">barebox-am335x</tspan></text>
> + </g>
> + <path
> + style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#Arrow1Mend);stop-color:#000000"
> + d="M 37.669149,90.52054 H 33.700402"
> + id="path1439" />
> + <path
> + style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1347);stop-color:#000000"
> + d="M 37.669149,102.42673 H 33.700402 V 76.753111"
> + id="path1441" />
> + </g>
> + <path
> + style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1611);stop-color:#000000"
> + d="M 93.231651,71.999725 H 78.150399"
> + id="path1511" />
> + <path
> + style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1525);stop-color:#000000"
> + d="M 93.231651,90.52054 H 78.150399"
> + id="path1513" />
> + <path
> + style="vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker1565);stop-color:#000000"
> + d="M 93.231651,102.42679 H 78.150399"
> + id="path1515" />
> + <g
> + id="g2035">
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="116.98627"
> + y="60.742458"
> + id="text835"><tspan
> + id="tspan833"
> + x="116.97701"
> + y="60.742458"
> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Bold';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:0.2">inherited layer</tspan></text>
> + <g
> + id="g1493"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
> + transform="translate(63.499998)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1487"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text1491"><tspan
> + id="tspan1489"
> + x="53.598976"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-common</tspan></text>
> + </g>
> + <g
> + id="g1753"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
> + transform="translate(63.499998,18.520815)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1747"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text1751"><tspan
> + id="tspan1749"
> + x="53.598976"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-rpi2</tspan></text>
> + </g>
> + <g
> + id="g1761"
> + style="stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none"
> + transform="translate(63.499998,30.42707)">
> + <rect
> + style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stop-color:#000000"
> + id="rect1755"
> + width="47.625"
> + height="7.9375"
> + x="29.731653"
> + y="68.030975" />
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-rule:evenodd;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none;stop-color:#000000"
> + x="53.608234"
> + y="73.528664"
> + id="text1759"><tspan
> + id="tspan1757"
> + x="53.598972"
> + y="73.528664"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;fill:#000000;stroke-width:1.00013;stroke-miterlimit:4;stroke-dasharray:none">barebox-am335x</tspan></text>
> + </g>
> + </g>
> + <text
> + xml:space="preserve"
> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;line-height:1.2;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab, Normal';font-variant-ligatures:discretionary-ligatures;font-variant-position:super;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:-0.0185208px;word-spacing:0px;writing-mode:lr-tb;fill:#000000;fill-rule:evenodd;stroke-width:0.2;stroke-dasharray:1.2, 1.2;stop-color:#000000"
> + x="52.98016"
> + y="118.56184"
> + id="text847"><tspan
> + id="tspan845"
> + x="52.98016"
> + y="118.56184"
> + style="stroke-width:0.2" /></text>
> + <path
> + style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2.11667, 2.11667;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
> + d="M 85.823322,54.204674 V 111.03163"
> + id="path1343" />
> + </g>
> +</svg>
> diff --git a/doc/dev_layers_in_ptxdist.rst b/doc/dev_layers_in_ptxdist.rst
> index ec92c8c8a86c..a1066396ca28 100644
> --- a/doc/dev_layers_in_ptxdist.rst
> +++ b/doc/dev_layers_in_ptxdist.rst
> @@ -98,7 +98,8 @@ Packages with kconfig Based Config Files
>
> For packages such as the Linux kernel that have kconfig based config files,
> a lot of the infrastructure to handle config files and deltas across
> -multiple layers can be reused. Consistency validation is done implicitly
> +multiple layers can be reused (see :ref:`kconfig-diffs`).
> +Consistency validation is done implicitly
> and ``menuconfig`` and other kconfig commands will use config files and
> deltas as expected.
>
> diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
> index 03a05a661a97..c232cc91428a 100644
> --- a/doc/dev_manual.rst
> +++ b/doc/dev_manual.rst
> @@ -14,4 +14,5 @@ This chapter shows all (or most) of the details of how PTXdist works.
> dev_add_bin_only_files
> dev_create_new_pkg_templates
> dev_layers_in_ptxdist
> + dev_kconfig_diffs
> dev_code_signing
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH] ptxd_make_world_package_info: improve rev config handling when layers are involved
2021-04-27 11:49 ` Roland Hieber
@ 2021-05-07 6:42 ` Michael Olbrich
0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2021-05-07 6:42 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Olbrich
If a config is found in a base layer then this is used to calculate the
diff. So the ref config is only used if no lower layer has a config.
Improve the package-info output to take this into account:
- print the ref config only if it is actually used
- otherwise print the used base config from a lower layer
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
On Tue, Apr 27, 2021 at 01:49:04PM +0200, Roland Hieber wrote:
> Michael, do you have an idea how to improve this?
What about this?
Michael
scripts/lib/ptxd_make_world_kconfig.sh | 9 +++++++--
scripts/lib/ptxd_make_world_package_info.sh | 18 +++++++++++++++++-
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/scripts/lib/ptxd_make_world_kconfig.sh b/scripts/lib/ptxd_make_world_kconfig.sh
index 52005191633b..0aea5316856b 100644
--- a/scripts/lib/ptxd_make_world_kconfig.sh
+++ b/scripts/lib/ptxd_make_world_kconfig.sh
@@ -16,12 +16,17 @@ ptxd_make_world_kconfig_mode() {
}
export -f ptxd_make_world_kconfig_mode
-ptxd_make_kconfig_setup() {
+ptxd_make_kconfig_init() {
if [ -n "${ref_file_dotconfig}" ]; then
file_dotconfig="${ref_file_dotconfig}" ptxd_normalize_config &&
relative_ref_file_dotconfig="${relative_file_dotconfig}"
fi &&
- ptxd_normalize_config &&
+ ptxd_normalize_config
+}
+export -f ptxd_make_kconfig_init
+
+ptxd_make_kconfig_setup() {
+ ptxd_make_kconfig_init &&
ptxd_kconfig_setup_config "${ptx_config_mode}" "${pkg_build_dir}/.config" \
"${relative_file_dotconfig}" "${file_dotconfig}" "${relative_ref_file_dotconfig}"
if [ ${?} -ne 0 ]; then
diff --git a/scripts/lib/ptxd_make_world_package_info.sh b/scripts/lib/ptxd_make_world_package_info.sh
index 4d17f3d2c976..48b7b21dacc1 100644
--- a/scripts/lib/ptxd_make_world_package_info.sh
+++ b/scripts/lib/ptxd_make_world_package_info.sh
@@ -7,6 +7,8 @@
#
ptxd_make_world_package_info() {
+ local last_config base_config ref_config
+
# use patchin_init for pkg_patch_dir
ptxd_make_world_patchin_init || return
do_echo() {
@@ -26,8 +28,22 @@ ptxd_make_world_package_info() {
do_echo "image:" "$(ptxd_print_path "${image_image}")"
echo
+ if [ -n "${pkg_config}" ]; then
+ local file_dotconfig="${pkg_config}"
+ local ref_file_dotconfig="${pkg_ref_config}"
+ ptxd_make_kconfig_init
+ ptxd_kconfig_find_config "update" "${relative_file_dotconfig}" "${relative_ref_file_dotconfig}"
+ if [ "${base_config}" = "${pkg_ref_config}" ]; then
+ base_config=
+ fi
+ if [ -z "${base_config}" ]; then
+ ref_config="${pkg_ref_config}"
+ fi
+ fi
+
do_echo "config:" "$(ptxd_print_path "${pkg_config}")"
- do_echo "ref config:" "$(ptxd_print_path "${pkg_ref_config}")"
+ do_echo "base config:" "$(ptxd_print_path "${base_config}")"
+ do_echo "ref config:" "$(ptxd_print_path "${ref_config}")"
do_echo "${pkg_config}"
do_echo "license:" "${pkg_license}"
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-07 6:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 21:59 [ptxdist] [PATCH] doc: add section about kconfig diffs Roland Hieber
2021-04-27 8:30 ` [ptxdist] [PATCH v2] " Roland Hieber
2021-04-27 11:49 ` Roland Hieber
2021-05-07 6:42 ` [ptxdist] [PATCH] ptxd_make_world_package_info: improve rev config handling when layers are involved Michael Olbrich
2021-05-07 6:07 ` [ptxdist] [APPLIED] doc: add section about kconfig diffs Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox