Commit Graph

58 Commits

Author SHA1 Message Date
Lefucjusz
cdf5dbf557 [BH-1887] Speed up update process
* Added stream buffering for reading data
from tar archive with update.
* Increased size of the buffer used
for unpacking files from tar archive.
* Changed buffers data type from vectors
to raw heap-allocated arrays.
2024-02-28 09:58:46 +01:00
Lukasz Mastalerz
d9a1194e6f [BH-1688] Create a standard for logs
* Adding document describing how to use logger
* Adjusting logs to follow a new guide
* Change order in log header:
  line number is now before function name
2023-10-23 15:17:44 +02:00
Lefucjusz
b281a39f42 [MOS-744] Fix MTP integration
Fixed issues with integration
of MTP with filesystem:
- fixed memory corruption in
get_disk_properties();
- removed spare space hack
causing MTP to return invalid
free space and capacity of
the storage;
- added mtime and ctime
handling;
- minor code cleanup.
2022-10-27 18:47:27 +02:00
Adam Wulkiewicz
fe708cdf31 [MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes
Add --all and --fix-all options to style-check-hook
2022-08-26 15:22:39 +02:00
Mateusz Piesta
2f42cd5e73 [BH-1424] FreeRTOS update
Updated FreeRTOS source code to 10.4.6.
Moved FreeRTOS sources to the third-party directory.
Added necessary changes to the CMake configuration.
Split FreeRTOSConfig.h. From now, each board has its own.
Added missing log headers.
Minor refactor of the module-os cmake.
Fixed stack overflows in bell application main and time service.
2022-04-07 13:31:28 +02:00
Lefucjusz
dd3eeaf1e2 [MOS-240] PVS Studio analysis bugs fix
Fixes to major part of issues found
by PVS Studio static analysis
mainly micro-optimisations
2022-03-28 13:57:08 +02:00
Lucjan Bryndza
c812b5e458 [EGD-8198] Fix reporting block size on the fat patrtition
Fix statvfs() function for reporting proper block size on
the vfat parition

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2022-01-20 18:08:20 +01:00
Lucjan Bryndza
b83605d227 [EGD-7573] Add support for reliance edge fs
Added support for reliance edge file system.
The initial port is done.
The whole effort is still WIP.
Left a note in readme file what should be done next.
2021-12-14 09:44:34 +01:00
Lucjan Bryndza
1b7e8828d6 [EGD-7881] Fix stat syscalls in the VFS
Fix and unifying the stat() syscall in the VFS.
Fix the ftruncate() syscalls in the FAT and VFS.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-11-23 10:55:14 +01:00
Lucjan Bryndza
607b4299d4 [EGD-7883] Close all opened files when umount
Force closing all opened files when unmount
filesystem is called.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-11-12 11:21:18 +01:00
Lucjan Bryndza
e00b5ef5a4 [CP-670] Fix crash dump creation on HF
Fix the crash dump on the disk partition
when phone firmware Hard Fault CM7 core
error.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-11-09 16:31:19 +01:00
Alek Rudnik
da4f9ea2e2 [EGD-7423] FSL MMC driver may stuck in inifinite loop
There was an issue in FSL MMC driver.
Proper fix would be to swith to never 2.10 version - as it looks
like the issues is solved there - but this is out of scope of
this Jira case.
2021-11-05 13:37:00 +01:00
Lucjan Bryndza
ad058041a5 [EGD-7770] Fix hardfault with FileIndexer
Fix hard hault with fileindexer

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-12 14:22:59 +02:00
Piotr Tański
1d2f5cf7a4 [EGD-7754] Dates bumped in disclaimers
Dates bumped from 2020 to 2021.
2021-10-11 19:08:26 +02:00
Lucjan Bryndza
aa8a698129 [EGD-7757] Improve stdlib iobuf MTP for ext4 fs
Improve stdlib file transfer performance for ext4
on the MTP file transfer

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-07 14:39:28 +02:00
Lucjan Bryndza
1348391002 [EGD-7742] Fix stat() on the ext4 fs
Fix stat() on the ext4 rootfs

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-07 14:39:28 +02:00
Lucjan Bryndza
4cec2dda0f [EGD-7741] Fix log headers in the master branch
Fix the log headers in the master branch

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-07 14:39:28 +02:00
Lucjan Bryndza
84515a251c [EGD-7731] Fix issue with diropen() on rootdir
Fix issue with opendir() on the root directory
and ext4 filesystem.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-07 14:39:28 +02:00
Lucjan Bryndza
ca75ebe449 [EGD-7587] Change user partition to ext4 fs
Add support for the EXT4 filesystem using LWEXT4
Add minor VFS fixes
Add unittest for the EXT4 partitions
Reformat partition for use EXT4 filesystem

[EGD-7587] Initial cmake of the ext4

[EGD-7587] Block driver for the ext4

Initial version of the block driver for the ext4 device

[EGD-7587] Initial version of the EXT4 fs support

Initial version of the ext4 filesystem support

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

[EGD-7587] Mount unmount initial unit tests

Mount and unmount initial unit tests

[EGD-7587] Unit tests and fixes for ext4

Unit tests and fixes for the ext4 partition

[EGD-7587[ adjust flags

Adjust ext configuration flags

[EGD-7587] Change to generate ext4 image

Change image generation script to generate ext4 image

[EGD-7584] Change cache memory settings

Change cache memory settings

[EGD-7587] Change create image flags

Change create image flags

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

[EGD-7587] Git change lwext4 to the mudita version

Change LWEXT4 to mudita version

[EGD-7587] Modify ext4 implementation

Modify ext4 implementation according to the new lwext4
mudita branch. Some issues were fixed in this branch

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

[EGD-7587] Add to VFS rmdir syscall

Add to VFS missing rmdir for compliance POSIX std

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-07 14:39:28 +02:00
Marcin Smoczyński
bd90e57516 [BH-907] Split utils module into components
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-23 15:14:40 +02:00
tomaszkrosnowski
e05ddbfdd9 [EGD-7010] Remove sensitive data from logs
Sensivite data like first/second name, messages and notes content,
dialed gsm numbers etc are removed from logs to guarantee security for
Pure users.
2021-07-08 11:43:35 +02:00
Lukasz Skrzypczak
7fee0d9cfb [BH-378] Utils move log to library
Moved log to separate library
2021-06-08 12:24:29 +02:00
DariuszSabala
a360d13b5e [BH-460] Moved TPLIB littlefs
Moved littlefs library to dedicated third party directory,
fixed include paths
2021-06-04 11:28:33 +02:00
Lucjan Bryndza
89c263c03b [EGD-6518] Change optional methods for the DM
Change numer of minimal optional methods required by the
block device in the disk manager

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-05-12 15:34:20 +02:00
Lucjan Bryndza
124b6cb6c1 [EGD-6558] Add automount mechanism of the mfgconf
Add optional mounting nfgconf partition on the EEPROM with
the LFS filesystem for the manufacturing data.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-04-19 12:15:20 +02:00
Lucjan Bryndza
b04b66e8e0 [EGD-6522] Add EEPROM emulation in the emulator
Add possibility to emulate eeprom in the linux emulator
2021-04-16 12:29:56 +02:00
Artur Śleszyński
33d652c1a1 [EGD-6156] Create crash dumps
Integrate the CrashCatcher library in order to store phone state after
a fault occurs. The dumps are stored in the CrashCatcher hex format and
can be debugged using the CrashDebug stub built for x86_64 via the
'debug_crash_dump.sh' script.
2021-04-02 14:58:42 +02:00
Lucjan Bryndza
7bcc1c9bd4 [EGD-6013] Fix no copy syscall
Due to lack of some filesystem syscalls std::filesystem::copy
functions family doesn't work. This path add missing syscalls
in the FS layer.
2021-03-10 19:05:07 +01:00
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
26b791702c [EGD-4758] Add unit tests for littlefs
Some tests passed but it needs some work...
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