FAQ_MA35D1_Network File system by Yocto

admin |浏览267次
收藏|2023/01/03 14:32

满意回答

2023/01/03 14:44

以下演示在Ubuntu 20.04上运行,而不是在Docker容器中

首先,在主机操作系统上安装网络文件系统服务器

$ sudo apt-get install nfs-kernel-server nfs-common

创建一个文件夹以放置应用程序代码并与设备共享

修改网络文件系统设置。在导出中添加以下语句

$ sudo gedit /etc/exports

添加“*(要共享的文件夹路径)*(EVB的IP地址)(rw、sync、no_root_squash、no_substree_check)”

/home/user/yocto/helloworld 192.168.0.100(rw,sync,no_root_squash,no_substree_check)

重新启动网络文件系统服务

$ sudo /etc/init.d/nfs-kernel-server restart

在Linux内核中启用NFS客户端

~/build$bitbake linux-ma35d1-c devshell

~/build/tmpglibc/work-shared/ma35d1evb/kernel-source#makemenuconfig

File systems  --->

    [*] Enable POSIX file locking API

    [*] Network File Systems  --->

           <*>   NFS client support

           <*>        NFS client support for NFS version 2

           <*>        NFS client support for NFS version 3

           [*]          NFS client support for the NFSv3 ACL protocol extension

           <*>        NFS client support for NFS version 4

Leave the kernel setting

~/build/tmpglibc/work-shared/ma35d1evb/kernel-source#exit

将nfs-utils添加到image并将命令添加到/build/conf/local.conf

IMAGE_INSTALL_append=“nfs-utils”

重新编译镜像并烧录到设备

~/build$ bitbake linux-ma35d1 -C compile

~/build$ bitbake nvt-image-qt5

在设备终端中创建文件夹

root@ma35d1-evb:~#mkdir-p/mnt/nfs

如果设备和主机位于同一internet域,请检查IP地址

在设备上装载NFS

mount-o nolock-t nfs 192.168.0.103:/home/user/yocto/build/helloworld/mnt/nfs/

现在,您可以找到与主机helloworld文件夹共享的文件夹


nuvoton2022

其他回答(0)
0人关注该问题
+1
 加载中...