yocto源码下载

1、首先下载repo

mkdir ~/bin (this step may not be needed if the bin folder already exists)
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

因为国内防火墙的原因,把repo 的url 地址改为国内

REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'

2、再根目录下新建bin文件加。把repo 文件放入bin下,执行下面的命令

mkdir ~/bin
cp repo ~/bin
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH

3、如果第一次下载使用git ,需要配置git 相关的环境变量

 git config --global user.name "Your Name"
 git config --global user.email "Your Email"
 git config --list

4、下载源码

mkdir imx-yocto-bsp
cd imx-yocto-bsp
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m   imx-4.14.98-2.0.0_ga.xml
repo sync

下载和同步时间比较长,

error: command ‘git://git.freescale.com/imx/fsl-arm-yocto-bsp.git’ requires repo to be installed first.
Use “repo init” to install it here.

需要替换 /etc/hosts
就可以正常下载了

你可能感兴趣的:(linux,系统命令)