[Skiboot] [PATCH 00/15] libffs and ffspart rework
Cyril Bur
cyril.bur at au1.ibm.com
Thu Mar 15 16:58:12 AEDT 2018
Hi,
Currently the libffs api to generate TOCs is a bit
experimental/developmental and it needs work. The original version
abstracted too much which meant needless complexity within the
library.
I've ripped quite a lot of the complexity out of the libffs in favour
of some added (but overall less) complexity in ffspart.
Unfortunately this does change libffs just a tad, hopefully none of
the functions have been used by anyone outside of skiboot, and the
input file to ffspart had to change a bit too, but I haven't heard of
anyone actually using it.
This is version two of that attempt. Fundamentally they're the same
but differences have accumulated so lets pretend this is a brand new
unrelated attempt. I've been using it to generate pnor files within
op-build. If you want to see that:
https://github.com/cyrilbur-ibm/op-build/tree/ffspart it is happening
here.
I'd like to get everything upstream, so we'll start with ffspart
Feedback very much welcome,
Thanks
Cyril Bur (15):
external/ffspart: Allow # comments in input file
libffs: Standardise ffs partition flags
external/pflash: Use ffs_entry_user_to_string() to standardise flag
strings
libflash/libffs: Add setter for a partitions actual size
libflash/libffs: ffs_close() should use ffs_hdr_free()
external/ffspart: Remove side, order and backup options
libflash/libffs: Always add entries to the end of the TOC
libflash/libffs: Remove the 'sides' from the FFS TOC generation code
libflash/libffs: Remove backup partition from TOC generation code
libflash/libffs: Switch to storing header entries in an array
libflash/libffs: Refcount ffs entries
libflash/libffs: Allow caller to specifiy header partition
external/ffspart: Use new interface
libffs: Fix bad checks for partition overlap
external/ffspart: Improve error output
external/ffspart/ffspart.c | 612 +++++++++++----------
external/ffspart/test/files/03-tiny-pnor.in | 8 +-
.../ffspart/test/files/03.1-tiny-pnor-backup.in | 4 -
.../ffspart/test/files/03.1-tiny-pnor-backup.out | Bin 3840 -> 0 bytes
external/ffspart/test/files/04-tiny-pnor2.in | 8 +-
external/ffspart/test/files/05-hdr-overlap.in | 8 +-
.../ffspart/test/files/05.1-hdr-overlap-backup.in | 3 -
external/ffspart/test/files/06-small-flash.in | 10 +-
external/ffspart/test/files/07-big-files.in | 8 +-
external/ffspart/test/files/08-small-files.in | 8 +-
external/ffspart/test/files/10-bad-input.in | 8 +-
external/ffspart/test/files/11-long-name.in | 8 +-
external/ffspart/test/files/12-bad-numbers-base.in | 8 +-
external/ffspart/test/files/13-bad-numbers-size.in | 8 +-
external/ffspart/test/files/14-bad-input-flags.in | 8 +-
.../test/files/15-overlapping-partitions.in | 8 +-
external/ffspart/test/results/00-usage.out | 5 -
external/ffspart/test/results/01-param-sanity.err | 1 -
external/ffspart/test/results/01-param-sanity.out | 5 -
.../ffspart/test/results/01.1-param-sanity.err | 0
.../{02-param-sides.out => 01.1-param-sanity.out} | 5 -
external/ffspart/test/results/02-param-sides.err | 1 -
external/ffspart/test/results/05-hdr-overlap.err | 5 +-
external/ffspart/test/results/05-hdr-overlap.out | 4 -
.../test/results/05.1-hdr-overlap-backup.err | 2 -
.../test/results/05.1-hdr-overlap-backup.out | 4 -
external/ffspart/test/results/06-small-flash.err | 5 +-
external/ffspart/test/results/06-small-flash.out | 3 -
external/ffspart/test/results/07-big-files.err | 5 +-
external/ffspart/test/results/07-big-files.out | 2 -
external/ffspart/test/results/08-small-files.err | 2 +
external/ffspart/test/results/08-small-files.out | 5 -
external/ffspart/test/results/10-bad-input.err | 5 +-
external/ffspart/test/results/10-bad-input.out | 1 -
external/ffspart/test/results/11-long-name.err | 6 +-
external/ffspart/test/results/11-long-name.out | 5 -
.../ffspart/test/results/12-bad-numbers-base.err | 5 +-
.../ffspart/test/results/12-bad-numbers-base.out | 1 -
.../ffspart/test/results/13-bad-numbers-size.err | 5 +-
.../ffspart/test/results/13-bad-numbers-size.out | 1 -
.../ffspart/test/results/14-bad-input-flags.err | 5 +-
.../ffspart/test/results/14-bad-input-flags.out | 1 -
.../test/results/15-overlapping-partitions.err | 5 +-
.../test/results/15-overlapping-partitions.out | 3 -
external/ffspart/test/tests/01-param-sanity | 2 +-
.../tests/{02-param-sides => 01.1-param-sanity} | 2 +-
external/ffspart/test/tests/03.1-tiny-pnor-backup | 15 -
external/ffspart/test/tests/05-hdr-overlap | 7 +-
.../ffspart/test/tests/05.1-hdr-overlap-backup | 15 -
external/ffspart/test/tests/06-small-flash | 5 +-
external/ffspart/test/tests/07-big-files | 4 +
external/ffspart/test/tests/10-bad-input | 2 +
external/ffspart/test/tests/12-bad-numbers-base | 2 +
external/ffspart/test/tests/13-bad-numbers-size | 2 +
external/ffspart/test/tests/14-bad-input-flags | 2 +
.../ffspart/test/tests/15-overlapping-partitions | 4 +-
external/pflash/pflash.c | 18 +-
external/pflash/test/files/01-info.ffs | 12 +-
external/pflash/test/files/02-erase.ffs | 8 +-
external/pflash/test/files/03-erase-parts.ffs | 8 +-
external/pflash/test/files/04-program-rand.ffs | 8 +-
external/pflash/test/files/05-bad-numbers.ffs | 8 +-
external/pflash/test/files/06-miscprint.ffs | 12 +-
external/pflash/test/results/01-info.out | 14 +-
external/pflash/test/results/06-miscprint.out | 2 +-
libflash/ffs.h | 16 +-
libflash/libffs.c | 491 +++++++++--------
libflash/libffs.h | 18 +-
68 files changed, 768 insertions(+), 723 deletions(-)
delete mode 100644 external/ffspart/test/files/03.1-tiny-pnor-backup.in
delete mode 100644 external/ffspart/test/files/03.1-tiny-pnor-backup.out
delete mode 100644 external/ffspart/test/files/05.1-hdr-overlap-backup.in
create mode 100644 external/ffspart/test/results/01.1-param-sanity.err
rename external/ffspart/test/results/{02-param-sides.out => 01.1-param-sanity.out} (67%)
delete mode 100644 external/ffspart/test/results/02-param-sides.err
delete mode 100644 external/ffspart/test/results/05.1-hdr-overlap-backup.err
delete mode 100644 external/ffspart/test/results/05.1-hdr-overlap-backup.out
rename external/ffspart/test/tests/{02-param-sides => 01.1-param-sanity} (63%)
delete mode 100644 external/ffspart/test/tests/03.1-tiny-pnor-backup
delete mode 100644 external/ffspart/test/tests/05.1-hdr-overlap-backup
--
2.16.2
More information about the Skiboot
mailing list