美文网首页
一 . 树莓派A20环境进一步搭建 2

一 . 树莓派A20环境进一步搭建 2

作者: wit_yuan | 来源:发表于2017-07-15 23:52 被阅读0次

1 安装网络服务

1.1 建立网络连接

首先,我按照上一篇 链接 ,使用的是marsboard sdk,所以接上无线网卡,芯片未rtl8188u,并不能识别出来,也就是说,驱动是有一定的问题的(底层io设置可能有问题)。所以,A20板子是连不上网的。而:

root@marsboard:~# tftp
...
The program 'tftp' can be found in the following packages:
 * tftp-hpa
 * tftp
Try: apt-get install <selected package>
root@marsboard:~#  
...
root@marsboard:~# nfs
No command 'nfs' found, did you mean:
 Command 'knfs' from package 'openafs-client' (universe)
 Command 'nns' from package 'tcllib' (universe)
 Command 'nes' from package 'mednafen' (universe)
 Command 'nes' from package 'fceu' (universe)
 Command 'nes' from package 'nestopia' (universe)
 Command 'nes' from package 'fceux' (universe)
 Command 'ns' from package 'ns2' (universe)
 Command 'fs' from package 'openafs-client' (universe)
 Command 'hfs' from package 'hfsutils-tcltk' (universe)
nfs: command not found
root@marsboard:~# 

比较尴尬,啥服务都不能用。所以,我们要做的就是让板子通过有线网络,让板子上网。

我使用的笔记本配置如下:

型号:MECHREVO 机械革命
处理器:i7-7700HQ 2.8GHz 2.8GHz
内存:8G
系统:win10 64位

可以设置无线网络:

设置笔记本无线网络

这个时候,再看连接了有线网络的A20板子网络显示如下:

root@marsboard:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:c7:03:c2:44:43  
          inet addr:192.168.137.114  Bcast:192.168.137.255  Mask:255.255.255.0
          inet6 addr: fe80::c7:3ff:fec2:4443/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2760 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:619294 (619.2 KB)  TX bytes:11444 (11.4 KB)
          Interrupt:87 Base address:0x8000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:66 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5022 (5.0 KB)  TX bytes:5022 (5.0 KB)

root@marsboard:~# 
root@marsboard:~# 
root@marsboard:~# ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125: icmp_seq=1 ttl=56 time=9.71 ms
64 bytes from 61.135.169.125: icmp_seq=2 ttl=56 time=7.28 ms
64 bytes from 61.135.169.125: icmp_seq=3 ttl=56 time=6.89 ms

64 bytes from 61.135.169.125: icmp_seq=4 ttl=56 time=35.5 ms

这表示我们可以用板子上网了。

  • 1.安装tftp:
root@marsboard:~# apt-get install tftp-hpa
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  tftp-hpa
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 16.5 kB of archives.
After this operation, 72.7 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  tftp-hpa
Authentication warning overridden.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty/main tftp-hpa armhf 5.2-7ubuntu3 [16.5 kB]
Fetched 16.5 kB in 0s (17.8 kB/s)
Selecting previously unselected package tftp-hpa.
(Reading database ... 22444 files and directories currently installed.)
Preparing to unpack .../tftp-hpa_5.2-7ubuntu3_armhf.deb ...
Unpacking tftp-hpa (5.2-7ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up tftp-hpa (5.2-7ubuntu3) ...
root@marsboard:~# 

  • 2.安装nfs:
root@marsboard:~# apt-get install nfs-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libevent-2.0-5 libgssglue1 libnfsidmap2 libtirpc1 rpcbind
Suggested packages:
  open-iscsi watchdog
...
...
...
  • 3.windows安装tftp服务端软件

可以在链接 链接 上下载到cisco tftp server软件。我把根目录设置在Desktop上,如下图所示:

设置tftp根目录

这样,就可以验证tftp是否可用:


验证tftp功能

从图中可以看出,build.sh文件已经从win10上下载下来了。

    1. 安装vnc工具

在ubuntu主机上安装vnc server:

$ sudo apt-get install vnc4server

启动服务端:

$ vncserver :1 -geometry 1024x768 -depth 24

初次启动,我们需要设置密码,我设置的密码是123456。服务端这样就可以运行起来了。

在客户端上,我们可以运行tightVNC。

下载网址为:链接,不过好像官网上vncviewer并不好下载,我下载过,成功了。而我又下载了另外一个工具,如图所示:

VNC-viewer 连接服务 输入密码123456 成功连接图

我们修改我们本地的/home/wityuan/.vnc/xstartup文件:

#x-window-manager &
gnome-session &

我使用的是:

$ echo $DESKTOP_SESSION
ubuntu

查看我的系统当前使用的桌面类型,查到的是ubuntu。而在/etc/目录下,能看到:


桌面相关文件夹 桌面系统
    1. 安装scp工具

下载地址为:链接

  • 6.SimpleHTTPServer工具包

可以使用该工具包实现文件的上传与下载。

1.2 安装额外安装包

$ apt get ....

1.3 替换编译的内核文件方法

我现在使用的是将镜像烧写到nand的方法,内核uImage就在nanda里面,如下:

root@marsboard:~# 
root@marsboard:~# ls /dev/nanda
/dev/nanda
root@marsboard:~# ls /mnt/
root@marsboard:~# mount /dev/nanda /mnt/
root@marsboard:~# ls /mnt/
boot.axf            drv_de.drv    font32.sft  os_show     sprite.axf
boot.ini            drv_hdmi.drv  linux       prvt.axf    uEnv.txt
boot_signature.axf  font24.sft    magic.bin   script.bin  uImage
root@marsboard:~#  

在做开发的时候,如果更改了uImage,只需要将该目录下的uImage替换即可。

相关文章

网友评论

      本文标题:一 . 树莓派A20环境进一步搭建 2

      本文链接:https://www.haomeiwen.com/subject/xbozhxtx.html