博客
关于我
imx6ull开发板调试nfs环境配置+运行hello程序
阅读量:344 次
发布时间:2019-03-04

本文共 2604 字,大约阅读时间需要 8 分钟。

20210314+imx6ull开发板NFS环境配置指南

1. 设置Git配置

在终端中执行以下命令,设置Git用户名和邮箱:

git config --global user.name "snaking616"git config --global user.email "snaking616@163.com"git config --list

输出结果应显示:

user.name=snaking616user.email=snaking616@163.com

2. 克隆仓库

从Git仓库克隆项目:

git clone https://e.coding.net/codebug8/repo.git

3. 下载IMX6ULL源码

创建并进入SDK目录:

mkdir -p 100ask_imx6ull-sdk && cd 100ask_imx6ull-sdk

从仓库初始化并同步仓库内容:

../repo/repo init -u https://e.coding.net/weidongshan/manifests.git \  -b linux-sdk -m imx6ull/100ask_imx6ull_linux4.9.88_release.xml --no-repo-verify../repo/repo sync -j4

4. 交叉编译链配置

编辑Bashrc文件并添加以下内容:

vim .bashrc

在文件末尾添加:

export ARCH=armexport CROSS_COMPILE=arm-linux-gnueabihf-export PATH=$PATH:/home/book/100ask_imx6ull-sdk/ToolChain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin

然后重新加载配置:

source ~/.bashrc

5. 创建源码目录

新建一个source目录:

mkdir -p source

6. 安装并配置NFS

1. 安装软件包

安装NFS客户端和服务器:

sudo apt-get install nfs-common nfs-kernel-server portmap
2. 配置NFS目录

创建并设置权限:

sudo mkdir -p /home/wang/nfschmod 777 /home/wang/nfs

编辑/etc/exports文件:

sudo vim /etc/exports

添加以下内容:

/home/wang/nfs 192.168.31.59/24(rw,sync,insecure,no_subtree_check,no_root_squash)
3. 启动RPC服务

启动RPC绑服务:

sudo service rpcbind start
4. 启动NFS服务

重启NFS服务:

sudo service nfs-kernel-server restart
5. 查看注册的端口

查看已注册的端口:

rpcinfo -p localhost

7. 编译并运行hello.c

将hello.c文件复制到当前目录并编译:

cp ../01-quickstart/01_all_series_quickstart/04_嵌入式Linux应用开发基础知识/source/01_hello/hello.c ./arm-linux-gnueabihf-gcc -o hello hello.c

8. 通过NFS运行hello服务

在客户端机器上执行以下命令挂载NFS共享目录并运行程序:

mount -t nfs -o nolock,vers=3 192.168.31.59:/home/wang/nfs /mntcp /mnt/hello ./ls./hello wang

9. 替换APT镜像源

替换 Ubuntu 镜像源:

sudo gedit /etc/apt/sources.list

将内容替换为:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

然后更新仓库索引:

sudo apt-get update

转载地址:http://hdwh.baihongyu.com/

你可能感兴趣的文章
MySQL-Explain的详解
查看>>
mysql-group_concat
查看>>
MySQL-redo日志
查看>>
MySQL-【1】配置
查看>>
MySQL-【4】基本操作
查看>>
Mysql-丢失更新
查看>>
Mysql-事务阻塞
查看>>
Mysql-存储引擎
查看>>
mysql-开启慢查询&所有操作记录日志
查看>>
MySQL-数据目录
查看>>
MySQL-数据页的结构
查看>>
MySQL-架构篇
查看>>
MySQL-索引的分类(聚簇索引、二级索引、联合索引)
查看>>
Mysql-触发器及创建触发器失败原因
查看>>
MySQL-连接
查看>>
mysql-递归查询(二)
查看>>
MySQL5.1安装
查看>>
mysql5.5和5.6版本间的坑
查看>>
mysql5.5最简安装教程
查看>>
mysql5.6 TIME,DATETIME,TIMESTAMP
查看>>