博客
关于我
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万字总结!超详细!
查看>>
Mysql下载以及安装(新手入门,超详细)
查看>>
MySQL不会性能调优?看看这份清华架构师编写的MySQL性能优化手册吧
查看>>
MySQL不同字符集及排序规则详解:业务场景下的最佳选
查看>>
Mysql不同官方版本对比
查看>>
MySQL与Informix数据库中的同义表创建:深入解析与比较
查看>>
mysql与mem_细说 MySQL 之 MEM_ROOT
查看>>
MySQL与Oracle的数据迁移注意事项,另附转换工具链接
查看>>
mysql丢失更新问题
查看>>
MySQL两千万数据优化&迁移
查看>>
MySql中 delimiter 详解
查看>>
MYSQL中 find_in_set() 函数用法详解
查看>>
MySQL中auto_increment有什么作用?(IT枫斗者)
查看>>
MySQL中B+Tree索引原理
查看>>
mysql中cast() 和convert()的用法讲解
查看>>
mysql中datetime与timestamp类型有什么区别
查看>>
MySQL中DQL语言的执行顺序
查看>>
mysql中floor函数的作用是什么?
查看>>
MySQL中group by 与 order by 一起使用排序问题
查看>>
mysql中having的用法
查看>>