本帖最后由 409149645_166831387 于 2019-11-13 01:28 编辑

    前段时间手头事情比较多,下班抽出点时间来研究研究MYD-C7Z010/20开发板,每次尝试都所收获。在此贴中,我将本人在使用Linux环境编译上遇到的问题与大家共同分享,希望能够对后续开发体验人员有所借鉴。关于搭建Linux环境我耗费了好长时间,可能是因为个人电脑比较老旧的原因,之前开发过海思的安防类产品,是基于Linux平台的,然而后面没有再继续从事基于Linux平台的项目开发,因此就将电脑里搭建好的Linux环境给卸载掉了。现在重新搭建,感觉走了不少坎坷之路。
      首先第一次尝试,采用米尔官方提供的光盘中“03-Tools”文件夹下的VirtualBox工具与Ubuntu10.04系统文件来搭建Linux环境,虽然安装了VirtualBox增强工具,结果还是没法共享windows 7中的文件,只能强行地将文件夹Toolchain下的“Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux.tar.bz2”拖拽到Ubuntu10.04虚拟桌面上,结果再去执行tar命令,结果解压出来的文件没有gcc,导致后续设置交叉编译工具后,编译Uboot报未找到gcc编译器。以上总结是因为没有共享win7中的原始文件,生拉强拽会损坏.tar.bz2文件。
      其次第二次尝试使用“VMware-workstation-full-10.0.7”与“ubuntu-16.04.3-desktop-amd64”搭建虚拟机开发环境,结果一开始就报"The Msi Failed",网上搜索解决良策,原来是因为之前的VMware没有卸载干净,正如附件中《VMware安装异常解决》中所述,然后根据网友的提示,删除注册表中含有VMware10软件的信息。结果很快顺利的装上了VMware10,但安装完ubuntu-16.04.3-desktop-amd64系统镜像后,仍然提示没法共享Win7系统文件,然后在网上下载了60M大小的linux.iso镜像,使用VMware10加载,VMware工具增强了,可以实现文件自由挂载、共享。但是编译Uboot时会报原始文件与当前的64位ubuntu不匹配,因此还得换成32位的ubuntu系统。
      接着第三次搭建Linux环境,查阅网上相关资料,选择采用VMware Workstation 12 Pro的工具,搭配官方光盘中的Ubuntu10.04系统镜像,这才顺利的实现了与Win7文件共享,完美支持从windows中拷贝指令到Terminal终端中执行,这样工作的效率大大调高了。然后根据基于Linux开发手册指南,按部就班的操作,但是遇到了连不上相对应的远程服务器的问题,原来采用ubuntu-16.04.3-desktop-amd64系统镜像可以更新,但是采用官方光盘中的Ubuntu10.04系统镜像就不能更新,老是报error,超时,原本以为是VMware的网络适配器选择错了,但都是选择的桥接模式。后面在百度上搜索了相关问题,得知是因为Ubuntu10.04系统比较旧的原因,软件更新源过期无法再链接到官方指定的远程服务地址上,然后我在网上找到了解决办法的帖子,更换了source.list文件,其原始目录在“/etc/apt/”目录下,很快就能执行“sudo apt-get update”。source.list源码文件如下:
  1. #deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
  2. # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
  3. # newer versions of the distribution.
  4. deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
  5. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
  6. ## Major bug fix updates produced after the final release of the
  7. ## distribution.
  8. deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
  9. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
  10. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  11. ## team. Also, please note that software in universe WILL NOT receive any
  12. ## review or updates from the Ubuntu security team.
  13. deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
  14. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe
  15. deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
  16. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
  17. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  18. ## team, and may not be under a free licence. Please satisfy yourself as to
  19. ## your rights to use the software. Also, please note that software in
  20. ## multiverse WILL NOT receive any review or updates from the Ubuntu
  21. ## security team.
  22. deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
  23. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
  24. deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
  25. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
  26. ## Uncomment the following two lines to add software from the 'backports'
  27. ## repository.
  28. ## N.B. software from this repository may not have been tested as
  29. ## extensively as that contained in the main release, although it includes
  30. ## newer versions of some applications which may provide useful features.
  31. ## Also, please note that software in backports WILL NOT receive any review
  32. ## or updates from the Ubuntu security team.
  33. deb http://us.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
  34. deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
  35. ## Uncomment the following two lines to add software from Canonical's
  36. ## 'partner' repository.
  37. ## This software is not part of Ubuntu, but is offered by Canonical and the
  38. ## respective vendors as a service to Ubuntu users.
  39. deb http://archive.canonical.com/ubuntu lucid partner
  40. deb-src http://archive.canonical.com/ubuntu lucid partner
  41. deb http://security.ubuntu.com/ubuntu lucid-security main restricted
  42. deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
  43. deb http://security.ubuntu.com/ubuntu lucid-security universe
  44. deb-src http://security.ubuntu.com/ubuntu lucid-security universe
  45. deb http://security.ubuntu.com/ubuntu lucid-security multiverse
  46. deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse
  47. deb http://old-releases.ubuntu.com/ubuntu lucid main restricted universe multiverse   
  48. deb http://old-releases.ubuntu.com/ubuntu lucid-security main restricted universe multiverse   
  49. deb http://old-releases.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse   
  50. deb http://old-releases.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse   
  51. deb http://old-releases.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse   
  52. deb-src http://old-releases.ubuntu.com/ubuntu lucid main restricted universe multiverse   
  53. deb-src http://old-releases.ubuntu.com/ubuntu lucid-security main restricted universe multiverse   
  54. deb-src http://old-releases.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse   
  55. deb-src http://old-releases.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse   
  56. deb-src http://old-releases.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse  
  57. # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
  58. #deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
  59. #deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
  60. #deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
  61. #deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
  62. #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
  63. #deb http://mirrors.aliyun.com/ubuntu/ xenial universe
  64. #deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
  65. #deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
  66. #deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
  67. #deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
  68. #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
  69. #deb http://archive.canonical.com/ubuntu xenial partner
  70. #deb-src http://archive.canonical.com/ubuntu xenial partner
  71. #deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
  72. #deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
  73. #deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
  74. #deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
