Skip to contentSkip to conversation

dt-bindings: mtd: partitions: Add binman compatible

PATCH Superseded Simon Glass 3 participants 21 messages Nov 16, 2023 – Mar 14, 2024

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/3 dt-bindings: mtd: partitions: Add binman compatible

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +68 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.
+
+  Documentation for Binman is available at:
+
+  https://u-boot.readthedocs.io/en/latest/develop/package/binman.html
+
+  with the current image-description format at:
+
+  https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#image-description-format
+
+properties:
+  compatible:
+    const: binman
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+patternProperties:
+  "^partition(-.+|@[0-9a-f]+)$":
+    $ref: partition.yaml
+
+additionalProperties: false
+
+examples:
+  - |
+    partitions {
+        compatible = "binman";
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        partition@100000 {
+            label = "u-boot";
+            reg = <0x100000 0xf00000>;
+        };
+    };
Documentation/devicetree/bindings/mtd/partitions/partitions.yaml +1 -0
index 1dda2c80747b..849fd15d085c 100644
@@ -15,6 +15,7 @@ maintainers:
 
 oneOf:
   - $ref: arm,arm-firmware-suite.yaml
+  - $ref: binman.yaml
   - $ref: brcm,bcm4908-partitions.yaml
   - $ref: brcm,bcm947xx-cfe-partitions.yaml
   - $ref: fixed-partitions.yaml
MAINTAINERS +5 -0
index b294edaf5698..8704eefe6e2a 100644
@@ -3550,6 +3550,11 @@ F:	Documentation/filesystems/bfs.rst
 F:	fs/bfs/
 F:	include/uapi/linux/bfs_fs.h
 
+BINMAN
+M:	Simon Glass <[email protected]>
+S:	Supported
+F:	Documentation/devicetree/bindings/mtd/partitions/binman*
+
 BITMAP API
 M:	Yury Norov <[email protected]>
 R:	Andy Shevchenko <[email protected]>
Signature · 1 line
2.43.0.rc0.421.g78406f8d94-goog
#1 lore raw

PATCH v6 2/3 dt-bindings: mtd: binman-partition: Add binman compatibles

Add two compatible for binman entries, as a starting point for the schema.

Note that, after discussion on v2, we decided to keep the existing meaning of label so as not to require changes to existing userspace software when moving to use binman nodes to specify the firmware layout.

---

(no changes since v5)

Changes in v5:
- Add mention of why 'binman' is the vendor
- Drop 'select: false'
- Tidy up the compatible setings
- Use 'tfa-bl31' instead of 'atf-bl31'

Changes in v4:
- Correct selection of multiple compatible strings

Changes in v3:
- Drop fixed-partitions from the example
- Use compatible instead of label

Changes in v2:
- Use plain partition@xxx for the node name

 .../mtd/partitions/binman-partition.yaml      | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml
Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml new file +54 -0
new file mode 100644
index 000000000000..83222ac9aa78
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman-partition.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman partition
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  This corresponds to a binman 'entry'. It is a single partition which holds
+  data of a defined type.
+
+  The vendor is specified as binman since there are quite a number
+  of binman-specific entry types, such as section, fill and files,
+  to be added later.
+
+allOf:
+  - $ref: /schemas/mtd/partitions/partition.yaml#
+
+properties:
+  compatible:
+    enum:
+      - binman,entry # generic binman entry
+      - u-boot       # u-boot.bin from U-Boot project
+      - tfa-bl31     # bl31.bin or bl31.elf from TF-A project
+
+  reg:
+    minItems: 1
+    maxItems: 2
+
+additionalProperties: false
+
+examples:
+  - |
+    partitions {
+        compatible = "binman";
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        partition@100000 {
+            compatible = "u-boot";
+            reg = <0x100000 0xf00000>;
+        };
+
+        partition@200000 {
+            compatible = "tfa-bl31";
+            reg = <0x200000 0x100000>;
+        };
+    };
Signature · 1 line
2.43.0.rc0.421.g78406f8d94-goog
#2 lore raw

