fs: Add semihosting filesystem

This adds a filesystem which is backed by the host's filesystem. It is
modeled off of sandboxfs, which has very similar aims. Semihosting
doesn't support listing directories (except with SYS_SYSTEM), so neither
do we. it's possible to optimize a bit for the common case of reading a
whole file by omitting a call to smh_seek, but this is left as a future
optimization.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
This commit is contained in:
Sean Anderson 2022-03-22 16:59:20 -04:00 committed by Tom Rini
parent 8e1c9fe243
commit f676b45151
6 changed files with 160 additions and 2 deletions

View file

@ -18,6 +18,7 @@ struct cmd_tbl;
#define FS_TYPE_BTRFS 5
#define FS_TYPE_SQUASHFS 6
#define FS_TYPE_EROFS 7
#define FS_TYPE_SEMIHOSTING 8
struct blk_desc;