更新.png
     当然如果碰到“动态MMap没有空间了”提示,可以参考如下图所示的解决办法。更新完毕后再执行手册中提到的安装必要的工具指令,才能进行Uboot的编译,否则会报错。 增大映射空间.jpg
必须更换软件更新源的链接说明如下:
更新源码链接.jpg
只要更新问题解决,共享文件没有问题,后面就是一路凯歌,如下图所示,编译Uboot成功,编译内核成功
uboot编译ok.png
生成Uboot二进制文件,然后将它拷贝到“02-Images”文件夹目录下
生成uboot二进制文件.png
编译内核信息如下
编译内核.png
内核编译结束.png
内核编译可能需要花点时间,我的电脑可能有点老旧,花了大约16分钟。最后内核编译成功,生成的二进制文件uImage以及dtb文件
生成uImage.png
生成的dtb文件.png
然后将生成的可执行二进制文件,按照操作手册指南,拷贝到内存卡的根目录下,然后启动板卡,通过串口可以看到烧写的具体信息
烧写中......png
当然如果我们将官方提供的Uboot二进制文件直接扔到内存卡的根目录下,板卡启动后就相当于执行了一段裸板程序,串口打印Hello world信息
https://v.youku.com/v_show/id_XNDQzNDE2MjAxNg==.html?spm=a2h3j.8428770.3416059.1
    综上所述,MYD-C7Z010是一块工业级开发板,既能使用Vivado工具开发FPGA程序,又能使用Linux开发环境编译内核源码,不愧为FPGA+ARM的嵌入式开发板,板载资源非常丰富,如果配有触摸屏那就更好了,将有更多的功能,更好的UI界面可以体验。开发板配有相关的视频教程那更完美了,不过文档也介绍的比较详细。好了,此次评测就与大家分享到这里,后续再对MYD-C7Z010的外设存储进行深入了解,欢迎指点迷津,谢谢!
VMware安装异常解决.doc (94.5 KB, 下载次数: 3)