PATCH v6 3/3 dt-bindings: mtd: binman-partitions: Add alignment properties

In reply to Simon Glass

Add three properties for controlling alignment of partitions, aka 'entries' in binman.

For now there is no explicit mention of hierarchy, so a 'section' is just the 'binman' node.

These new properties are inputs to the packaging process, but are also needed if the firmware is repacked, to ensure that alignment constraints are not violated. Therefore they are provided as part of the schema.

---

Changes in v6:
- Correct schema-validation errors missed due to older dt-schema (enum fix and reg addition)

Changes in v5:
- Add value ranges
- Consistently mention alignment must be power-of-2
- Mention that alignment refers to bytes

Changes in v2:
- Fix 'a' typo in commit message

 .../mtd/partitions/binman-partition.yaml      | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml +54 -0
index 83222ac9aa78..2bc80c24bb9b 100644
@@ -33,6 +33,57 @@ properties:
     minItems: 1
     maxItems: 2
 
+  align:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 0x80000000
+    multipleOf: 2
+    description:
+      This sets the alignment of the entry in bytes.
+
+      The entry offset is adjusted so that the entry starts on an aligned
+      boundary within the containing section or image. For example ‘align =
+      <16>’ means that the entry will start on a 16-byte boundary. This may
+      mean that padding is added before the entry. The padding is part of
+      the containing section but is not included in the entry, meaning that
+      an empty space may be created before the entry starts. Alignment
+      must be a power of 2. If ‘align’ is not provided, no alignment is
+      performed.
+
+  align-size:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 0x80000000
+    multipleOf: 2
+    description:
+      This sets the alignment of the entry size in bytes. It must be a power
+      of 2.
+
+      For example, to ensure that the size of an entry is a multiple of 64
+      bytes, set this to 64. While this does not affect the contents of the
+      entry within binman itself (the padding is performed only when its
+      parent section is assembled), the end result is that the entry ends
+      with the padding bytes, so may grow. If ‘align-size’ is not provided,
+      no alignment is performed.
+
+  align-end:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 0x80000000
+    multipleOf: 2
+    description:
+      This sets the alignment (in bytes) of the end of an entry with respect
+      to the containing section. It must be a power of 2.
+
+      Some entries require that they end on an alignment boundary,
+      regardless of where they start. This does not move the start of the
+      entry, so the contents of the entry will still start at the beginning.
+      But there may be padding at the end. While this does not affect the
+      contents of the entry within binman itself (the padding is performed
+      only when its parent section is assembled), the end result is that the
+      entry ends with the padding bytes, so may grow. If ‘align-end’ is not
+      provided, no alignment is performed.
+
 additionalProperties: false
 
 examples:
@@ -45,10 +96,13 @@ examples:
         partition@100000 {
             compatible = "u-boot";
             reg = <0x100000 0xf00000>;
+            align-size = <0x1000>;
+            align-end = <0x10000>;
         };
 
         partition@200000 {
             compatible = "tfa-bl31";
             reg = <0x200000 0x100000>;
+            align = <0x4000>;
         };
     };
Signature · 1 line
2.43.0.rc0.421.g78406f8d94-goog
#3 lore raw
In reply to Simon Glass

Hi,

Quoted 8 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Is there any movement on this series, please?

Quoted 14 lines

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Quoted 5 lines

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

Regards,
Simon

maintainer
#4 lore raw
In reply to Simon Glass
Quoted 59 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +21 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +10 -0
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Rob

#5 lore raw

Hi Rob,

Quoted 67 lines · Rob Herring
Quoted 65 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +27 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
Quoted 8 lines

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 4 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +4 -0
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

Regards,
SImon

maintainer
#6 lore raw
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 67 lines · Rob Herring
Quoted 65 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +27 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
Quoted 8 lines

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 4 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +4 -0
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

