A C library for handling Firmware Update (FWU) metadata, inspired by the U-Boot (fwumdata tool) and libubootenv implementations.
This library provides an interface to parse, validate (CRC32), and manipulate FWU metadata.
It was originally developed as a use case to allow tools such as SWUpdate, and in general any application, to modify the boot bank selection.
For this reason, the metadata manipulation APIs are currently minimal.
They are designed to be exercised through the yafwumdata tool, which
loosely mimics the behavior of the U-Boot fwumdata tool, with reduced
functionality, intended to exercise the API through a command-line
interface for a minimal set of operations, namely updating the active
index, the previous active index, and the bank state.
Example: boot from bank B after a software update of the same bank.
yafwumdata -a 1 -p 0 -s 1 validThis sets:
- the active index to bank B (
-a 1) - the previous active index to bank A (
-p 0) - the bank state to
valid(-s 1 valid)
This library is licensed under LGPL-2.1-or-later. Full license texts
are available in the LICENSES/ directory.
- CMake >= 3.12
- ZLIB development files (for CRC32 calculation)
- A C99 compliant compiler (GCC/Clang)
tar xf libfwumdata-<version>.tar.gz
cd libfwumdata-<version>
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make installThe library includes a unit testing framework to ensure the integrity of metadata operations. Tests are disabled by default and must be explicitly enabled during the configuration process.
tar xf libfwumdata-<version>.tar.gz
cd libfwumdata-<version>
mkdir build && cd build
cmake -DLIBFWUMDATA_BUILD_TESTS=ON ..
make
make test # or ctestDario Binacchi dario.binacchi@amarulasolutions.com