虛擬機:VMware® Workstation 14 Pro
系統:Ubuntu 14.04
本文記錄一下環境的配置過程,尤其是linux下代理上網的設置,相關操作方法參考網絡資源,在此記錄一下過程,以便日後參考。
原文鏈接:https://blog.csdn.net/leftfist/article/details/39677133
公司的環境只能通過代理的方式上網,瀏覽器可以設置代理,但虛擬機下需要相應的配置才能正常聯網。
1、進入ubuntu的系統設置,NetWork,設置代理,設置完成後應用到系統
2、代理需要指定用戶名和密碼,需要進一步設置
打開終端,輸入 sudo gedit /etc/environment
打開這個環境配置文件,將代理及賬號、密碼輸入。如
http_proxy="http://account:password@proxyhost:port"
https_proxy="https://account:password@proxyhost:port"
……
如:http_proxy="http://zhangsan:[email protected]:8080"
因爲步驟1完成以後,系統會將代理信息覆蓋到這裏。如果先做步驟2,再做步驟1,那工作成果會被覆蓋掉。
3、set up the proxies for apt-get and Update Manager
終端下,輸入sudo gedit /etc/apt/apt.conf
然後輸入:
Acquire::http::proxy "http://account:password@proxyhost:port";
Acquire::https::proxy "https://account:password@proxyhost:port";
Acquire::ftp::proxy "ftp://account:password@proxyhost:port"";
Acquire::socks::proxy "socks://account:password@proxyhost:port";
注意,上面的文字裏面 proxy 和 後面的網址之間有空格存在。
備註:如果不知道代理服務器的IP,可以使用ping命令來獲取,如 " ping proxy.xxx.com "
通過以上設置,軟件中心,安裝、更新軟件都能順利聯網。
Yocto Project build environment,參考《i.MX Yocto Project User's Guide》
①Essential Yocto Project host packages are:
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev
②i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
③i.MX layers host packages for a Ubuntu 14.04 host setup only are:
$ sudo apt-get install u-boot-tools
④Setting up the repo utility
$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
⑤Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable.
export PATH=~/bin:$PATH
備註:得益於我朝性能極強的防火牆,使用第三方源,從其他途徑獲取源:
1 |
完成後,在 bin 目錄下找到 repo 腳本文件,將其用文本編輯器打開。 找到其中:
一行,將其替換爲:
進行以上操作後,才能夠正常使用repo init 命令進行初始化,以上參考:http://www.ezapk.com/127.html
|
⑥First make sure that git is set up properly with the commands below.
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list
⑦This sets up the recipes that are used to build the project.
$ mkdir fsl-release-bsp
$ cd fsl-release-bsp
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-morty -m imx-4.9.11-1.0.0_ga.xml$ repo sync
但是由於代理還是做了限制,無法訪問github等網址,只能以http的形式訪問git資源。無法通過官方提供Yocto 的方式下載SDK環境,具體解決措施還沒有找到,參考:https://community.nxp.com/thread/435818 。