In the partition nodes, 'align' for example is allowed for a binman partition but not a fixed-partition.

Note that the schema may not actually warn on extra properties ATM because there are some issues with the schema structure. Since there can be nested partittions, that complicates matters. It's been on my todo list to fix.

Rob

#7 lore raw

Hi Rob,

Quoted 82 lines · Rob Herring
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 75 lines · Rob Herring
Quoted 59 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +21 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +10 -0
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

But if not, then whatever works is fine for now. I just want to make some progress on this very, very old series.

Quoted 8 lines

In the partition nodes, 'align' for example is allowed for a binman partition but not a fixed-partition.

Note that the schema may not actually warn on extra properties ATM because there are some issues with the schema structure. Since there can be nested partittions, that complicates matters. It's been on my todo list to fix.

OK.

Regards,
Simon

maintainer
#8 lore raw
Quoted 89 lines · Simon Glass

Hi Rob,

Quoted 86 lines · Rob Herring
Quoted 83 lines · Simon Glass

Hi Rob,

Quoted 67 lines · Rob Herring
Quoted 65 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +27 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
Quoted 8 lines

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 4 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +4 -0
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

Quoted 6 lines
Quoted 2 lines

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Sure, but then the schema has to and that means extending fixed-partitions.

Rob

#9 lore raw

Hi Rob,

Quoted 94 lines · Rob Herring
Quoted 92 lines · Simon Glass

Hi Rob,

Quoted 88 lines · Rob Herring
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 67 lines · Rob Herring
Quoted 65 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +27 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
Quoted 8 lines

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 4 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +4 -0
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Quoted 6 lines
Quoted 3 lines

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Regards,
Simon

#10 lore raw

Hi Rob,

Quoted 102 lines · Simon Glass

Hi Rob,

Quoted 98 lines · Rob Herring
Quoted 95 lines · Simon Glass

Hi Rob,

Quoted 82 lines · Rob Herring
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 75 lines · Rob Herring
Quoted 59 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +21 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +10 -0
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable? If not, what is?

In any case, please can you help with this?

Regards,
Simon

maintainer
#11 lore raw
Quoted 109 lines · Simon Glass

Hi Rob,

Quoted 105 lines · Simon Glass

Hi Rob,

Quoted 100 lines · Rob Herring
Quoted 89 lines · Simon Glass

Hi Rob,

Quoted 86 lines · Rob Herring
Quoted 83 lines · Simon Glass

Hi Rob,

Quoted 67 lines · Rob Herring
Quoted 65 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +27 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
Quoted 8 lines

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 4 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +4 -0
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

Quoted 6 lines
Quoted 2 lines

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Sure, but then the schema has to and that means extending fixed-partitions.

Quoted 7 lines
Quoted 3 lines

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

Rob

#12 lore raw

Hi Rob,

Quoted 115 lines · Rob Herring
Quoted 113 lines · Simon Glass

Hi Rob,

Quoted 108 lines · Simon Glass

Hi Rob,

Quoted 94 lines · Rob Herring
Quoted 92 lines · Simon Glass

Hi Rob,

Quoted 88 lines · Rob Herring
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 67 lines · Rob Herring
Quoted 65 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +27 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
Quoted 8 lines

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 4 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +4 -0
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Quoted 6 lines
Quoted 3 lines

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Quoted 7 lines
Quoted 3 lines

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

Should I resend this series, or is it OK as it is?

Regards,
Simon

maintainer
#13 lore raw

Hi Simon,

[email protected] wrote on Sun, 4 Feb 2024 05:07:38 -0700:

Quoted 122 lines

Hi Rob,

Quoted 119 lines · Rob Herring
Quoted 116 lines · Simon Glass

Hi Rob,

Quoted 102 lines · Simon Glass

Hi Rob,

Quoted 98 lines · Rob Herring
Quoted 95 lines · Simon Glass

Hi Rob,

