Commit Graph
8 Commits
Author SHA1 Message Date
Avi Weiss 6eb8a4a2f0 bsps/shared/dev/flash: Fix JFFS2 flashdev file leaks
Close the flash file before returning from these 5 early setup failure
paths. Otherwise the file descriptor and selected flash region remain
allocated.
2026-08-02 20:24:23 +03:00
Avi Weiss f3536b2927 bsps/shared/dev/flash: Fix read-only JFFS2 mount option
Open works correclty with the read_only argument but mount
ignores and always uses READ_WRITE.

Use RTEMS_FILESYSTEM_READ_ONLY when read_only is true so the
filesystem rejects write operations and does not perform erase
operations when under a read-only mount.
2026-08-02 18:03:16 +03:00
Kinsey Moore 098ba8472d cpukit/flashdev: Clarify interface and update consumers
This clarifies the flashdev out of band read and write interfaces and
updates any consumers of those interfaces. This was partially refactored
at one point and the refactoring didn't extend to the consumers as it
should have.
2026-07-27 12:15:22 +10:00
Aaron Nyholm 190899ee61 bsps/shared/jffs2_flashdev.c: Fixed fatal heap error on failed mount
Removed double free of mount_data and instance.
Closes #5381
2025-10-28 15:15:08 +11:00
Kinsey Moore 2cb47d2010 bsps/jffs2_flashdev: Return correct value for OOB size
Return the actual out of bounds size per page instead of the ioctl
return status. JFFS2 will happily operate with an OOB size of 0 and
instead put cleanmarkers in the normal page space of the flash.
2025-10-23 15:31:57 -05:00
Kinsey Moore ea7a756ea1 bsps/shared/dev/flash/jffs2: Add support for NAND
This adds support for NAND to the JFFS2 flashdev adapter.
2025-10-08 16:43:09 +00:00
Kinsey Moore 7da577f8e6 bsps/shared/dev/flash: Enforce maximum JFFS2 filesystem size
The maximum size of JFFS2 is 4GB minus the block size of the flash.
Enforce this limitation when setting up a filesystem on a flashdev
region that is larger than the maximum.

This also resolves some off-nominal memory leaks.
2025-09-22 15:52:43 -05:00
Kinsey Moore 7d1a934884 bsps/shared/flash: Add a JFFS2 flashdev driver
This adds generic JFFS2 interworking code that allows JFFS2 to be used
on top of any flashdev backend. It currently only supports NOR flashdev
backends.
2024-11-21 23:44:37 +00:00