查看: 3021|回复: 5

[盈鹏飞EVB-P6UL试用]可能是地表最方便的开发环境

[复制链接]
  • TA的每日心情
    开心
    2018-8-25 16:46
  • 签到天数: 28 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    发表于 2017-12-20 23:03:51 | 显示全部楼层 |阅读模式
    分享到:
    前言1、搭建开发环境
    以下译自F&S文档:AdvicesForLinuxOnPCQuickstart with FS Development MaschineFSiMX6UL_FirstSteps_eng
    对各种开发板进行开发需要搭建开发环境,而使用Linux异常方便。需要的服务包括:  
    • tftp服务:向开发板下载文件
    • NFS服务:开发过程中网络挂载root文件系统

    1.1 选择Linux发行版
    Linux有着诸多发行版,各有特色,可以在distrowatch.org一探究竟。常用的开发发行版包括ArchLinux、Debian|Ubuntu、openSUSE、Fedora|RedHat|CentOS等,一般的要求包括主流的Linux内核,更新及时、内容丰富的软件仓库等。Fedora和Archlinux比较激进,存在可能的兼容性问题的同时也意味着可以获得最新的软件更新;CentOS和Debian则比较保守,侧重稳定性。比较折中的方案是使用Ubuntu|Minit发行版。一般选择64bit的操作系统。
    1.2 选择桌面环境
    大多数情况下使用CLI环境就可以完成开发,但是图形交互界面GUI也是一种选择。与Windows不同,Linux世界有多种桌面环境可供选择,如Gnome、KDE、Unity、MATE(类似Gnome2)、XFCE、LXDE等,有的华丽有的朴实,选择一个顺手顺眼的即可。本文使用Fedora,如果你不喜欢Gnome的改动,可以从http://spins.fedoraproject.org下载MATE版。Ubuntu可以选择Mint发行版。
    1.3 使用虚拟机或者物理机安装操作系统
    最好的方法是使用一台机器安装Linux,但是我们也可以在Windows系统里使用虚拟机安装Linux,这样开发体验更流畅。这里可以选用免费的虚拟机软件VirtualBox,推荐分配的虚拟磁盘大小为25-100GB,当然越大越好,因为不同版本的root文件系统会占用大量空间,比如想要编译开发使用Yocto,需要至少50GB的空闲空间。虚拟机基本配置就是至少2GB内存,2GB交换空间,存储空间和CPU核心越多越好。安装完毕后需要额外安装VirtualBox Guest Additions以获得更好的体验,注意更新内核后可能需要重新安装。网络模式建议选择“Bridge Mode”以避免tftp和NFS等服务遇到问题。Gnome3需要3D显示支持,而大多数虚拟机并不支持或支持不好该特性。
    1.4        使用sudo和sudoedit
    默认情况下以标准用户登录Linux,这样可以避免误操作损坏系统软硬件及数据。必要时使用su配合exit执行需要root管理员权限的任务,而sudo命令则省去了这一麻烦。一般包括安装sudo,添加当前用户至sudo用户组,不再赘述。sudoedit也是一种安全的文件编辑选择。
    3        其他有用的设置
    可以修改~/.bashrc或者~/.bash_profile进行配置,如设置alias、proxy、editor等,如果想对所有用户生效,可以新增/etc/profile.d/myconfig.sh文件。
    4        软件安装和更新
    可以安装第三方软件仓库,例如RPM-Fusion for Fedora,Packman for OpenSuse,PPA for Ubuntu,aur for archlinux。
    剩下的就不翻译了,自己去下载看看相关文档。
    5        使用F&S 提供的Fedora 开发环境虚拟机
    从FS下载,然后VirtualBox导入ova文件即可。具体参考使用文档,该方法最简便,大多数依赖包配置都好了,基于Fedora 23 图形环境,你也可以自己搭建CLI 开发环境。
    • 网络使用桥接模式,对于无线网,请参考这篇文章:《VirtualBox与笔记本无线网卡桥接》
    • 账号密码是developer
    • 自带tftp和NFS服务

    当然也可以选择远程VPS:使用MobaXterm+Vbox远程X转发;直接CLI编译。
    2 编译系统简介
    • Hardware
      目标开发板
    • Bootloader
      The bootloader is split into two parts: a small first level loader called NBoot that simply calls the main bootloader and the main bootloader itself, called U-Boot. Uboot activates the hardware, loads the Linux kernel and executes it. Uboot download and install the images for Linux kernel and root filesystem. It can also boot the board from different devices, for example from a server across the network.
    • Linux Kernel
      This is a Linux kernel modified to support our boards. The Linux kernel image is the operating system of the device. It provides the device drivers, filesys-tems, multitasking and all I/O features that the board supports. Beside the kernel there are device trees. The device tree describes the hardware of the platform. It tells the kernel what devices have to be activated. While a kernelimage may be used across different platforms, every platform needs its own device tree file.
    • Root Filesystem
      We use a BuildRoot or Yocto based root filesystem. The root filesystem is the filesystem that you see after the kernel has booted. It contains the userspace programs, services, libraries and configuration files required to run the Linux system and applications. The default root filesystem supplied with the board has a Busybox for starting the system and to provide all standard command line tools, some ALSA tools for sound, gstreamer for audio and video pro-cessing, DirectFB with a few examples, a rudimentary X-Server to show some graphical user interface after startup and of course all the shared libraries like glibc.

    开发环境:
    • 虚拟机中运行的Linux发行版
    • Putty等用于串口调试uboot和linux
    • tftp服务器和NFS服务器

    Windows下:
    • DCUTerm(f&s):通过串口下载Uboot
    • TeraTerm、xShell、Kitty作为Putty的替代品
    • NetDCUUsbLoader (f&s):在NBoot下通过USB下载文件,可以从F&S网站下载
    • tftpd32


    回复

    使用道具 举报

  • TA的每日心情
    难过
    2021-2-27 22:16
  • 签到天数: 1568 天

    连续签到: 1 天

    [LV.Master]伴坛终老

    发表于 2017-12-21 11:28:42 | 显示全部楼层
    这些图标倒是很难认
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-8-25 16:46
  • 签到天数: 28 天

    连续签到: 1 天

    [LV.4]偶尔看看III

     楼主| 发表于 2017-12-21 22:57:07 | 显示全部楼层
    feixiang20 发表于 2017-12-21 11:28
    这些图标倒是很难认

    多用用Linux就熟悉啦~
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2024-1-16 17:48
  • 签到天数: 592 天

    连续签到: 1 天

    [LV.9]以坛为家II

    发表于 2018-3-25 12:56:08 | 显示全部楼层
    1,这篇文章和开发板没关系
    2,帖子标题和内容没关系
    3,是不是原创内容,待定
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-8-25 16:46
  • 签到天数: 28 天

    连续签到: 1 天

    [LV.4]偶尔看看III

     楼主| 发表于 2018-3-27 12:02:31 | 显示全部楼层
    robe.zhang 发表于 2018-3-25 12:56
    1,这篇文章和开发板没关系
    2,帖子标题和内容没关系
    3,是不是原创内容,待定 ...

                                  
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2024-1-16 17:48
  • 签到天数: 592 天

    连续签到: 1 天

    [LV.9]以坛为家II

    发表于 2018-3-27 14:55:07 | 显示全部楼层

    搞点有营养的呀
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条

    手机版|小黑屋|与非网

    GMT+8, 2024-3-29 02:38 , Processed in 0.161544 second(s), 25 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.