boards/sim: Add a xipfs configuration.

rammtd answers BIOC_XIPBASE with the base of its RAM buffer, so it is a
usable stand-in for memory mapped NOR: extents are directly addressable and
the in-place mmap path can be exercised end to end without any flash.  Mount
xipfs on it when it is the configured file system, and add a configuration
that runs the xipfs test suite, fault injection included.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This commit is contained in:
Marco Casaroli 2026-07-25 13:08:08 +02:00 committed by Alan C. Assis
parent ba826dd738
commit d3c25e7754
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,33 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ARCH="sim"
CONFIG_ARCH_BOARD="sim"
CONFIG_ARCH_BOARD_SIM=y
CONFIG_ARCH_CHIP="sim"
CONFIG_ARCH_SIM=y
CONFIG_BOARDCTL_POWEROFF=y
CONFIG_BOARD_LOOPSPERMSEC=0
CONFIG_BUILTIN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_XIPFS=y
CONFIG_FS_XIPFS_FAULT_INJECT=y
CONFIG_IDLETHREAD_STACKSIZE=8192
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_LIBC_STRERROR=y
CONFIG_MTD=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_READLINE=y
CONFIG_RAMMTD=y
CONFIG_RAMMTD_FLASHSIM=y
CONFIG_SCHED_WAITPID=y
CONFIG_START_MONTH=6
CONFIG_START_YEAR=2008
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_XIPFS=y
CONFIG_TESTING_FS_XIPFS=y

View file

@ -212,6 +212,22 @@ int sim_bringup(void)
smart_initialize(0, mtd, NULL);
#elif defined(CONFIG_FS_XIPFS)
/* Mount the XIPFS file system. rammtd answers BIOC_XIPBASE with
* the base of its RAM buffer, which makes it a usable stand-in
* for memory mapped NOR: extents are directly addressable, so
* the XIP mmap path can be exercised end to end.
*/
ret = nx_mount("/dev/rammtd", "/mnt/xipfs", "xipfs", 0,
"autoformat");
if (ret < 0)
{
syslog(LOG_ERR,
"ERROR: Failed to mount XIPFS at /mnt/xipfs: %d\n",
ret);
}
#elif defined(CONFIG_FS_SPIFFS)
/* Mount the SPIFFS file system */