Storing LFS erase size in the boot byte is not possible
because Linux kernel is unable to detect the partitions
after change boot bytes to values other than 0x80 or 0x00
In this patch LFS_BLOCK_SIZE is moved to the second
MBR bootcode AREA
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.
VFAT partition should be mounted in RO mode by default
because writing to FAT filesystem is unsafe.
Writing is allowed only in the LFS filesystem.
If upgrade is needed FAT partition can be temporary
switched to RW mode using mount() syscall with REMOUNT flag
but it should be switched to RO mode again after upgrade.
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.
Disk access was not protected by the mutex and race contition
occurs when multiple access was made for lfs and fat.
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
Script for generate partitions for emulator by mistake
overwrites the littlefs image and fatfs image due to the
overlap fat parition and littlefs partition
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
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>
Due to vfs deprecation there is need to
remove all vfs calls from code.
This PR covers module bluetooth.
[EGD-5070] Review changes.
[EGD-5070] Change new filesystem in module bt
Due to vfs deprecation there is need to
remove all vfs calls from code.
This PR covers module bluetooth
Default automount and parse partitions according to
their configurations using new vfs core. Currently
old (without lfs) and new (with lfs) part schemes are supported
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.