1、按i.MX Yocto Project User's Guide.pdf里的第节开始,按文档一步步操作,UBNTU版本14.04.6 LTS(ubuntu-14.04.6-desktop-i386.iso),3.1节的操作都能成功,到3.2的curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo 注意要加sudo 才能成功,即 sudo curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
2、第4节中repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml,不能加sudo,并且会报错如下:
root@ubuntu:~/imx-yocto-bsp# repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 111] Connection refused
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
是因为repo里用到https://gerrit.googlesource.com/git-repo/clone.bundle链接,国内网不能访问,把这个下载下来放到目录没找到如何跳过这一步,找了国内的清华链接https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git下载了repo,替换了sudo curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo下载的repo,也export REPO_URL='这个清华链接',也多次删除隐藏目录.repo还是不行,
用https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/链接,命令如下:
sudo curl https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/ > ~/bin/repo下载成功后,重复上面的操作,报错如下:
root@ubuntu:~/imx-yocto-bsp# repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
/root/bin/repo: line 1: syntax error near unexpected token `newline'
/root/bin/repo: line 1: `'
在repo开头加了#!/usr/bin/python还是不行
发现下载repo的命令没对,用 sudo curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo下载成功后,发现与之前下载的repo不一样,用新的repo后报错如下:
gpg: key 920F5C65: public key "Ronley Owens
gpg: Total number processed: 2
gpg: imported: 2 (RSA: 1)
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 104] Connection reset by peer
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
第4节的用户名和邮箱一定要是GITHUB中注册成功的,不然就会报上面的错,修改后,删除.repo目录,重复上面的操作,报错如下:
root@ubuntu:~/imx-yocto-bsp# repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
再次export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'后终于成功了,
3、技术支持说sudo curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo需要在YOCTO下载目录,即
imx-yocto-bsp目录,应该没必要,在~/bin目录下载成功后,chmod +x repo
修改权限,export PATH=~/bin:$PATH后是一样可以的,下载到imx-yocto-bsp目录一样需要将imx-yocto-bsp目录添加到环境变量才能生效
经实际验证确实需要将repo下载到YOCTO下载目录,并设置环境变量
export PATH=~/imx-yocto-bsp:$PATH,具体原因待分析,
放在~/bin目录下,export PATH=~/bin:$PATH后,在~/imx-yocto-bsp下 repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml会报错如下:
fatal: Cannot get https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/clone.bundle
fatal: error [Errno 111] Connection refused
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
4、第4节中repo sync时报错
root@ubuntu:~/imx-yocto-bsp# repo sync
Fetching project poky
Fetching project meta-openembedded
remote: Enumerating objects: 304, done.
remote: Counting objects: 100% (304/304), done.
remote: Compressing objects: 100% (211/211), done.
remote: Counting objects: 451426, done.
remote: Compressing objects: 100% (106924/106924), done.
fatal: read error: Connection reset by peer0 KiB | 2.00 KiB/s
fatal: early EOF
fatal: index-pack failed
remote: Enumerating objects: 304, done.
第2次报错:
* [new tag] 2.2 -> 2.2
Fetching projects: 88% (8/9)
58 14.3M 58 8607k 0 0 2035 0 2:03:01 1:12:09 0:50:52 0
curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
完成后再次repo sync,结果如下:
root@ubuntu:~/imx-yocto-bsp# repo sync
Fetching project meta-freescale-distro
Fetching project meta-openembedded
Fetching projects: 11% (1/9)
Fetching project meta-qt5
Fetching projects: 22% (2/9)
Fetching project poky
Fetching projects: 33% (3/9)
Fetching project meta-browser
Fetching projects: 44% (4/9)
Fetching project meta-freescale
Fetching projects: 55% (5/9)
Fetching project fsl-community-bsp-base
Fetching projects: 66% (6/9)
Fetching project meta-fsl-bsp-release
Fetching projects: 77% (7/9)
Fetching project meta-freescale-3rdparty
Fetching projects: 88% (8/9)
Fetching projects: 100% (9/9)
Fetching projects: 100% (9/9), done.
Checking out project fsl-community-bsp-base
Checking out project meta-browser
Checking out project meta-freescale
Checking out project meta-freescale-3rdparty
Checking out project meta-freescale-distro
Checking out project meta-fsl-bsp-release
Checking out project meta-openembedded
Checking out project meta-qt5
Checking out project poky
~/imx-yocto-bsp目录内容如下:
root@ubuntu:~/imx-yocto-bsp# ls
fsl-setup-release.sh README README-IMXBSP repo setup-environment sources
5、DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-wayland报不能用root用户,但还是能继续执行,先忽略,完成后bitbake fsl-image-qt5-validation-imx报错如下:
root@ubuntu:~/imx-yocto-bsp# bitbake fsl-image-qt5-validation-imx
ERROR: Unable to start bitbake server
ERROR: Last 10 lines of server log for this session (/root/imx-yocto-bsp/bitbake-cookerdaemon.log):
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/root/imx-yocto-bsp/sources/poky/bitbake/lib/bb/cooker.py", line 197, in __init__
self.initConfigurationData()
File "/root/imx-yocto-bsp/sources/poky/bitbake/lib/bb/cooker.py", line 356, in initConfigurationData
self.databuilder.parseBaseConfiguration()
File "/root/imx-yocto-bsp/sources/poky/bitbake/lib/bb/cookerdata.py", line 316, in parseBaseConfiguration
raise bb.BBHandledException
bb.BBHandledException
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
chrpath gawk makeinfo
尝试加清华链接和repo目录环境变量也不行,按网上说的
sudo apt-get install chrpath
sudo apt-get install texinfo
sudo apt-get install realpath
也不行,直接重新装
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev
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
sudo apt-get install u-boot-tools
用root用户DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-wayland也提示不能用root用户,忽略,到bitbake fsl-image-qt5-validation-imx报不能用root用户,不能往下执行了,换普通用户,报不能写入EULA,查看/root/imx-yocto-bsp/sources/meta-freescale/EULA文件权限是root用户,root组,只有root用户是读写权限,其他只有读权限,修改为666,即都有读写权限,重新执行DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-wayland没报不能写入EULA了,执行bitbake fsl-image-qt5-validation-imx,可以了,但报
WARNING: Host distribution "ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
可能是版本问题,先忽略
6、执行repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
repo sync用普通用户,DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-wayland时也用普通用户就不会报不能写入EULA文件了
经验:尽量用普通用户操作