[Skiboot] [RFC PATCH 00/13] Rework flash TOC generation
Cyril Bur
cyril.bur at au1.ibm.com
Tue Aug 29 16:24:53 AEST 2017
Hi,
Currently the ability within libffs to prove an api to generate TOCs
is a bit experimental/developmental and it needs work. The original
version tried to abstract too much which mean 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.
Feedback very much welcome,
Thanks
Cyril Bur (13):
external/ffspart: Allow # comments in input file
libflash/libffs: Add helpers for the treatment of 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
external/ffspart/ffspart.c | 604 +++++++++++----------
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 | 16 +-
external/pflash/test/files/01-info.ffs | 8 +-
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 | 8 +-
external/pflash/test/results/01-info.out | 10 +-
external/pflash/test/results/06-miscprint.out | 2 +-
libflash/ffs.h | 16 +-
libflash/libffs.c | 455 ++++++++--------
libflash/libffs.h | 18 +-
68 files changed, 731 insertions(+), 702 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.14.1
More information about the Skiboot
mailing list