Quoted 82 lines · Rob Herring
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 75 lines · Rob Herring
Quoted 59 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +21 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +10 -0
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.  

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

Thanks,
Miquèl

#14 lore raw

Hi Miquel,

Quoted 138 lines · Miquel Raynal

Hi Simon,

[email protected] wrote on Sun, 4 Feb 2024 05:07:38 -0700:

Quoted 122 lines

Hi Rob,

Quoted 119 lines · Rob Herring
Quoted 116 lines · Simon Glass

Hi Rob,

Quoted 102 lines · Simon Glass

Hi Rob,

Quoted 98 lines · Rob Herring
Quoted 95 lines · Simon Glass

Hi Rob,

Quoted 82 lines · Rob Herring
Quoted 80 lines · Simon Glass

Hi Rob,

Quoted 75 lines · Rob Herring
Quoted 59 lines · Simon Glass

Add a compatible string for binman, so we can extend fixed-partitions in various ways.

---

(no changes since v5)

Changes in v5:
- Add #address/size-cells and parternProperties
- Drop $ref to fixed-partitions.yaml
- Drop 'select: false'

Changes in v4:
- Change subject line

Changes in v3:
- Drop fixed-partition additional compatible string
- Drop fixed-partitions from the example
- Mention use of compatible instead of label

Changes in v2:
- Drop mention of 'enhanced features' in fixed-partitions.yaml
- Mention Binman input and output properties
- Use plain partition@xxx for the node name

 .../bindings/mtd/partitions/binman.yaml       | 68 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 MAINTAINERS                                   |  5 ++
 3 files changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +21 -0
new file mode 100644
index 000000000000..329217550a98
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Google LLC
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Binman firmware layout
+
+maintainers:
+  - Simon Glass <[email protected]>
+
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,

Documentation/devicetree/bindings/mtd/partitions/binman.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file +10 -0
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

Quoted 6 lines

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

Regards,
Simon

maintainer
#15 lore raw

Hi Simon,

Quoted 61 lines
Quoted 61 lines
Quoted 45 lines
Quoted 45 lines
Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 23 lines
Quoted 23 lines
Quoted 22 lines
Quoted 8 lines
(quoted diff) +8 -0
+description: |
+  The binman node provides a layout for firmware, used when packaging firmware
+  from multiple projects. It is based on fixed-partitions, with some
+  extensions, but uses 'compatible' to indicate the contents of the node, to
+  avoid perturbing or confusing existing installations which use 'label' for a
+  particular purpose.
+
+  Binman supports properties used as inputs to the firmware-packaging process,

Review

Quoted 10 lines
(quoted diff) +10 -0
+  such as those which control alignment of partitions. This binding addresses
+  these 'input' properties. For example, it is common for the 'reg' property
+  (an 'output' property) to be set by Binman, based on the alignment requested
+  in the input.
+
+  Once processing is complete, input properties have mostly served their
+  purpose, at least until the firmware is repacked later, e.g. due to a
+  firmware update. The 'fixed-partitions' binding should provide enough
+  information to read the firmware at runtime, including decompression if
+  needed.  

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

Quoted 7 lines
Quoted 1 line

At least that is my understanding and also what I kind of agree with.

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

This is my current understanding, yes. But acknowledgment from Rob is also welcome.

Thanks,
Miquèl

#16 lore raw

Hi Miquel,

Quoted 66 lines · Miquel Raynal

Hi Simon,

Quoted 63 lines
Quoted 62 lines
Quoted 45 lines
Quoted 45 lines
Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 23 lines
Quoted 23 lines
Quoted 22 lines
Quoted 18 lines

