博客
关于我
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/

你可能感兴趣的文章
Mysql8在Centos上安装后忘记root密码如何重新设置
查看>>
Mysql8在Windows上离线安装时忘记root密码
查看>>
MySQL8找不到my.ini配置文件以及报sql_mode=only_full_group_by解决方案
查看>>
mysql8的安装与卸载
查看>>
MySQL8,体验不一样的安装方式!
查看>>
MySQL: Host '127.0.0.1' is not allowed to connect to this MySQL server
查看>>
Mysql: 对换(替换)两条记录的同一个字段值
查看>>
mysql:Can‘t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock‘解决方法
查看>>
MYSQL:基础——3N范式的表结构设计
查看>>
MYSQL:基础——触发器
查看>>
Mysql:连接报错“closing inbound before receiving peer‘s close_notify”
查看>>
mysqlbinlog报错unknown variable ‘default-character-set=utf8mb4‘
查看>>
mysqldump 参数--lock-tables浅析
查看>>
mysqldump 导出中文乱码
查看>>
mysqldump 导出数据库中每张表的前n条
查看>>
mysqldump: Got error: 1044: Access denied for user ‘xx’@’xx’ to database ‘xx’ when using LOCK TABLES
查看>>
Mysqldump参数大全(参数来源于mysql5.5.19源码)
查看>>
mysqldump备份时忽略某些表
查看>>
mysqldump实现数据备份及灾难恢复
查看>>
mysqldump数据库备份无法进行操作只能查询 --single-transaction
查看>>