博客
关于我
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 排序id_mysql如何按特定id排序
查看>>
Mysql 提示:Communication link failure
查看>>
mysql 插入是否成功_PDO mysql:如何知道插入是否成功
查看>>
Mysql 数据库InnoDB存储引擎中主要组件的刷新清理条件:脏页、RedoLog重做日志、Insert Buffer或ChangeBuffer、Undo Log
查看>>
mysql 数据库中 count(*),count(1),count(列名)区别和效率问题
查看>>
mysql 数据库备份及ibdata1的瘦身
查看>>
MySQL 数据库备份种类以及常用备份工具汇总
查看>>
mysql 数据库存储引擎怎么选择?快来看看性能测试吧
查看>>
MySQL 数据库操作指南:学习如何使用 Python 进行增删改查操作
查看>>
MySQL 数据库的高可用性分析
查看>>
MySQL 数据库设计总结
查看>>
Mysql 数据库重置ID排序
查看>>
Mysql 数据类型一日期
查看>>
MySQL 数据类型和属性
查看>>
mysql 敲错命令 想取消怎么办?
查看>>
Mysql 整形列的字节与存储范围
查看>>
mysql 断电数据损坏,无法启动
查看>>
MySQL 日期时间类型的选择
查看>>
Mysql 时间操作(当天,昨天,7天,30天,半年,全年,季度)
查看>>
MySQL 是如何加锁的?
查看>>