mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
boards/sim: Prefer tmpfs for /tmp in rc.sysinit.
Prefer mounting /tmp with tmpfs in the SIM default rc.sysinit when CONFIG_FS_TMPFS is enabled, and keep the FAT RAMDISK path as a fallback for configurations that only enable CONFIG_FS_FAT. Signed-off-by: Arjav Patel <arjav1528@gmail.com>
This commit is contained in:
committed by
Alan C. Assis
parent
94e5fb9d3e
commit
bf0848dbd6
@@ -26,13 +26,19 @@
|
|||||||
#define CONCAT(x, y) CONCAT_(x, y)
|
#define CONCAT(x, y) CONCAT_(x, y)
|
||||||
|
|
||||||
#ifdef CONFIG_ETC_ROMFS
|
#ifdef CONFIG_ETC_ROMFS
|
||||||
#ifdef CONFIG_FS_FAT
|
#ifdef CONFIG_FS_TMPFS
|
||||||
|
|
||||||
/* Create a RAMDISK and mount it at /tmp */
|
/* Mount /tmp on TMPFS */
|
||||||
|
|
||||||
|
mount -t tmpfs /tmp
|
||||||
|
|
||||||
|
#elif defined(CONFIG_FS_FAT)
|
||||||
|
|
||||||
|
/* Create a FAT RAMDISK and mount it at /tmp */
|
||||||
|
|
||||||
mkrd -m CONFIG_ETC_FATDEVNO -s CONFIG_ETC_FATSECTSIZE CONFIG_ETC_FATNSECTORS
|
mkrd -m CONFIG_ETC_FATDEVNO -s CONFIG_ETC_FATSECTSIZE CONFIG_ETC_FATNSECTORS
|
||||||
mkfatfs CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO)
|
mkfatfs CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO)
|
||||||
mount -t vfat CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) CONFIG_ETC_FATMOUNTPT
|
mount -t vfat CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) CONFIG_ETC_FATMOUNTPT
|
||||||
|
|
||||||
#endif /* CONFIG_FS_FAT */
|
#endif /* CONFIG_FS_TMPFS || CONFIG_FS_FAT */
|
||||||
#endif /* CONFIG_ETC_ROMFS */
|
#endif /* CONFIG_ETC_ROMFS */
|
||||||
|
|||||||
Reference in New Issue
Block a user