+description: |
+ The binman node provides a layout for firmware, used when packaging firmware
+ from multiple projects. It is based on fixed-partitions, with some
+ extensions, but uses 'compatible' to indicate the contents of the node, to
+ avoid perturbing or confusing existing installations which use 'label' for a
+ particular purpose.
+
+ Binman supports properties used as inputs to the firmware-packaging process,
+ such as those which control alignment of partitions. This binding addresses
+ these 'input' properties. For example, it is common for the 'reg' property
+ (an 'output' property) to be set by Binman, based on the alignment requested
+ in the input.
+
+ Once processing is complete, input properties have mostly served their
+ purpose, at least until the firmware is repacked later, e.g. due to a
+ firmware update. The 'fixed-partitions' binding should provide enough
+ information to read the firmware at runtime, including decompression if
+ needed.

How is this going to work exactly? binman reads these nodes and then writes out 'fixed-partitions' nodes. But then you've lost the binman specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

Quoted 8 lines
Quoted 5 lines

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

This is my current understanding, yes. But acknowledgment from Rob is also welcome.

I am trying again to wade through all the confusion here.

There is not actually a 'fixed-partition' node. So are you saying I should add one? There is already a 'partitions' node. Won't they conflict?

Would it be possible for you to look at my patches and suggest something? I think at this point, after so many hours of trying different things and trying to understand what is needed, I could really use a little help.

Thank you,
Simon

maintainer
#17 lore raw

Hi Simon,

[email protected] wrote on Fri, 8 Mar 2024 15:44:25 +1300:

Quoted 75 lines

Hi Miquel,

Quoted 72 lines · Miquel Raynal

Hi Simon,

Quoted 68 lines
Quoted 56 lines
Quoted 45 lines
Quoted 45 lines
Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 23 lines
Quoted 23 lines
Quoted 22 lines

+description: |
+ The binman node provides a layout for firmware, used when packaging firmware
+ from multiple projects. It is based on fixed-partitions, with some
+ extensions, but uses 'compatible' to indicate the contents of the node, to
+ avoid perturbing or confusing existing installations which use 'label' for a
+ particular purpose.
+
+ Binman supports properties used as inputs to the firmware-packaging process,
+ such as those which control alignment of partitions. This binding addresses
+ these 'input' properties. For example, it is common for the 'reg' property
+ (an 'output' property) to be set by Binman, based on the alignment requested
+ in the input.
+
+ Once processing is complete, input properties have mostly served their
+ purpose, at least until the firmware is repacked later, e.g. due to a
+ firmware update. The 'fixed-partitions' binding should provide enough
+ information to read the firmware at runtime, including decompression if
+ needed.

How is this going to work exactly? binman reads these nodes and then
writes out 'fixed-partitions' nodes. But then you've lost the binman
specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick around. So long as it is compatible with fixed-partition as well, this should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

Quoted 6 lines

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

Quoted 8 lines
Quoted 2 lines

This is my current understanding, yes. But acknowledgment from Rob is also welcome.

I am trying again to wade through all the confusion here.

There is not actually a 'fixed-partition' node. So are you saying I should add one? There is already a 'partitions' node. Won't they conflict?

Sorry for the confusion, there is a 'partitions' node indeed. This node shall declare it's "programming model" (let's say), ie. how it should be parsed. What defines this programming model today is the 'fixed-partitions' compatible. I think we (Rob and myself, but again, Rob, please confirm) agree on the fact that we don't want to duplicate the fixed-partitions compatible/logic and thus the binman compatible was rejected.

Hence, in order to move forward, I would definitely appreciate an update of the fixed-partitions binding in order to support what binman can generate.

We are here talking about the output of binman, not its input. TBH I haven't understood the point in having binman's input parsed by the generic yaml binding. I would advise to focus on binman's output first because it feels more relevant, at a first glance.

Quoted 4 lines

Would it be possible for you to look at my patches and suggest something? I think at this point, after so many hours of trying different things and trying to understand what is needed, I could really use a little help.

I hope the above details will help.

Thanks,
Miquèl

#18 lore raw

Hi Miquel,

Quoted 97 lines · Miquel Raynal

Hi Simon,

[email protected] wrote on Fri, 8 Mar 2024 15:44:25 +1300:

Quoted 75 lines

Hi Miquel,

