Commit Graph

29 Commits

Author SHA1 Message Date
Borys Jelenski
0f0192a8b4 [EGD-5072] Refactor legacy VFS functions
Functions were refactored and renamed for better readability.
Some of them were moved to different files. In stat_vfs function
the order of member initializations was corrected.
2021-02-17 17:07:41 +01:00
Lucjan Bryndza
af960b6fac [EGD-5146] Add read LFS block size from part
Add littlefs block size from partition bootable offset
2021-02-17 17:07:00 +01:00
Lucjan Bryndza
706321b268 [EGD-5350] Add increase lfs cluster size
Incrase LFS clustrer size and cache bitmap improve
the FS free blocks scan time, because LFS don't have
free block bitmap.
2021-02-17 17:06:59 +01:00
Hubert Chrzaniuk
d02a8e446e [EGD-5014] Change MMC erase logic
MMC erase group size is 512 kB which would enforce
512 kB blocks on file system. Since for our purposes this
would be inefficient erase command has been disallowed.
2021-02-17 17:06:59 +01:00
Lucjan Bryndza
adc3d34aed [EGD-5334] Fix phone crash when MTP access
Fix phone crash when accessing file when new filesystem is used
2021-02-17 17:06:59 +01:00
Lucjan Bryndza
eff6c3f026 [EGD-4498] Fix code after code review #1
Fixed some small minor issus in the RO mode in the vfs
2021-02-17 17:05:32 +01:00
Lucjan Bryndza
8545fa3bb3 [EGD-4498] Add unit test for remount RO
Add unit test for remount filesystem in ro mode
Some minor fixes
2021-02-17 17:05:32 +01:00
Lucjan Bryndza
537629013b [EGD-4498] Add support RO filesystem in the vfscore
Add support readonly filesystem mount flag
Add support for mount / remount
2021-02-17 17:05:31 +01:00
Lucjan Bryndza
9dea864c4a [EGD-5153] Fix disk manager sector_count
Currently when partition handle is passed to the disk manager
it returns total disk sector count instead of partitions sector count
2021-02-17 17:02:15 +01:00
Lucjan Bryndza
ad4fba1f58 [EGD-5135] Add new lfs part scheme in emulator
Add new littlefs filesystem user partion in the fat database
2021-02-17 17:02:15 +01:00
Lucjan Bryndza
32de9ec671 [EGD-5102] Fix compile on rt1051 platform
It is initial commmit which fix compilation after
vfs. global object removal. It still need implementation
newlib syscalls.
2021-02-17 17:02:15 +01:00
Lucjan Bryndza
da7ab8f464 [EGD-5097] Fix open flag translate
Fix open translation flags in the littlefs fuse
2021-02-17 16:06:33 +01:00
Lucjan Bryndza
3780b4844c [EGD-5074] Add native fscore for emulator
This is a first commit when the emulator uses
the new filesystem core.

libiosyscall library read environment variable

IOSYSCALS_REDIRECT_TO_IMAGE

When  IOSYSCALS_REDIRECT_TO_IMAGE=1 all syscalls
are redirected to the image. If env is not defined
or set to 0 only paths are translated and redirected
to the native linux syscalls

[EGD-5074] Remove free rtox library

Remove unneeded fat library from the freertos

[EGD-5074] Fix freertos mutex as unique

Add freertos mutex in the unique_ptr for avoid inclusion of the
freertos.h

[EGD-5074] Remove frertos-fat submodule

Remove uneeded fat freertos submodule

[EGD-5074] Add handle types in the vfs_subsystem

Add handle types in the vfs subsystem

[EGD-5074] Add submodule for hashmap

Add submodule for hashmap

[EGD-5074] Add support for dirent

Add support for dirent for new filesystem

[EGD-5074] Fix mutex class

Remove mutex in header

[EGD-5074] Remove old vfs from file indexer

File indexer should be fixed for use new vfs

[EGD-5074] Fix unit test vfs

Remove unit tests vfs for clas

[EGD-5074] Add Posix implementation with new fs

Add posix implementation with new fs core

