[U-Boot] [PATCH 0/11] sandbox: Add filesystem support
Simon Glass
sjg at chromium.org
Wed Dec 26 20:53:27 CET 2012
This series adds support for filesystems to sandbox. While we don't yet have
access to host machine block devices, we can access files on the host through
a new 'host' filesystem type and the new sandbox command 'sb'.
For example:
sb load host 0 1000 foo.bar
will load foo.bar from the host into memory at address 1000. The '0'
parameter is the device number, currently unused.
While doing this work, I noticed that fs.c had code that probably belongs
more in the filesystems themselves. So this series moves fat/ext4 code into
those files. This removes most of the #ifdefs from this file, as well as
the #defines of functions to 'unsupported'. Now there is a list of
filesystems that we support, and if we don't find the one we need, we
automatically fall back to the 'unsupported' one.
Finally, the ext4 write support is moved into a separate file since ext4fs.c
was over 3500 lines and the write support seems entirely separate from the
main function in that file.
Simon Glass (11):
ext4: Split write support into its own file
fs: Fully populate the filesystem method struct
fs: Use filesystem methods instead of switch()
fs: Tell probe functions where to put their results
fs: Use map_sysmem() on read
fs: Move ls and read methods into ext4, fat
sandbox: Add a way of obtaining directory listings
sandbox: Add host filesystem
sandbox: Add 'sb' command to access filesystem features
sandbox: Enable ext4 and fat filesystems
sandbox: config: Enable sandbox command
Makefile | 1 +
README | 1 +
arch/sandbox/cpu/os.c | 101 +++++
common/Makefile | 1 +
common/cmd_sandbox.c | 63 +++
disk/part.c | 17 +
fs/ext4/Makefile | 2 +-
fs/ext4/ext4_write.c | 996 +++++++++++++++++++++++++++++++++++++++++++++
fs/ext4/ext4fs.c | 962 +------------------------------------------
fs/fat/fat.c | 17 +
fs/fs.c | 237 +++++-------
fs/sandbox/Makefile | 47 +++
fs/sandbox/sandboxfs.c | 83 ++++
include/config_cmd_all.h | 1 +
include/configs/sandbox.h | 9 +
include/ext4fs.h | 3 +
include/fat.h | 2 +
include/fs.h | 1 +
include/os.h | 48 +++
include/sandboxfs.h | 30 ++
20 files changed, 1533 insertions(+), 1089 deletions(-)
create mode 100644 common/cmd_sandbox.c
create mode 100644 fs/ext4/ext4_write.c
create mode 100644 fs/sandbox/Makefile
create mode 100644 fs/sandbox/sandboxfs.c
create mode 100644 include/sandboxfs.h
--
1.7.7.3
More information about the U-Boot
mailing list