public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2 00/10] Replace the FAT filesystem code
@ 2015-08-11 14:55 Stephen Warren
  2015-08-11 14:55 ` [U-Boot] [PATCH V2 01/10] disk: support host devices in dev_print() Stephen Warren
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Stephen Warren @ 2015-08-11 14:55 UTC (permalink / raw)
  To: u-boot

The existing FAT filesystem implementation in U-Boot has some bugs that
are tricky to fix cleanly without significant rework of the code. For
example, see:

http://lists.denx.de/pipermail/u-boot/2015-July/221054.html
[PATCH] fat: handle paths that include ../

This series replaces U-Boot's FAT filesystem implementation with the "ff"
project; http://elm-chan.org/fsw/ff/00index_e.html. This project appears
to be actively maintained, does not have at least the bug referenced in
the patch link above, and is quite easy to integrate into U-Boot. An
earlier version is also used in Barebox, so presumably it's had some
level of testing/exposure there.

Note that this series is based on u-boot/master without the patch linked
above applied. I wonder if it's a little risky to apply this series after
-rc1; perhaps the patch above should be applied to v2015.10, and this
series immediately after the release?

v2:
* buildman passes for everything it can build:
  * Implemented FAT functions used only by SPL code.
  * Fixed a warning in ff.c.
* Fixed types in integer.h so that >64KiB files are loaded correctly.
* ./test/fs/fs-test.sh passes.
* Tested on a Raspberry Pi as well as sandbox.
* Use a define for a hard-coded array size in ff-uboot.c.

Binary size changes due to this series:
* Text size increases around 1-6KiB depending on target.
* Data size sometimes goes up, sometimes down, depending on target.
* Nearly 200KiB of BSS is saved.

Stephen Warren (10):
  disk: support host devices in dev_print()
  fat: move to a different directory
  fat: add ff.c implementation
  fat: apply upstream bugfix to ff.c
  fat: ff: add ifdef to avoid unused function warning
  fat: ffconf.h changes for U-Boot port
  fat: port integer.h to U-Boot types
  fat: add U-Boot to ff.c API conversion wrapper
  fat: switch to new FAT implementation
  fat: remove old implementation

 disk/part.c        |    3 +
 fs/fat/Makefile    |    8 +-
 fs/fat/diskio.h    |   80 +
 fs/fat/fat.c       | 1323 ---------------
 fs/fat/fat_write.c | 1115 -------------
 fs/fat/ff-uboot.c  |  403 +++++
 fs/fat/ff.c        | 4634 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/fat/ff.h        |  350 ++++
 fs/fat/ffconf.h    |  277 ++++
 fs/fat/file.c      |  183 ---
 fs/fat/integer.h   |   35 +
 11 files changed, 5784 insertions(+), 2627 deletions(-)
 create mode 100644 fs/fat/diskio.h
 delete mode 100644 fs/fat/fat.c
 delete mode 100644 fs/fat/fat_write.c
 create mode 100644 fs/fat/ff-uboot.c
 create mode 100644 fs/fat/ff.c
 create mode 100644 fs/fat/ff.h
 create mode 100644 fs/fat/ffconf.h
 delete mode 100644 fs/fat/file.c
 create mode 100644 fs/fat/integer.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-08-19  4:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 14:55 [U-Boot] [PATCH V2 00/10] Replace the FAT filesystem code Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 01/10] disk: support host devices in dev_print() Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 02/10] fat: move to a different directory Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 03/10] fat: add ff.c implementation Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 04/10] fat: apply upstream bugfix to ff.c Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 05/10] fat: ff: add ifdef to avoid unused function warning Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 06/10] fat: ffconf.h changes for U-Boot port Stephen Warren
2015-08-14 18:47   ` Tom Rini
2015-08-15  3:40     ` Stephen Warren
2015-08-15 13:07       ` Tom Rini
2015-08-19  4:01         ` Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 07/10] fat: port integer.h to U-Boot types Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 08/10] fat: add U-Boot to ff.c API conversion wrapper Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 09/10] fat: switch to new FAT implementation Stephen Warren
2015-08-11 14:55 ` [U-Boot] [PATCH V2 10/10] fat: remove old implementation Stephen Warren
2015-08-13  2:56 ` [U-Boot] [PATCH V2 00/10] Replace the FAT filesystem code Simon Glass
2015-08-15  3:36   ` Stephen Warren
2015-08-14 19:29 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox