Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml
Extension
.yaml
Size
3435 bytes
Lines
140
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: U-Boot environment variables layout

description: |
  U-Boot uses environment variables to store device parameters and
  configuration. They may be used for booting process, setup or keeping end user
  info.

  Data is stored using U-Boot specific formats (variant specific header and NUL
  separated key-value pairs).

  Environment data can be stored on various storage entities, e.g.:
  1. Raw flash partition
  2. UBI volume

  This binding allows marking storage device (as containing env data) and
  specifying used format.

  Variables can be defined as NVMEM device subnodes.

maintainers:
  - Rafał Miłecki <rafal@milecki.pl>

properties:
  compatible:
    oneOf:
      - description: A standalone env data block
        const: u-boot,env
      - description: Two redundant blocks with active one flagged
        const: u-boot,env-redundant-bool
      - description: Two redundant blocks with active having higher counter
        const: u-boot,env-redundant-count
      - description: Broadcom's variant with custom header
        const: brcm,env

  reg:
    description: Partition offset and size for env on top of MTD
    maxItems: 1

  bootcmd:
    type: object
    description: Command to use for automatic booting

  env-size:
    description:
      Size in bytes of the environment data used by U-Boot for CRC
      calculation. If omitted, the full NVMEM region size is used.
    $ref: /schemas/types.yaml#/definitions/uint32

  ethaddr:
    type: object
    description: Ethernet interfaces base MAC address.
    additionalProperties: false

    properties:
      "#nvmem-cell-cells":
        description: The first argument is a MAC address offset.
        const: 1

allOf:
  - if:
      properties:
        $nodename:
          not:
            contains:

Annotation

Implementation Notes