Commit Graph

38 Commits

Author SHA1 Message Date
Lucjan Bryndza
37aee3901c [EGD-5165] Fix emulator crash on lfs and fat
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>
2021-02-17 17:05:31 +01:00
Lucjan Bryndza
37c5c2fcc8 [EGD-5153] Fix errors in generate image script
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>
2021-02-17 17:02:15 +01:00
Lucjan Bryndza
52ca291b30 [EGD-5097] Fix minor issues with littlefs fuse
Fix minor issues with littlefs implementation
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
Lucjan Bryndza
a7484bf9c1 [EGD-4754] Add automount default filesystems
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
2020-12-22 19:17:16 +01:00
Lucjan Bryndza
f56609aa3b [EGD-4502] Fix and remove old vfs boot
Remove old vfs bootconfig from the vfs which
will be removed in the later commit
2020-12-22 09:26:30 +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
Lucjan Bryndza
8be15b96e4 [EGD-4498] Virtual Filesystem Core Framework (#1074)
* [EGD-4498] Registering and unregistering VFS

* [EGD-4498] Mount structures added

* [EGD-4498] Mount filesystem completed

* [EGD-4498] Mount / unmount / and find mount impl

* [EGD-4498] Per thread directory TLS

* [EGD-4489] Absolute paths implementation

* [EGD-4498] Git ignore vim

* [EGD-4498] VFS core functions without cwd

* [EGD-4498] Other syscalls

* [EGD-4498] Code review fixes

* [EGD-4498] Code review #2

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

* [EGD-4498] Code review small fixes vol #3

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-12-02 09:47:17 +01:00
Lucjan Bryndza
43b9c45724 [EGD-4512] Prevent vfs crash before init (#1091)
Currently calling any method from class vfs
causes aplication crash when methods are called before
vfs.Init() call. This commit prevent to crash end return failure
instead. The fix is related to any any vfs methods and methods called
through the standard syscall.
It is only the hotfix and it will be removed when new VFS subsystem
will be ready.

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-11-26 13:29:36 +01:00
Lucjan Bryndza
9cbebacd78 [EGD-4262] Disk manager (#1025)
* [EGD-4262] Disk manager API draft

* [EGD-4262] New filesystem master user class

* [EGD-4262] Directory fops

* [EGD-4262] Initial version of disk manager API

* [EGD-4261] Registering and finding block devices.

* [EGD-4262] Disk manager without partition parser

* [EGD-4262] Partition parser intial ver.

* [EGD-4262] Disk read driver for Linux

* [EGD-4262] Disk manager unittests.

This unittests should be improved. Currrently it checks
only minimum functionality. Boundary tests should be added
in the next stage.

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-11-24 12:02:39 +01:00
Roman Kubiak
5ce2f3d329 Revert "[EGD-4344] vfs-utils refactor (#1010)" (#1027)
This reverts commit e6ca468d2c.
2020-11-17 12:27:25 +01:00
Roman Kubiak
e6ca468d2c [EGD-4344] vfs-utils refactor (#1010)
* [EGD-4344] removed vfs-utils.cpp and moved all the functions
to utils or eventStore

* [EGD-4344] removed vfs-utils.cpp and moved all the functions
to utils or eventStore

* [EGD-4344] moved methods to utils::filesystem

* Update module-utils/Utils.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* Update module-utils/Utils.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* Update module-utils/Utils.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4344] test fixes, linux fixes, GUI fixes

* [EGD-4344] rebase fixes

* [EGD-4344] bugfixes for rt1051 and mutex support in EventStore

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
2020-11-16 15:36:52 +01:00
Lucjan Bryndza
707b31ac3e [EGD-4264] directory reordering (#1001)
* [EGD-4264] VFS directory reordering

Currently VFS uses flat directory structure
for disc manager I need more sofisticated directory layout

* [EGD-4264] Remove redundant -Wno

* [EGD-4261] New purefs API

* [EGD-4264] Unittest fixes

* [EGD-4264] Directory relativity

* [EGD-4264] Relative path fixes

* [EGD-4264] Fix RT1051 compile errors

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-11-16 12:11:24 +01:00
Piotr Tanski
57c7672f8f [EGD-4366] Global data cleanup. (#999) 2020-11-13 10:16:40 +01:00
Lucjan Bryndza
4736ebddf3 [EGD-4029] File indexer notifier (#862)
* [EGD-4029] Initial version of file notifier in the VFS

* [EGD-4029] File indexer notifier in the VFS

* [EGD-4029] Minor syntax fixes in code

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-10-23 13:07:47 +02:00
Lucjan Bryndza
bf2609524c [EGD-4075] Use FATFS in the Linux builds (#843)
* [EGD-4075] Use FAT fs in the emulator

Add script for genrate base phone image

* [EGD-4075] Use FreeRTOS-FAT in emulator initial commit

* [EGD-4075] Thread local storage fix

Fixing thread local storage when running on the
Linux platform in the test mode

* [EGD-4075] Improve image generation

Improve image generation script on the linux platform

* [EGD-4075] Fix all test with FAT fs image

Fix all tests with fatfs image

* [EGD-4075] Fix calculator utility test

* [EGD-4075] Image dependencies fix

* Remove uneeded comments

* Missing headers in CR

* [EGD-4075] Fixed whitespaces

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-10-22 10:34:12 +02:00
Przemyslaw Brudny
e131dae68f [EGD-3743] Removed old doxygen copyright statements from project. 2020-10-20 12:55:10 +02:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
alek
9821cd77c6 [EGD-3558] remove memalloc 2020-09-04 11:45:50 +02:00
Roman Kubiak
ebaca0f180 linux fix for tests 2020-08-10 13:26:09 +02:00
Roman Kubiak
d4967ec7e1 linux fixes 2020-08-10 13:26:09 +02:00
rkubiak01
9cc941d8d2 [EGD-2857] vfs fixes (#439)
* changed microtar and sbini to c++

* VFS: fixes for absolute paths, fprintf wrappers

* Create sys/user during database tests

* review: removed parenthesis around return values in VFS

* changelog updated

* module update

* module updates
2020-06-18 12:27:53 +02:00
Roman Kubiak
7702d6d0cb VFS: added a bypassRoot flag for listdir, needed for
listing updates dir
2020-06-03 16:55:44 +02:00
Roman Kubiak
3558d64412 removed extern errno 2020-06-02 11:28:53 +02:00
Roman Kubiak
9dab138b05 UT for randomId generator and CRC32 computation 2020-06-02 11:28:53 +02:00
Roman Kubiak
dee5db5f01 null pointer checks 2020-06-02 11:28:53 +02:00
Roman Kubiak
4d8b78699a added openAbsolute and refactored fopen to be "POSIX" 2020-06-02 11:28:53 +02:00
Roman Kubiak
63c3ef24ab VFS class changes 2020-06-02 11:28:53 +02:00
rkubiak01
62802e4077 Linux fix (remove sys/ as prefix) 2020-05-11 11:58:36 +02:00
rkubiak01
7cac882c7a [2306] VFS: support .boot.ini and "current" and "previous" os types (#315)
* VFS: support .boot.ini and "current" and "previous" os types

* fixes for first batch of comments
- moved crc32 functions to a seperate file
- changed naming of constant with _
- removed one magic number
- crc methods now cross platform

* using smart pointer for buffer management

* created a simple USER_FILE macro for database names

* removed commented-out code

* style fixes

* Updated crc32 version

* Update module-vfs/vfs-utils.cpp

Co-Authored-By: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>

* Update module-vfs/vfs-utils.cpp

Co-Authored-By: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>

* renamed USER_FILE to USER_PATH macro, this was also
bromen and was returning incorrect paths, std::filesystem::path
behavior is causing these issues.

* VFS: remove method changed

* fixed path for assets copy

* UNITTEST: vfs test fixed

* VFS: changed computeCRC32 return type to void

* Max supported partition to 2 (was 1)

* EOL in vfs.cpp

* nullptr check in computeCRC32
include for log.hpp fixed

* flash_eMMC merged properly

* CRC32 commit update

* testBuild

* fix newline at start of smsdb.cpp
removed test from cmake

* no user/ folder on the root of emmc causes sqlite3 to fault
this adds a create empty user call for rt1051

* flash script fixes
- do not use build-*/sys
- common.sh contains a static list of iles that land on the flash

Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
2020-05-08 10:27:17 +02:00
pholat
91e05fcf65 fix gtk & FileAttributes 2020-03-25 15:28:52 +01:00
Radoslaw Wicik
a8573a404c Apply new style 2020-03-17 10:03:16 +01:00
rkubiak01
e5e0048740 VFS: fixed getFilesystemStats missing for linux (it returns empty info) 2020-03-03 05:50:36 -07:00
Robert Borzecki
b0bb0d8f6c Added locking and unlocking of the desktop screen. 2019-06-27 10:00:14 +02:00
Robert Borzecki
35d15b2bc7 Added key handling logic to applications. 2019-06-26 12:34:06 +02:00
Robert Borzecki
b4b949d925 Added viewer application for kickstarter. 2019-06-10 18:03:18 +02:00
Mateusz
206021476a WiP: sqlite3vfs 2019-05-23 10:18:33 +02:00
Robert Borzecki
d3235d54d7 Removed submodule 2019-05-21 23:35:00 +02:00