FWUMDATA(1)

NAME
fwumdata - read, display, and modify FWU metadata

SYNOPSIS
fwumdata [-c config] [-l] [-u] [-a bankid] [-p bankid] [-s bankid state] [-i imageid] [-b bankid] [-A] [-C] [-B num_banks] [-I num_images]
fwumdata -h

DESCRIPTION
fwumdata reads, displays, and modifies FWU (Firmware Update) metadata from Linux userspace.

The tool operates on FWU metadata stored on block or MTD devices, allowing userspace manipulation of firmware update state including active bank selection, image acceptance, and bank state management.

OPTIONS

-c, --config file
    Use custom configuration file. By default, the tool searches for ./fwumdata.config then /etc/fwumdata.config.

-l, --list
    Display detailed metadata information including all GUIDs, image entries, and bank information. Without this option, only a summary is shown.

-u, --update
    Update metadata if CRC validation fails. Useful for recovering from corrupted metadata.

-a, --active bankid
    Set the active bank index to bank.

-p, --previous bankid
    Set the previous active bank index to bank.

-s, --state bankid state
    Set bank index bankid to the specified state. Valid states are: accepted, valid, or invalid. Supported only with version 2 metadata. When setting a bank to accepted state, all firmware images in that bank are automatically marked as accepted.

-i, --image imageid
    Specify image number (used with -A or -C).

-b, --bank bankid
    Specify bank number (used with -A or -C).

-A, --accept
    Accept the image specified by -i in the bank specified by -b. Sets the FWU_IMAGE_ACCEPTED flag for the image.

-C, --clear
    Clear the acceptance flag for the image specified by -i in the bank specified by -b. According to the FWU specification, the bank state is automatically set to invalid before clearing the acceptance flag.

-B, --nbanks num_banks
    Specify total number of banks (required for V1 metadata).

-I, --nimages num_images
    Specify total number of images (required for V1 metadata).

-h, --help
    Print usage information and exit.

CONFIGURATION FILE
The configuration file specifies the location of FWU metadata on storage devices. The format is:

    # Device Name      Device Offset    Metadata Size    Erase Size
    /dev/mtd0          0x0              0x78             0x1000
    /dev/mtd1          0x0              0x78             0x1000

Lines starting with # are comments. Erase Size is optional and only applies to MTD devices; if omitted, it defaults to the metadata size.

Specifying two devices enables redundant metadata support.

BUGS
Please report bugs to the U-Boot bug tracker (https://source.denx.de/u-boot/u-boot/issues).

EXAMPLES
Display FWU metadata summary:

    $
    fwumdata

Display detailed metadata with all GUIDs:

    $
    fwumdata -l

Set active bank to 1:

    $
    fwumdata -a 1

Set bank 1 to accepted state (automatically accepts all images in that bank):

    $
    fwumdata -s 1 accepted

Accept image 0 in bank 0:

    $
    fwumdata -i 0 -b 0 -A -l

Clear acceptance for image 0 in bank 1:

    $
    fwumdata -i 0 -b 1 -C -l

Clear acceptance for image 1 in bank 1 with metadata V1:

    $
    fwumdata -B 2 -I 2 -i 1 -b 1 -C -l

Use custom configuration file:

    $
    fwumdata -c /path/to/custom.config

SEE ALSO
mkfwumdata(1)