[PATCH 00/10] Add interface to update firmware from Petitboot
Samuel Mendoza-Jonas
sam at mendozajonas.com
Fri Aug 25 15:59:30 AEST 2017
This series adds a generic framework to a) parse firmware version strings of
both the local machine and a remote metadata file, b) compare them for
differences and if the remote is newer, c) update the machine's firmware
to the remote updated version.
The pointy-end of the update process is provided by platform-specific code.
This series adds platform-powerpc support for updating BMC-machines with
pflash. Other methods of updating (eg. update_flash, etc) can be easily
added to fit into this framework.
A new ncurses screen is added, "Firmware Updates" which allows the user to
set a remote metadata and/or update source, and execute an update. Current
and remote update versions are displayed here for comparison.
By itself this new functionality is recommended for development purposes
only - this does *not* implement authentication or verification of the
remote update. Access to this feature is only enabled if the
"petitboot,platform_update?" parameter is set to true in NVRAM.
Samuel Mendoza-Jonas (10):
lib/process: Safely read partial stdout buffer
lib/url: Check URL file extensions
lib/system: Add pflash
Explicitly parse version strings read from flash
lib/version: Version parsing and comparison
lib/device-tree: Parse package versions from ibm,firmware-versions
Add generic support for platform updates
ui/ncurses: "Firmware Updates" screen
discover/platform-powerpc: Determine ppc platform type
discover/platform-powerpc: Platform Firmware Updates
configure.ac | 13 +-
discover/device-handler.c | 208 ++++++++++++++-
discover/device-handler.h | 2 +
discover/discover-server.c | 9 +
discover/hostboot.c | 88 ++++++-
discover/hostboot.h | 5 +-
discover/paths.c | 3 +-
discover/platform-powerpc.c | 253 +++++++++++++++++-
discover/platform.c | 18 ++
discover/platform.h | 10 +
discover/sysinfo.c | 22 ++
discover/sysinfo.h | 5 +
lib/Makefile.am | 18 +-
lib/device-tree/device-tree.c | 117 +++++++++
lib/device-tree/device-tree.h | 34 +++
lib/flash/flash.c | 4 +-
lib/pb-config/pb-config.c | 8 +
lib/pb-protocol/pb-protocol.c | 147 +++++++++--
lib/pb-protocol/pb-protocol.h | 2 +
lib/process/process.c | 8 +-
lib/system/system.c | 1 +
lib/system/system.h | 1 +
lib/types/types.c | 16 ++
lib/types/types.h | 28 +-
lib/url/url.c | 15 ++
lib/url/url.h | 1 +
lib/version/version.c | 417 ++++++++++++++++++++++++++++++
lib/version/version.h | 31 +++
test/lib/Makefile.am | 3 +-
test/lib/test-version-parsing.c | 104 ++++++++
test/parser/handler.c | 10 +
ui/common/discover-client.c | 18 ++
ui/common/discover-client.h | 4 +
ui/ncurses/Makefile.am | 5 +-
ui/ncurses/nc-cui.c | 87 ++++++-
ui/ncurses/nc-cui.h | 3 +
ui/ncurses/nc-firmware-help.c | 4 +
ui/ncurses/nc-firmware.c | 553 ++++++++++++++++++++++++++++++++++++++++
ui/ncurses/nc-firmware.h | 34 +++
ui/ncurses/nc-scr.h | 1 +
ui/ncurses/nc-sysinfo.c | 6 +-
ui/ncurses/nc-widgets.c | 9 +-
ui/ncurses/nc-widgets.h | 1 +
43 files changed, 2256 insertions(+), 70 deletions(-)
create mode 100644 lib/device-tree/device-tree.c
create mode 100644 lib/device-tree/device-tree.h
create mode 100644 lib/version/version.c
create mode 100644 lib/version/version.h
create mode 100644 test/lib/test-version-parsing.c
create mode 100644 ui/ncurses/nc-firmware-help.c
create mode 100644 ui/ncurses/nc-firmware.c
create mode 100644 ui/ncurses/nc-firmware.h
--
2.14.0
More information about the Petitboot
mailing list