firmweaver: shared OAuth PKCE flow - New shared/auth package with OAuth2 PKCE authorization - Token caching in ~/.config/firmweaver/token.json - Add "firmweaver auth [login|status|logout|token]" subcommands - Add unit tests for PKCE Auth stuff is needed for both supporting google sheets and metrics in subsequent CLs. BUG=b:475292981 TEST=go test -v -race ./... Change-Id: Ib485823adeb30e15d4badec4ac9f1b2ea2b0f681 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/firmweaver/+/8318029 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: Kshitij Shah <tij@google.com> Commit-Queue: Kshitij Shah <tij@google.com>
Firmweaver is a collection of tools for Chromium OS to assist with initial firmware setup during board bringup.
The Chromium OS project includes tools to assist with initial firmware setup during board bringup. These tools generate certain objects in Application Processor (AP) and Embedded Controller (EC) firmware (e.g., EC devicetree, AP GPIO configuration, etc.).
The tools take a curated sheet as prepared by the hardware team as an input and generate these objects as output. Developers can validate the generated output and contribute them to the concerned project.
coreboot_gpio, alias: gpio)zephyr_dtsi, alias: dtsi)Build the firmweaver binary from the repository root:
go build -o firmweaver .
The coreboot_gpio (alias: gpio) parses a GPIO map CSV file and generates C configuration code.
./firmweaver coreboot_gpio --soc <soc_type> --csv <path_to_csv> [--output <path_to_output_c_file>]
--soc: SoC type. Supported values: intel, qcom, mtk. (Required)--csv: Path to the local CSV file containing the GPIO map. (Required)--output: Path to the output file. If omitted, output is written to stdout.To generate Intel GPIO configuration from the provided example CSV:
./firmweaver coreboot_gpio --soc intel --csv coreboot_gpio/test/ExampleGpio.csv --output coreboot_gpio/test/gpio_config.c
(You can also use the shorthand ./firmweaver gpio ...)
The zephyr_dtsi (alias: dtsi) parses an EC pinout CSV spreadsheet and generates Zephyr devicetree overlays.
./firmweaver zephyr_dtsi --chip <chip_name> --csv <path_to_csv> [--pin-col <variant>] [--output <path_to_output_dtsi>]
To generate Nuvoton NPCX9 Devicetree overlay from the provided example CSV:
./firmweaver zephyr_dtsi --chip npcx99 --csv zephyr_dtsi/test/ExampleEcPinout.csv --pin-col "NPCX99 (NPCX)" --output zephyr_dtsi/test/generated.dtsi
(You can also use the shorthand ./firmweaver dtsi ...)
Run unit tests across all tools in the workspace:
go test -v ./...
This project follows the standard Chromium OS contribution process.