Beaglebone Back学习三(开发环境搭建)

开发环境搭建

1 Ubuntu环境搭建

2 Window环境搭建

3 开发板环境搭建

1 Ubuntu环境搭建

(1)安装必要的网络工具

samba nfs tftp vmware-tools

samba

nfs

  • apt-get install nfs-kernel-server 
  • vim  /etc/exports  (/path/to/nfs  *(rw,sync,no_root_squash) )
  • /etc/init.d/nfs-kernel-server restart

(2)配置通信网络

指定网络

2 Window环境搭建

指定网络

3 开发板环境搭建

nfs

  • opkg install portmap-dev
  • opkg install ufs-utils-client
  • mount -t nfs ip:/path/to/nfs(对应ubuntu的IP地址和nfs目录)/mnt/nfs(对应开发板的) -o nolock,proto=tcp,nfsvers=3,回车后,虽然出现如下错误,但不要管

    Can't set permissions on mtab: Operation not permitted

  • ls /mnt/nfs

安装

beaglebone black搭建NFS环境
一、挂载型
1 虚拟机中的linux系统安装好nfs服务器
/etc/init.d/nfs-kernel-server
2 编辑/etc/exports 添加对应的nfs文件目录
/path/to/nfs *(rw,sync,no_root_squash)
3在beaglebone上安装两个文件
opkg install portmap(portmap_6.0-r3.1_armv7a.ipk)
opkg install nfs(nfs-utils-client_1.1.2-2.1_armv7a.ipk)
该文件可以使用scp方法加载到beaglebone上
4 在arm上挂载nfs
mount -t nfs Ubuntu-IP:/path/to/nfs /arm-dir -o nolock,proto=tcp,nfsvers=3
注:Ubuntu-IP是虚拟机中的Ubuntu的IP地址,应与beaglebone black板子在同一个网段;
arm-dir是板子上将要存放共享的文件目录
path/to/nfs是虚拟机中Ubuntu中构建NFS系统时,设置的nfs路径,也就是2中的路径
5 常用操作:
重启nfs服务器 $sudo /etc/init.d/nfs-kernel-server restart
解载 umount /arm-dir
mount -t nfs 192.168.7.10:/home/dlp/dlp/arm-bbb/bin /home/nfs -o nolock,proto=tcp,nfsvers=3

二、启动型
1 同上
2 同上
3 在BeagleBone启动的时候,敲回车,使得启动停在uboot部分

4 然后依次输入
U-Boot# mmc rescan
U-Boot# setenv ipaddr arm-IP
U-Boot# setenv serverip Ubuntu-IP
U-Boot# setenv bootargs console=ttyO0,115200n8 root=/dev/nfs nfsroot=Ubuntu-IP:/path/to/nfs ip=arm-IP:Ubuntu-
IP:gateway:mask::eth0:off
U-Boot# run mmc_load_uimage
U-Boot#bootm 0x80007fc0

5 reset

参考链接

BeagleBone 的NFS启动配置和流程

 Beaglebone Black从零开始系列教程大汇总

3  Programming the Beaglebone Black 
4  Linux arm Beaglebone Black

5 buildroot for beaglebone

原文地址:https://www.cnblogs.com/gjianw217/p/3754026.html