Quoted 72 lines · Miquel Raynal

Hi Simon,

Quoted 68 lines
Quoted 56 lines
Quoted 45 lines
Quoted 45 lines
Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 23 lines
Quoted 23 lines

+description: |
+ The binman node provides a layout for firmware, used when packaging firmware
+ from multiple projects. It is based on fixed-partitions, with some
+ extensions, but uses 'compatible' to indicate the contents of the node, to
+ avoid perturbing or confusing existing installations which use 'label' for a
+ particular purpose.
+
+ Binman supports properties used as inputs to the firmware-packaging process,
+ such as those which control alignment of partitions. This binding addresses
+ these 'input' properties. For example, it is common for the 'reg' property
+ (an 'output' property) to be set by Binman, based on the alignment requested
+ in the input.
+
+ Once processing is complete, input properties have mostly served their
+ purpose, at least until the firmware is repacked later, e.g. due to a
+ firmware update. The 'fixed-partitions' binding should provide enough
+ information to read the firmware at runtime, including decompression if
+ needed.

How is this going to work exactly? binman reads these nodes and then
writes out 'fixed-partitions' nodes. But then you've lost the binman
specifc parts needed for repacking.

Quoted 6 lines
Quoted 3 lines

No, they are the same node. I do want the extra information to stick
around. So long as it is compatible with fixed-partition as well, this
should work OK.

How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

Quoted 6 lines

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

Quoted 8 lines
Quoted 2 lines

This is my current understanding, yes. But acknowledgment from Rob is also welcome.

I am trying again to wade through all the confusion here.

There is not actually a 'fixed-partition' node. So are you saying I should add one? There is already a 'partitions' node. Won't they conflict?

Sorry for the confusion, there is a 'partitions' node indeed. This node shall declare it's "programming model" (let's say), ie. how it should be parsed. What defines this programming model today is the 'fixed-partitions' compatible. I think we (Rob and myself, but again, Rob, please confirm) agree on the fact that we don't want to duplicate the fixed-partitions compatible/logic and thus the binman compatible was rejected.

Quoted 3 lines

Hence, in order to move forward, I would definitely appreciate an update of the fixed-partitions binding in order to support what binman can generate.

OK, so I think my confusion is that I thought you were referring to a 'partitions' compatible. But you are just referring to the name of the node being 'partitions', with the compatible string being 'fixed-partitions'.

I believe I can make this work by adding a new 'binman.yaml' with the compatibles that I want to introduce. I cannot change partition.yaml since it does not itself specify a compatible.

Quoted 5 lines

We are here talking about the output of binman, not its input. TBH I haven't understood the point in having binman's input parsed by the generic yaml binding. I would advise to focus on binman's output first because it feels more relevant, at a first glance.

Yes that is fine.

Quoted 7 lines
Quoted 5 lines

Would it be possible for you to look at my patches and suggest something? I think at this point, after so many hours of trying different things and trying to understand what is needed, I could really use a little help.

I hope the above details will help.

I think so, thank you. I will send another version.

Regards,
Simon

maintainer
#19 lore raw

Hi Simon,

[email protected] wrote on Wed, 13 Mar 2024 11:25:42 +1300:

Quoted 100 lines

Hi Miquel,

Quoted 97 lines · Miquel Raynal

Hi Simon,

[email protected] wrote on Fri, 8 Mar 2024 15:44:25 +1300:

Quoted 75 lines

Hi Miquel,

Quoted 72 lines · Miquel Raynal

Hi Simon,

Quoted 68 lines
Quoted 56 lines
Quoted 45 lines
Quoted 45 lines
Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 29 lines

