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:
Arjav Patel
2026-04-23 07:33:37 +05:30
committed by Alan C. Assis
parent 94e5fb9d3e
commit bf0848dbd6
+9 -3
View File
@@ -26,13 +26,19 @@
#define CONCAT(x, y) CONCAT_(x, y)
#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
mkfatfs CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO)
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 */