fs/rpmsg: Move the server initialization to fs_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
64f0267993
commit
5f93ae9dd2
@ -1059,7 +1059,7 @@ rpserver
|
||||
|
||||
3.RpmsgFS
|
||||
Source:
|
||||
include/nuttx/fs/rpmsgfs.h
|
||||
fs/rpmsgfs/rpmsgfs.h
|
||||
fs/rpmsgfs/rpmsgfs.c
|
||||
fs/rpmsgfs/rpmsgfs_client.c
|
||||
fs/rpmsgfs/rpmsgfs_server.c
|
||||
|
@ -19,7 +19,7 @@ CONFIG_DEV_SIMPLE_ADDRENV=y
|
||||
CONFIG_EXAMPLES_RPMSGSOCKET=y
|
||||
CONFIG_FS_HOSTFS=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_RPMSGFS=y
|
||||
CONFIG_FS_RPMSGFS_SERVER=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=4096
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INPUT=y
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
#include <nuttx/fs/rpmsgfs.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/spi/spi_transfer.h>
|
||||
#include <nuttx/rc/lirc_dev.h>
|
||||
@ -447,10 +446,6 @@ int sim_bringup(void)
|
||||
#else
|
||||
up_rptun_init("server-proxy", "server", false);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FS_RPMSGFS) && defined(CONFIG_SIM_RPTUN_MASTER)
|
||||
rpmsgfs_server_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SIM_WTGAHRS2_UARTN
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "rpmsgfs/rpmsgfs.h"
|
||||
#include "inode/inode.h"
|
||||
#include "aio/aio.h"
|
||||
|
||||
@ -52,4 +53,8 @@ void fs_initialize(void)
|
||||
aio_initialize();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_RPMSGFS_SERVER
|
||||
rpmsgfs_server_init();
|
||||
#endif
|
||||
}
|
||||
|
@ -10,3 +10,10 @@ config FS_RPMSGFS
|
||||
---help---
|
||||
Use rpmsg file system to mount remote directories to local.
|
||||
This the method for user to use remote file like own core.
|
||||
|
||||
config FS_RPMSGFS_SERVER
|
||||
bool "RPMSG File Server"
|
||||
default n
|
||||
depends on RPTUN
|
||||
---help---
|
||||
Initialize rpmsg file system server automatically.
|
||||
|
@ -26,3 +26,7 @@ VPATH += :rpmsgfs
|
||||
ifeq ($(CONFIG_FS_RPMSGFS),y)
|
||||
CSRCS += rpmsgfs.c rpmsgfs_client.c rpmsgfs_server.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FS_RPMSGFS_SERVER),y)
|
||||
CSRCS += rpmsgfs_server.c
|
||||
endif
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/ioctl.h>
|
||||
#include <nuttx/fs/rpmsgfs.h>
|
||||
|
||||
#include "rpmsgfs.h"
|
||||
|
||||
|
@ -245,4 +245,10 @@ int rpmsgfs_client_stat(FAR void *handle, FAR const char *path,
|
||||
int rpmsgfs_client_chstat(FAR void *handle, FAR const char *path,
|
||||
FAR const struct stat *buf, int flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
int rpmsgfs_server_init(void);
|
||||
|
||||
#endif /* __FS_RPMSGFS_RPMSGFS_H */
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/fs/ioctl.h>
|
||||
#include <nuttx/fs/rpmsgfs.h>
|
||||
#include <nuttx/rptun/openamp.h>
|
||||
#include <nuttx/semaphore.h>
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/fs/rpmsgfs.h>
|
||||
#include <nuttx/rptun/openamp.h>
|
||||
|
||||
#include "rpmsgfs.h"
|
||||
|
@ -1,45 +0,0 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/fs/rpmsgfs.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_FS_HOSTFS_H
|
||||
#define __INCLUDE_NUTTX_FS_HOSTFS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_RPMSGFS
|
||||
int rpmsgfs_server_init(void);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_FS_HOSTFS_H */
|
Loading…
Reference in New Issue
Block a user