+description: |
+ The binman node provides a layout for firmware, used when packaging firmware
+ from multiple projects. It is based on fixed-partitions, with some
+ extensions, but uses 'compatible' to indicate the contents of the node, to
+ avoid perturbing or confusing existing installations which use 'label' for a
+ particular purpose.
+
+ Binman supports properties used as inputs to the firmware-packaging process,
+ such as those which control alignment of partitions. This binding addresses
+ these 'input' properties. For example, it is common for the 'reg' property
+ (an 'output' property) to be set by Binman, based on the alignment requested
+ in the input.
+
+ Once processing is complete, input properties have mostly served their
+ purpose, at least until the firmware is repacked later, e.g. due to a
+ firmware update. The 'fixed-partitions' binding should provide enough
+ information to read the firmware at runtime, including decompression if
+ needed.

How is this going to work exactly? binman reads these nodes and then
writes out 'fixed-partitions' nodes. But then you've lost the binman
specifc parts needed for repacking.

No, they are the same node. I do want the extra information to stick
around. So long as it is compatible with fixed-partition as well, this
should work OK.

How can it be both? The partitions node compatible can be either
'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in response to feedback but perhaps the feedback was leading me down the wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

Quoted 6 lines

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

Quoted 8 lines
Quoted 2 lines

This is my current understanding, yes. But acknowledgment from Rob is also welcome.

I am trying again to wade through all the confusion here.

There is not actually a 'fixed-partition' node. So are you saying I should add one? There is already a 'partitions' node. Won't they conflict?

Sorry for the confusion, there is a 'partitions' node indeed. This node shall declare it's "programming model" (let's say), ie. how it should be parsed. What defines this programming model today is the 'fixed-partitions' compatible. I think we (Rob and myself, but again, Rob, please confirm) agree on the fact that we don't want to duplicate the fixed-partitions compatible/logic and thus the binman compatible was rejected.

Quoted 8 lines
Quoted 3 lines

Hence, in order to move forward, I would definitely appreciate an update of the fixed-partitions binding in order to support what binman can generate.

OK, so I think my confusion is that I thought you were referring to a 'partitions' compatible. But you are just referring to the name of the node being 'partitions', with the compatible string being 'fixed-partitions'.

Yes.

Quoted 4 lines

I believe I can make this work by adding a new 'binman.yaml' with the compatibles that I want to introduce. I cannot change partition.yaml since it does not itself specify a compatible.

What about fixed-partitions.ymal? The yaml file name should match the compatible.

Quoted 13 lines
Quoted 4 lines

We are here talking about the output of binman, not its input. TBH I haven't understood the point in having binman's input parsed by the generic yaml binding. I would advise to focus on binman's output first because it feels more relevant, at a first glance.

Yes that is fine.

Quoted 6 lines
Quoted 5 lines

Would it be possible for you to look at my patches and suggest something? I think at this point, after so many hours of trying different things and trying to understand what is needed, I could really use a little help.

Quoted 6 lines
Quoted 1 line

I hope the above details will help.

I think so, thank you. I will send another version.

Regards,
Simon

Thanks,
Miquèl

#20 lore raw

Hi Miquel,

Quoted 117 lines · Miquel Raynal

Hi Simon,

[email protected] wrote on Wed, 13 Mar 2024 11:25:42 +1300:

Quoted 100 lines

Hi Miquel,

Quoted 97 lines · Miquel Raynal

Hi Simon,

[email protected] wrote on Fri, 8 Mar 2024 15:44:25 +1300:

Quoted 75 lines

Hi Miquel,

Quoted 72 lines · Miquel Raynal

Hi Simon,

Quoted 68 lines
Quoted 56 lines
Quoted 45 lines
Quoted 45 lines
Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines

+description: |
+ The binman node provides a layout for firmware, used when packaging firmware
+ from multiple projects. It is based on fixed-partitions, with some
+ extensions, but uses 'compatible' to indicate the contents of the node, to
+ avoid perturbing or confusing existing installations which use 'label' for a
+ particular purpose.
+
+ Binman supports properties used as inputs to the firmware-packaging process,
+ such as those which control alignment of partitions. This binding addresses
+ these 'input' properties. For example, it is common for the 'reg' property
+ (an 'output' property) to be set by Binman, based on the alignment requested
+ in the input.
+
+ Once processing is complete, input properties have mostly served their
+ purpose, at least until the firmware is repacked later, e.g. due to a
+ firmware update. The 'fixed-partitions' binding should provide enough
+ information to read the firmware at runtime, including decompression if
+ needed.

