主机安装
A Yocto Project build requires that some packages be installed for
Essential Yocto Project host packages are:
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib
build-essential chrpath socat cpio python python3 python3-pip
python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2
libegl1-mesa libsdl1.2-dev pylint3 xterm rsync curl zstd pzstd lz4c lz4 libssl-dev
安装repo
- Create a bin folder in the home directory.
$ mkdir ~/bin
$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-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
下载YOCTO工程
1、 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
2、下载分支步骤说明 https://github.com/nxp-imx/imx-manifest
$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.52-2.1.0.xml
–repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
$ repo sync
错误解决
(过程报fatal: unable to access ‘https://github.com/Freescale/fsl-community-bsp-base/)
解决:ping github.com 不通的话,设置代理IP
export REPO_URL=“https://mirrors.tuna.tsinghua.edu.cn/git/git-repo”
git config --global url.“https://”.insteadOf git://
git config --global credential.helper store
git config --global http.proxy
git config --global https.proxy localhost:51525
git config --global http.sslVerify “false”
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
grep “https://github.com” -rl .repo
将搜索到xxxxxx里的https://github.com替换为git://github.com
sed -i ‘s#https://github.com#git://github.com#g’ xxxxxxx
repo sync
报错后重复grep “https://github.com” -rl .repo
再替换https 为git 直到进度完成。
repo sync has finished successfully.