[EGD-5074] Fix stdio syscalls

Fix all stdio syscalls

[EGD-5074] Fix iosyscalls scan family

Fix iosyscalls scan family

[EGD-5074] Fix native API

Fix native api

Work in progress some minor fixes

[EGD-5074] Fix lib stdio

Fix lib stdio

[EGD-5074] fix lseek return value in fat driver

Fix lseek return value in the fat driver

[EGD-5074]  Unit test fix

Unittest fixes

[EGD-5074] Emulator syscalls

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-01-04 16:04:33 +01:00
Jakub Pyszczak
43526432f4 [EGD-5035] Fix error translation fs
Quickfix for error translation issue in new filesystem.
2020-12-21 13:15:38 +01:00
Lucjan Bryndza
17f64cb3e4 [EGD-5022] Fix invalid open flags in vfscore
Opening file with O_CREAT mode on the mounted fat filesystem
should create file if doesn't exist. Currently it returns ENOENT
This path fix this issue. ff_fat create flags are fixed.
2020-12-18 11:22:56 +01:00
Lucjan Bryndza
62615d6cc6 [EGD-5016] Fix vfs-littlefs failed mount init
Fix issue with memory leak during mount in littlefs core
when mount fails.
2020-12-18 09:40:29 +01:00
Lucjan Bryndza
f980abd28a [EGD-4758] Add lfs object state sync
Add lfs object state sync.
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
0f3a622ad2 [EGD-4758] Fix includes in littlefs
Fix includes in the littlefs
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
afa37eef2c [EGD-4758] Add block size and fs size
Add blocks size and blocks count detecting
of the file size.
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
a6766b27db [EGD-4758] Fix littlefs directory iterator
Directory iterator now seams to be working
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
a036b75121 [EGD-4758] Fix littlefs boundary check
Currently littlefs boudary is checked in the wrong place
    this commit fix this issue
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
497621f778 [EGD-4758] Add Littlefs config
Add littlefs config
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
ef724a04eb [EGD-4758] Add littlefs core filesystem
Filesystem completed
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
2c9e9f1d0d [EGD-4758] Add littlefs in the core rt1051 build fix
Fix wrong build

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
8b2ff20722 [EGD-4758] Add Filesystem lfs fixes
This is a fix commit which fix lfs
problem with implementation
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
135594d330 [EGD-4758] Add Littlefs file operations
All littlefs file operations seams to be completed
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
793dab2f85 [EGD-4758] Add Littlefs fuse
Littlefs fuse work in progress
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
174fbaa48c [EGD-4758] Add Littlefs in the vfscore
Initial concept commit
2020-12-17 18:20:13 +01:00
Lucjan Bryndza
55ab66e55a [EGD-4499] Create drivers for the VFS (#1128)
* GId modules updated

* Remove module

* Gitmodules update

* [EGD-4499] Global module VFS

* [EGD-4499] vfat driver in progress + fsfat

* [EGD-4499] fffat glue to our implementation.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD-4498] Glue logic between ff_fat and disk mgr.

* [EGD-4499] Mount and unmount fat_fs.

* [EGD-4499] Filesystem mount seams to be working

* [EGD-4499] Missing umount volume removal

* [EGD-4499] Code review vol 1

* [EGD-4499] Missing erase element from map

* [EGD-4499] Missing mount umount

* [EGD-4261] Mount and unmount tests

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD-4499] Initial filesystem implementation

Iterate over directories are not completed yet

* [EGD-4261] unit test fix

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD-4499] Stat vfs for RT1051

* [EGD-4499] Small fix in the seek

* [EGD-4499] Directory handle fix

* [EGD4499] Completed ffat implementation

It is already completed vfat driver for vfs core
but it is not tested yet.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD4499] Code review part #1

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD4499] Remove double dynamic allocation of mount point

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD4499] Partition out of range fix

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD-4499] Handle leak fix

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD-4499] VFS vfat completed.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

* [EGD-4499] File descriptors from 3 according to POSIX std

0,1,2 fds are reserved for stdin,stdout,stderr

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-12-07 14:18:03 +01:00