博客
关于我
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中ON DUPLICATE KEY UPDATE的介绍与使用、批量更新、存在即更新不存在则插入
查看>>
MYSQL中TINYINT的取值范围
查看>>
MySQL中UPDATE语句的神奇技巧,让你操作数据库如虎添翼!
查看>>
Mysql中varchar类型数字排序不对踩坑记录
查看>>
MySQL中一条SQL语句到底是如何执行的呢?
查看>>
MySQL中你必须知道的10件事,1.5万字!
查看>>
MySQL中使用IN()查询到底走不走索引?
查看>>
Mysql中使用存储过程插入decimal和时间数据递增的模拟数据
查看>>
MySql中关于geometry类型的数据_空的时候如何插入处理_需用null_空字符串插入会报错_Cannot get geometry object from dat---MySql工作笔记003
查看>>
mysql中出现Incorrect DECIMAL value: '0' for column '' at row -1错误解决方案
查看>>
mysql中出现Unit mysql.service could not be found 的解决方法
查看>>
mysql中出现update-alternatives: 错误: 候选项路径 /etc/mysql/mysql.cnf 不存在 dpkg: 处理软件包 mysql-server-8.0的解决方法(全)
查看>>
Mysql中各类锁的机制图文详细解析(全)
查看>>
MySQL中地理位置数据扩展geometry的使用心得
查看>>
Mysql中存储引擎简介、修改、查询、选择
查看>>
Mysql中存储过程、存储函数、自定义函数、变量、流程控制语句、光标/游标、定义条件和处理程序的使用示例
查看>>
mysql中实现rownum,对结果进行排序
查看>>
mysql中对于数据库的基本操作
查看>>
Mysql中常用函数的使用示例
查看>>
MySql中怎样使用case-when实现判断查询结果返回
查看>>