diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-12-15 10:02:31 +1100 |
---|---|---|
committer | Sam Mendoza-Jonas <sam@mendozajonas.com> | 2016-02-09 13:40:15 +1100 |
commit | aaeba8e515e6b3416718b7feac985f01fb948b8f (patch) | |
tree | 414a6a796682d2d2c9128e49f8c32e9b2a025617 /lib/flash/config.h | |
parent | 9239994cdedfc5dd70e3c5d27ea92754674aaa1f (diff) | |
download | talos-petitboot-aaeba8e515e6b3416718b7feac985f01fb948b8f.tar.gz talos-petitboot-aaeba8e515e6b3416718b7feac985f01fb948b8f.zip |
lib/flash: Add support for platform versions
Add basic libflash support to read the VERSION partition on BMC
machines. This adds a dependency on the libflash shared library from
Skiboot.
The MTD partition is accessed through the libflash helper functions.
Once read into a buffer, the VERSION partition is a simple list of
newline-terminated version strings. Some BMC platforms may have two
'sides' to flash - these are interpreted as the "current" and "other"
sides depending on which one the current Petitboot is running from.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib/flash/config.h')
-rw-r--r-- | lib/flash/config.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/flash/config.h b/lib/flash/config.h new file mode 100644 index 0000000..a132a01 --- /dev/null +++ b/lib/flash/config.h @@ -0,0 +1,19 @@ +/* For CCAN */ + +#include <endian.h> +#include <byteswap.h> + +#define HAVE_TYPEOF 1 +#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1 + + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define HAVE_BIG_ENDIAN 0 +#define HAVE_LITTLE_ENDIAN 1 +#else +#define HAVE_BIG_ENDIAN 1 +#define HAVE_LITTLE_ENDIAN 0 +#endif + +#define HAVE_BYTESWAP_H 1 +#define HAVE_BSWAP_64 1 |