[Skiboot] [PATCH 0/5] FFS Partitioner

Cyril Bur cyril.bur at au1.ibm.com
Fri Mar 17 16:13:04 AEDT 2017


Hello all,

I've posted this series in a variety of forms as RFCs

RFC v1: http://patchwork.ozlabs.org/patch/613460/
RFC v2: http://patchwork.ozlabs.org/patch/700238/

There are two important parts to this series:
1. libflash/libffs now know how to generate TOCs not just read them
2. external/ffspart which is a simple C program to use the new
libflash functionality

It is by no means perfect. There could absolutely more tests but isn't
that always true.

There haven't been many functionality changes from the RFC - mostly
API cleanups and restructuring so as to actually have some kind of an
ffs abstraction. The major difference is the test cases which did
catch bugs, so hopefully this series is significantly more bug free
than the RFCs.

Thanks,

Cyril


Cyril Bur (5):
  libflash/libffs: Rework libffs
  libffs: Understand how to create FFS partition TOCs and entries.
  external/ffspart: Simple C program to be able to make an FFS partition
  external/tests: Add a data directory for tests
  external/ffspart: Add tests

 external/ffspart/Makefile                          |  43 ++
 external/ffspart/config.h                          |  19 +
 external/ffspart/ffspart.c                         | 438 +++++++++++++
 external/ffspart/rules.mk                          |  33 +
 external/ffspart/test/Makefile.check               |  20 +
 external/ffspart/test/files/03-tiny-pnor.in        |   4 +
 external/ffspart/test/files/03-tiny-pnor.out       | Bin 0 -> 2560 bytes
 .../ffspart/test/files/03.1-tiny-pnor-backup.in    |   4 +
 .../ffspart/test/files/03.1-tiny-pnor-backup.out   | Bin 0 -> 2864 bytes
 external/ffspart/test/files/04-tiny-pnor2.in       |   4 +
 external/ffspart/test/files/04-tiny-pnor2.out      | Bin 0 -> 2560 bytes
 external/ffspart/test/files/05-hdr-overlap.in      |   4 +
 .../ffspart/test/files/05.1-hdr-overlap-backup.in  |   3 +
 external/ffspart/test/files/06-small-flash.in      |   5 +
 external/ffspart/test/files/07-big-files.in        |   4 +
 external/ffspart/test/files/08-small-files.in      |   4 +
 external/ffspart/test/files/10-bad-input.in        |   4 +
 external/ffspart/test/files/11-long-name.in        |   4 +
 external/ffspart/test/files/12-bad-numbers-base.in |   4 +
 external/ffspart/test/files/13-bad-numbers-size.in |   4 +
 external/ffspart/test/files/14-bad-input-flags.in  |   4 +
 .../test/files/15-overlapping-partitions.in        |   4 +
 external/ffspart/test/make-check-test              |   1 +
 external/ffspart/test/results/00-usage.err         |   0
 external/ffspart/test/results/00-usage.out         |  21 +
 external/ffspart/test/results/01-param-sanity.err  |   1 +
 external/ffspart/test/results/01-param-sanity.out  |  21 +
 external/ffspart/test/results/02-param-sides.err   |   1 +
 external/ffspart/test/results/02-param-sides.out   |  21 +
 external/ffspart/test/results/05-hdr-overlap.err   |   2 +
 external/ffspart/test/results/05-hdr-overlap.out   |   5 +
 .../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   |   1 +
 external/ffspart/test/results/06-small-flash.out   |   3 +
 external/ffspart/test/results/07-big-files.err     |   1 +
 external/ffspart/test/results/07-big-files.out     |   2 +
 external/ffspart/test/results/08-small-files.err   |   0
 external/ffspart/test/results/08-small-files.out   |   5 +
 external/ffspart/test/results/10-bad-input.err     |   1 +
 external/ffspart/test/results/10-bad-input.out     |   1 +
 external/ffspart/test/results/11-long-name.err     |   2 +
 external/ffspart/test/results/11-long-name.out     |   5 +
 .../ffspart/test/results/12-bad-numbers-base.err   |   1 +
 .../ffspart/test/results/12-bad-numbers-base.out   |   1 +
 .../ffspart/test/results/13-bad-numbers-size.err   |   1 +
 .../ffspart/test/results/13-bad-numbers-size.out   |   1 +
 .../ffspart/test/results/14-bad-input-flags.err    |   1 +
 .../ffspart/test/results/14-bad-input-flags.out    |   1 +
 .../test/results/15-overlapping-partitions.err     |   1 +
 .../test/results/15-overlapping-partitions.out     |   3 +
 external/ffspart/test/test-ffspart                 |   5 +
 external/ffspart/test/tests/00-usage               |  12 +
 external/ffspart/test/tests/01-param-sanity        |  12 +
 external/ffspart/test/tests/02-param-sides         |  12 +
 external/ffspart/test/tests/03-tiny-pnor           |  15 +
 external/ffspart/test/tests/03.1-tiny-pnor-backup  |  15 +
 external/ffspart/test/tests/04-tiny-pnor2          |  25 +
 external/ffspart/test/tests/05-hdr-overlap         |  15 +
 .../ffspart/test/tests/05.1-hdr-overlap-backup     |  15 +
 external/ffspart/test/tests/06-small-flash         |  12 +
 external/ffspart/test/tests/07-big-files           |  22 +
 external/ffspart/test/tests/08-small-files         |  22 +
 external/ffspart/test/tests/10-bad-input           |  11 +
 external/ffspart/test/tests/11-long-name           |  11 +
 external/ffspart/test/tests/12-bad-numbers-base    |  11 +
 external/ffspart/test/tests/13-bad-numbers-size    |  11 +
 external/ffspart/test/tests/14-bad-input-flags     |  11 +
 .../ffspart/test/tests/15-overlapping-partitions   |  11 +
 external/test/test.sh                              |  11 +-
 libflash/ffs.h                                     | 163 +++--
 libflash/libffs.c                                  | 693 ++++++++++++++++-----
 libflash/libffs.h                                  |  75 ++-
 73 files changed, 1713 insertions(+), 196 deletions(-)
 create mode 100644 external/ffspart/Makefile
 create mode 100644 external/ffspart/config.h
 create mode 100644 external/ffspart/ffspart.c
 create mode 100644 external/ffspart/rules.mk
 create mode 100644 external/ffspart/test/Makefile.check
 create mode 100644 external/ffspart/test/files/03-tiny-pnor.in
 create mode 100644 external/ffspart/test/files/03-tiny-pnor.out
 create mode 100644 external/ffspart/test/files/03.1-tiny-pnor-backup.in
 create mode 100644 external/ffspart/test/files/03.1-tiny-pnor-backup.out
 create mode 100644 external/ffspart/test/files/04-tiny-pnor2.in
 create mode 100644 external/ffspart/test/files/04-tiny-pnor2.out
 create mode 100644 external/ffspart/test/files/05-hdr-overlap.in
 create mode 100644 external/ffspart/test/files/05.1-hdr-overlap-backup.in
 create mode 100644 external/ffspart/test/files/06-small-flash.in
 create mode 100644 external/ffspart/test/files/07-big-files.in
 create mode 100644 external/ffspart/test/files/08-small-files.in
 create mode 100644 external/ffspart/test/files/10-bad-input.in
 create mode 100644 external/ffspart/test/files/11-long-name.in
 create mode 100644 external/ffspart/test/files/12-bad-numbers-base.in
 create mode 100644 external/ffspart/test/files/13-bad-numbers-size.in
 create mode 100644 external/ffspart/test/files/14-bad-input-flags.in
 create mode 100644 external/ffspart/test/files/15-overlapping-partitions.in
 create mode 100755 external/ffspart/test/make-check-test
 create mode 100644 external/ffspart/test/results/00-usage.err
 create mode 100644 external/ffspart/test/results/00-usage.out
 create mode 100644 external/ffspart/test/results/01-param-sanity.err
 create mode 100644 external/ffspart/test/results/01-param-sanity.out
 create mode 100644 external/ffspart/test/results/02-param-sides.err
 create mode 100644 external/ffspart/test/results/02-param-sides.out
 create mode 100644 external/ffspart/test/results/05-hdr-overlap.err
 create mode 100644 external/ffspart/test/results/05-hdr-overlap.out
 create mode 100644 external/ffspart/test/results/05.1-hdr-overlap-backup.err
 create mode 100644 external/ffspart/test/results/05.1-hdr-overlap-backup.out
 create mode 100644 external/ffspart/test/results/06-small-flash.err
 create mode 100644 external/ffspart/test/results/06-small-flash.out
 create mode 100644 external/ffspart/test/results/07-big-files.err
 create mode 100644 external/ffspart/test/results/07-big-files.out
 create mode 100644 external/ffspart/test/results/08-small-files.err
 create mode 100644 external/ffspart/test/results/08-small-files.out
 create mode 100644 external/ffspart/test/results/10-bad-input.err
 create mode 100644 external/ffspart/test/results/10-bad-input.out
 create mode 100644 external/ffspart/test/results/11-long-name.err
 create mode 100644 external/ffspart/test/results/11-long-name.out
 create mode 100644 external/ffspart/test/results/12-bad-numbers-base.err
 create mode 100644 external/ffspart/test/results/12-bad-numbers-base.out
 create mode 100644 external/ffspart/test/results/13-bad-numbers-size.err
 create mode 100644 external/ffspart/test/results/13-bad-numbers-size.out
 create mode 100644 external/ffspart/test/results/14-bad-input-flags.err
 create mode 100644 external/ffspart/test/results/14-bad-input-flags.out
 create mode 100644 external/ffspart/test/results/15-overlapping-partitions.err
 create mode 100644 external/ffspart/test/results/15-overlapping-partitions.out
 create mode 100755 external/ffspart/test/test-ffspart
 create mode 100644 external/ffspart/test/tests/00-usage
 create mode 100644 external/ffspart/test/tests/01-param-sanity
 create mode 100644 external/ffspart/test/tests/02-param-sides
 create mode 100644 external/ffspart/test/tests/03-tiny-pnor
 create mode 100644 external/ffspart/test/tests/03.1-tiny-pnor-backup
 create mode 100644 external/ffspart/test/tests/04-tiny-pnor2
 create mode 100644 external/ffspart/test/tests/05-hdr-overlap
 create mode 100644 external/ffspart/test/tests/05.1-hdr-overlap-backup
 create mode 100644 external/ffspart/test/tests/06-small-flash
 create mode 100644 external/ffspart/test/tests/07-big-files
 create mode 100644 external/ffspart/test/tests/08-small-files
 create mode 100644 external/ffspart/test/tests/10-bad-input
 create mode 100644 external/ffspart/test/tests/11-long-name
 create mode 100644 external/ffspart/test/tests/12-bad-numbers-base
 create mode 100644 external/ffspart/test/tests/13-bad-numbers-size
 create mode 100644 external/ffspart/test/tests/14-bad-input-flags
 create mode 100644 external/ffspart/test/tests/15-overlapping-partitions

-- 
2.12.0



More information about the Skiboot mailing list