How is this going to work exactly? binman reads these nodes and then
writes out 'fixed-partitions' nodes. But then you've lost the binman
specifc parts needed for repacking.

No, they are the same node. I do want the extra information to stick
around. So long as it is compatible with fixed-partition as well, this
should work OK.

How can it be both? The partitions node compatible can be either
'fixed-partitions' or 'binman'.

Can we not allow it to be both? I have tried to adjust things in
response to feedback but perhaps the feedback was leading me down the
wrong path?

Quoted 6 lines
Quoted 2 lines

Sure, but then the schema has to and that means extending fixed-partitions.

Can we cross that bridge later? There might be resistance to it. I'm not sure. For now, perhaps just a binman compatible works well enough to make progress.

Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable?

Quoted 7 lines
Quoted 3 lines

There's only 2 ways that it can work. Either binman writes out fixed-partition nodes dropping/replacing anything only defined for binman or fixed-partition is extended to include what binman needs.

OK, then I suppose the best way is to add a new binman compatible, as is done with this v6 series. People then need to choose it instead of fixed-partition.

I'm sorry this is not at all what Rob suggested, or did I totally misunderstand his answer?

Quoted 6 lines

In both cases the solution is to generate a "fixed-partition" node. Now up to you to decide whether binman should adapt the output to the current schema, or if the current schema should be extended to understand all binman's output.

At least that is my understanding and also what I kind of agree with.

I do want to binman schema to include all the features of Binman.

So are you saying that there should not be a 'binman' schema, but I should just add all the binman properties to the fixed-partition schema?

Quoted 8 lines
Quoted 2 lines

This is my current understanding, yes. But acknowledgment from Rob is also welcome.

I am trying again to wade through all the confusion here.

There is not actually a 'fixed-partition' node. So are you saying I should add one? There is already a 'partitions' node. Won't they conflict?

Sorry for the confusion, there is a 'partitions' node indeed. This node shall declare it's "programming model" (let's say), ie. how it should be parsed. What defines this programming model today is the 'fixed-partitions' compatible. I think we (Rob and myself, but again, Rob, please confirm) agree on the fact that we don't want to duplicate the fixed-partitions compatible/logic and thus the binman compatible was rejected.

Quoted 8 lines
Quoted 3 lines

Hence, in order to move forward, I would definitely appreciate an update of the fixed-partitions binding in order to support what binman can generate.

OK, so I think my confusion is that I thought you were referring to a 'partitions' compatible. But you are just referring to the name of the node being 'partitions', with the compatible string being 'fixed-partitions'.

Yes.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

I believe I can make this work by adding a new 'binman.yaml' with the compatibles that I want to introduce. I cannot change partition.yaml since it does not itself specify a compatible.

What about fixed-partitions.ymal? The yaml file name should match the compatible.

But we already decided we cannot add a new 'binman' compatible but want to use the existing fixed-partitions.yaml

I cannot add compatible strings into that, since these are defined by the default files which make use of partition.yaml

Anyway, I will see v7 so you can see what I mean.

Quoted 14 lines
Quoted 14 lines
Quoted 5 lines

We are here talking about the output of binman, not its input. TBH I haven't understood the point in having binman's input parsed by the generic yaml binding. I would advise to focus on binman's output first because it feels more relevant, at a first glance.

Yes that is fine.

Quoted 6 lines
Quoted 5 lines

Would it be possible for you to look at my patches and suggest something? I think at this point, after so many hours of trying different things and trying to understand what is needed, I could really use a little help.

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

I hope the above details will help.

I think so, thank you. I will send another version.

Regards,
Simon

Regards,
Simon