Skip to content

Commit 83dfbb1

Browse files
jk-ozlabsmkj
authored andcommitted
pldm-fw, pldm-fw-cli: Split README content into library and cli components
The `pldm-fw` binary used to live in the `pldm-fw` crate. This has since been split into library and binary crates, but the README remained in the library crate. Since `pldm-fw-cli` is more end-user visible, split the cli details out into the crate README. Signed-off-by: Jeremy Kerr <[email protected]>
1 parent 02e7e25 commit 83dfbb1

File tree

2 files changed

+62
-32
lines changed

2 files changed

+62
-32
lines changed

pldm-fw-cli/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
PLDM for Firmware Update command-line Update Agent
2+
--------------------------------------------------
3+
4+
This crate contains the `pldm-fw` command-line utility: a PLDM for Firmware
5+
Update ("PLDM type 5") Update Agent (UA). This can be used to interact with
6+
devices that implement the PLDM type 5 for their firmware management functions
7+
("firmware devices", or FD), and PLDM firmware package files.
8+
9+
This utility is a small wrapper around the [`pldm-fw`](../pldm-fw) crate, which
10+
implements the actual update and package-handling logic.
11+
12+
Usage
13+
=====
14+
15+
`pldm-fw` has a subcommand-style interface, to invoke one of the query or
16+
update functions of the utility.
17+
18+
```
19+
$ pldm-fw --help
20+
Usage: pldm-fw <command> [<args>]
21+
22+
PLDM update utility
23+
24+
Options:
25+
--help display usage information
26+
27+
Commands:
28+
inventory Query FD inventory
29+
update Update FD from a package file
30+
cancel Cancel ongoing update
31+
pkg-info Query package contents
32+
version Print pldm-fw version
33+
extract Extract package contents
34+
```
35+
36+
Each command provides its own usage information. For example, for the
37+
`inventory` command:
38+
39+
```
40+
$ pldm-fw inventory --help
41+
Usage: pldm-fw inventory <addr>
42+
43+
Query FD inventory
44+
45+
Positional Arguments:
46+
addr MCTP net/EID of device
47+
48+
Options:
49+
--help display usage information
50+
```
51+
52+
Operations that interact with a FD (`inventory`, `update` and `cancel`) will
53+
require an argument that specifies the MCTP address of the device; this is in
54+
`<net>,<eid>` format, representing the MCTP network ID, and MCTP endpoint ID.
55+
The `<net>,` portion is optional; if not specified, the system default network
56+
will be used.

pldm-fw/README.md

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,16 @@ PLDM for Firmware Update library and utilities
22
----------------------------------------------
33

44
This crate provides a PLDM for Firmware Update ("PLDM type 5") implementation
5-
in Rust, both as a library and a small command-line utility.
5+
in Rust, as a library. This uses the common [`mctp` traits](../mctp) crate for
6+
communication, and is intended for use in both embedded and standard
7+
environments.
68

79
PLDM type 5 is defined by DMTF DSP0267. This crate supports v1.1.0 and v1.2.0
810
of that specification.
911

10-
The library
11-
-----------
12-
1312
The `pldm-fw` library provides type definitions and serialisation
1413
implementations for type-5 communication. The `pkg` module provides support for
15-
reading PLDM package files, which can then be used for updates
16-
17-
The `pldm-fw` utility
18-
---------------------
19-
20-
The `pldm-fw` utility uses the library to implement a fairly basic firmware
21-
updater. `pldm-fw` provides a few subcommands for querying a device's firmware
22-
inventory, printing the contents of an update package, and applying an
23-
update package to a device.
24-
25-
```
26-
$ pldm-fw --help
27-
Usage: pldm-fw <command> [<args>]
28-
29-
PLDM update utility
30-
31-
Options:
32-
--help display usage information
33-
34-
Commands:
35-
inventory Query FD inventory
36-
update Update FD from a package file
37-
cancel Cancel ongoing update
38-
pkg-info Query package contents
39-
version Print pldm-fw version
40-
extract Extract package contents
41-
```
42-
14+
reading PLDM package files, which can then be used for updates.
4315

16+
The related [`pldm-fw-cli`](../pldm-fw-cli) crate uses this crate to implement a
17+
small firmware update agent (UA) as a Linux command-line utility.

0 commit comments

Comments
 (0)