From 4dfefb4e06ae047a36ae6fe24d6883ea30d3d99e Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 3 Dec 2021 11:07:03 +0800 Subject: [PATCH] boards/sim: update sim for 'merge hostfs_rpmsg to rpmsgfs' Signed-off-by: ligd --- boards/sim/sim/sim/README.txt | 19 ++++++++++--------- boards/sim/sim/sim/configs/rpproxy/defconfig | 3 +-- boards/sim/sim/sim/configs/rpserver/defconfig | 2 +- boards/sim/sim/sim/src/sim_bringup.c | 10 ++++------ 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/boards/sim/sim/sim/README.txt b/boards/sim/sim/sim/README.txt index 8cfca8ed85..1186f7769e 100644 --- a/boards/sim/sim/sim/README.txt +++ b/boards/sim/sim/sim/README.txt @@ -1013,18 +1013,19 @@ rpserver 2)Make integrated GPS like external(NMEA) 3)Make integrated modem like external(ATCMD) - 3.Rpmsg HostFS + 3.RpmsgFS Source: - include/nuttx/fs/hostfs_rpmsg.h - fs/hostfs/hostfs_rpmsg_server.c - fs/hostfs/hostfs_rpmsg.c + include/nuttx/fs/rpmsgfs.h + fs/rpmsgfs/rpmsgfs.c + fs/rpmsgfs/rpmsgfs_client.c + fs/rpmsgfs/rpmsgfs_server.c Describe: 1.Like NFS but between two CPU - 2.Fully access Host(Linux/NuttX) File system + 2.Fully access remote(Linux/NuttX) File system 1)Save the tuning parameter during manufacture 2)Load the tuning parameter file in production 3)Save audio dump to file for tuning/debugging - 4)Dynamic loading module from host + 4)Dynamic loading module from remote 4.Rpmsg Net Source: @@ -1091,11 +1092,11 @@ rpserver 3 3 100 FIFO Task --- Running 00000000 004080 init 4 4 224 FIFO Kthread --- Waiting Signal 00000002 002000 rptun server 0x5671e900 - 3>Rpmsg HostFS: - Mount the remote file system via RPMSG Hostfs, cu to proxy first: + 3>RpmsgFS: + Mount the remote file system via RPMSGFS, cu to proxy first: server> cu - proxy> mount -t hostfs -o fs=/proc proc_server + proxy> mount -t rpmsgfs -o cpu=server,fs=/proc proc_server proxy> ls /: dev/ diff --git a/boards/sim/sim/sim/configs/rpproxy/defconfig b/boards/sim/sim/sim/configs/rpproxy/defconfig index 82e242e5a0..76d2db3e54 100644 --- a/boards/sim/sim/sim/configs/rpproxy/defconfig +++ b/boards/sim/sim/sim/configs/rpproxy/defconfig @@ -16,9 +16,8 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_SIMPLE_ADDRENV=y CONFIG_EXAMPLES_RPMSGSOCKET=y -CONFIG_FS_HOSTFS=y -CONFIG_FS_HOSTFS_RPMSG=y CONFIG_FS_PROCFS=y +CONFIG_FS_RPMSGFS=y CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_LIBC_HOSTNAME="proxy" CONFIG_NET=y diff --git a/boards/sim/sim/sim/configs/rpserver/defconfig b/boards/sim/sim/sim/configs/rpserver/defconfig index d00884e187..44135d9cf6 100644 --- a/boards/sim/sim/sim/configs/rpserver/defconfig +++ b/boards/sim/sim/sim/configs/rpserver/defconfig @@ -16,8 +16,8 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_SIMPLE_ADDRENV=y CONFIG_EXAMPLES_RPMSGSOCKET=y CONFIG_FS_HOSTFS=y -CONFIG_FS_HOSTFS_RPMSG_SERVER=y CONFIG_FS_PROCFS=y +CONFIG_FS_RPMSGFS=y CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_LIBC_HOSTNAME="server" CONFIG_NET=y diff --git a/boards/sim/sim/sim/src/sim_bringup.c b/boards/sim/sim/sim/src/sim_bringup.c index 1b7679fc7d..1044df98a9 100644 --- a/boards/sim/sim/sim/src/sim_bringup.c +++ b/boards/sim/sim/sim/src/sim_bringup.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -462,12 +462,10 @@ int sim_bringup(void) up_rtc_set_lowerhalf(rpmsg_rtc_initialize(0)); #endif -#ifdef CONFIG_FS_HOSTFS_RPMSG - hostfs_rpmsg_init("server"); +#ifdef CONFIG_FS_RPMSGFS +#ifdef CONFIG_SIM_RPTUN_MASTER + rpmsgfs_server_init(); #endif - -#ifdef CONFIG_FS_HOSTFS_RPMSG_SERVER - hostfs_rpmsg_server_init(); #endif #endif