S32V平台yocto环境搭建

一、S32V创建yocto编译环境 Link to heading

Ubuntu 12.04 或 14.04 编译主机需要事先执行以下命令安装编译所需包:

1sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath  socat  libsdl1.2-dev
2sudo 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 
3sudo apt-get install uboot-mkimage 	# Ubuntu 12.04 host setup 
4sudo apt-get install u-boot-tools 	# Ubuntu 14.04 host setup 
5sudo apt-get install python		# python 2.x - 2.6 or newer
6sudo apt-get install git		# git 1.8.3 or newer
7sudo apt-get install curl		#  curl

安装repo工具 Link to heading

1mkdir ~/bin 	# this step may not be needed if the bin folder already exists
2curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
3curl https://storage.googleapis.com/git-repo-downloads/repo  > ~/bin/repo
4chmod a+x ~/bin/repo
5export PATH=~/bin:$PATH

下载yocto环境 Link to heading

1mkdir fsl-auto-yocto-bsp
2cd fsl-auto-yocto-bsp
3# 19.0版本:
4repo init -u https://source.codeaurora.org/external/autobsps32/auto_yocto_bsp -b alb/master
5# 23.0版本:
6repo init -u https://source.codeaurora.org/external/autobsps32/auto_yocto_bsp -b release/bsp23.0 --repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
7repo sync

配置yocto环境 Link to heading

11.First time setup
2	./sources/meta-alb/scripts/host-prepare.sh
3
42.Creating Build Directories and Testing the Installation
5Now you can create a build directory in the SDK root with:
6	source nxp-setup-alb.sh -m <machine>
1、执行./sources/meta-alb/scripts/host-prepare.sh Link to heading

正常编译的日志信息:

 1Verifying sudo permission to execute apt-get command.
 2Now we're going to install all the other development packages needed to build Yocto, please wait
 3Reading package lists... Done
 4Building dependency tree       
 5Reading state information... Done
 6build-essential is already the newest version.
 7chrpath is already the newest version.
 8debianutils is already the newest version.
 9diffstat is already the newest version.
10gawk is already the newest version.
11libncurses5-dev is already the newest version.
12make is already the newest version.
13python is already the newest version.
14python3 is already the newest version.
15screen is already the newest version.
16texinfo is already the newest version.
17tofrodos is already the newest version.
18xterm is already the newest version.
19xz-utils is already the newest version.
20libstring-crc32-perl is already the newest version.
21socat is already the newest version.
22cpio is already the newest version.
23curl is already the newest version.
24git-core is already the newest version.
25iputils-ping is already the newest version.
26libsdl1.2-dev is already the newest version.
27python3-pexpect is already the newest version.
28unzip is already the newest version.
29vim-common is already the newest version.
30wget is already the newest version.
31python3-pip is already the newest version.
32The following packages were automatically installed and are no longer required:
33  binutils-aarch64-linux-gnu cpp-4.8-aarch64-linux-gnu cpp-aarch64-linux-gnu
34  gcc-4.8-aarch64-linux-gnu-base libatomic1-arm64-cross libc6-armel-cross
35  libc6-dbg libgcc-4.8-dev-arm64-cross libgcc1-arm64-cross
36  libgomp1-arm64-cross libitm1-arm64-cross linux-libc-dev-armel-cross
37Use 'apt-get autoremove' to remove them.
380 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
39-e 
40Done. You're ready to go with Yocto build now
2、执行./source nxp-setup-alb.sh -m s32v234evb Link to heading

正常编译的日志信息:

 1Configuring for s32v234evb and distro fsl-auto...
 2
 3Proprietary and third party software is subject to agreement and compliance
 4with, NXP's End User License Agreement. To have the right to use these
 5binaries in your images, you must read and accept the following terms.  If
 6there are conflicting terms embedded in the software, the terms embedded in
 7the Software will control.
 8
 9Do you accept the EULA you just read? (y/n) y
10EULA has been accepted.
11Welcome to NXP Auto Linux BSP (Reference Distro)
12
13The Yocto Project has extensive documentation about OE including a
14reference manual which can be found at:
15    http://yoctoproject.org/documentation
16
17For more information about OpenEmbedded see their website:
18    http://www.openembedded.org/
19
20You can now run 'bitbake <target>'
21
22Targets specific to NXP:
23    fsl-image-mfgtool-initramfs
24    fsl-image-auto
25    fsl-image-base
26    fsl-image-base-fit
27    fsl-image-bluebox
28    fsl-image-blueboxbootflash
29    fsl-image-blueboxdt
30    fsl-image-blueboxls2sdfactory
31    fsl-image-fit
32    fsl-image-flash
33    fsl-image-itbflash
34    fsl-image-nfs-initramfs
35    fsl-image-sim
36    fsl-image-ubuntu-base
37    fsl-image-ubuntu
38    fsl-image-ubuntu-ros
39To return to this build environment later please run:
40    . /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/SOURCE_THIS

编译yocto环境 Link to heading

1bitbake fsl-image-auto

下载的一些源码都在目录:/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/source 编译的共享机制的缓存包都在目录:/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sstate-cache

这个缓存包可以加快后面的编译过程,他记录了哪些pack需要重新编译,哪些不要重新编译。

 1# kernel源码路径:
 2~/build_s32v234evb/tmp/work/s32v234evb-fsl-linux/linux-s32/4.19-r0/git
 3~/build_s32v234evb/tmp/work/s32v234evb-fsl-linux/linux-s32/4.19-r0/build
 4
 5# u-boot源码路径:
 6~/build_s32v234evb/tmp/work/s32v234evb-fsl-linux/u-boot-s32/2018.07-r0/git
 7
 8# rootfs源码路径:
 9~/build_s32v234evb/tmp/work/s32v234evb-fsl-linux/fsl-image-auto/1.0-r0/rootfs
10
11# 交叉编译工具链路径:
12~/build_s32v234evb/tmp/work/s32v234evb-fsl-linux/fsl-image-auto/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-fsl-linux

编译交叉编译链 Link to heading

1bitbake fsl-image-auto -c populate_sdk

生成的交叉编译连安装包路径:

1ubuntu@ubuntu:~/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/tmp/deploy/sdk$ ls
2fsl-auto-glibc-x86_64-aarch64-toolchain-1.0.host.manifest  fsl-auto-glibc-x86_64-aarch64-toolchain-1.0.target.manifest
3fsl-auto-glibc-x86_64-aarch64-toolchain-1.0.sh             fsl-auto-glibc-x86_64-aarch64-toolchain-1.0.testdata.json

添加GPU驱动支持 Link to heading

 1Please download the Vivante GPU drivers from nxp.com.
 2To add GPU drivers to S32V234 rootfs, follow the steps as below:
 3
 4- Add the following line in your chosen image script (e.g. meta-alb/recipes-fsl/images/fsl-image-auto.bb):
 5    IMAGE_INSTALL += "gpu-viv-bin-s32v2xx"
 6- You also need to confirm that you accept NXP's EULA by adding the following to the build folder's conf/local.conf
 7  (e.g. build_s32v234evb/conf/local.conf):
 8    ACCEPT_FSL_EULA = "1"
 9- Use FSL_LOCAL_MIRROR variable to locate the GPU drivers previously downloaded. FSL_LOCAL_MIRROR
10   should be updated as below (e.g. build_s32v234evb_release/conf/local.conf):
11     FSL_LOCAL_MIRROR = "file:///home/ubuntu/nxp-release-bsp-s32v234_evb19.0/binaries_gpu_userspace_vtk_6.2.4/GPU_userspace_binaries_and_VTK_tools_6.2.4/Vivante_userspace_libraries_and_demos"
12     DISTRO_FEATURES_DEFAULT_append = " gpu"

下载gpu-viv-bin-s32v234-6.2.4.p2-hardfp.run文件放在以下目录:

1/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/downloads/Vivante_userspace_libraries_and_demos
2/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/binaries_gpu_userspace_vtk_6.2.4/GPU_userspace_binaries_and_VTK_tools_6.2.4/Vivante_userspace_libraries_and_demos

不要带目录:Vivante_userspace_libraries_and_demos

添加glmark2驱动支持 Link to heading

1In order to include glmark2 into the image, the following steps are necesarry:
21.Add the following line in sources/meta-alb/conf/distro/fsl-auto.conf :
3DISTRO_FEATURES_append = " gpu"
42.Add the following line in sources/meta-alb/recipes-fsl/images/fsl-image-auto.bb:
5IMAGE_INSTALL_append = " glmark2 gpu-viv-bin-s32v2xx kernel-module-galcore"

添加glmark2的yocto配置:

1mkdir -p sources/meta-alb/recipes-patched/glmark2
2touch sources/meta-alb/recipes-patched/glmark2/glmark2_git.bbappend
3echo "SRC_URI += \" https://portland.source.codeaurora.org/patches/external/autobsps32/misc/glmark2/glmark2-2017.07/compatibility_with_fbdev.patch\"" >> sources/meta-alb/recipes-patched/glmark2/glmark2_git.bbappend
4echo "PACKAGECONFIG_s32v2xx = \"x11-gles2\"" >> sources/meta-alb/recipes-patched/glmark2/glmark2_git.bbappend
5echo "CXXFLAGS += \"-fpermissive\"" >> sources/meta-alb/recipes-patched/glmark2/glmark2_git.bbappend

二、编译过程中问题记录与解决办法 Link to heading

安装repo问题: Link to heading

1	curl: (35) gnutls_handshake() failed: Error in the pull function.

解决方法:重新安装curl

执行repo init 问题: Link to heading

1Downloading Repo source from https://gerrit.googlesource.com/git-repo
2fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
3fatal: error [Errno 101] Network is unreachable
4fatal: cloning the git-repo repository failed, will remove '.repo/repo' 

解决方法:为repo设置国内镜像更新地址。

--repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

1repo init -u https://source.codeaurora.org/external/autobsps32/auto_yocto_bsp -b alb/master \ 
2--repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

正常的日志信息:

 1Get https://gerrit-googlesource.lug.ustc.edu.cn/git-repo/clone.bundle
 2Get https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
 3remote: Counting objects: 1, done
 4remote: Finding sources: 100% (36/36)
 5remote: Total 36 (delta 6), reused 36 (delta 6)
 6Unpacking objects: 100% (36/36), done.
 7From https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
 8   cfc8111..2735bfc  master     -> origin/master
 9   d957ec6..3e5b269  stable     -> origin/stable
10 * [new tag]         v2.5       -> v2.5
11warning: 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo' does not look like a git-repo repository, is REPO_URL set correctly?
12repo: warning: Python 2 is no longer supported; Please upgrade to Python 3.6+.
13
14... A new version of repo (2.5) is available.
15... You should upgrade soon:
16    cp /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/.repo/repo/repo /sbin/repo
17
18repo: Updating release signing keys to keyset ver 2.3
19Downloading manifest from https://source.codeaurora.org/external/autobsps32/auto_yocto_bsp
20remote: Enumerating objects: 252, done.
21remote: Counting objects: 100% (252/252), done.
22remote: Compressing objects: 100% (252/252), done.
23remote: Total 594 (delta 178), reused 0 (delta 0)
24Receiving objects: 100% (594/594), 76.45 KiB | 98.00 KiB/s, done.
25Resolving deltas: 100% (347/347), done.
26
27Your identity is: none <NULL>
28If you want to change this, please re-run 'repo init' with --config-name
29
30repo has been initialized in /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp

执行repo sync问题: Link to heading

1repo: warning: Python 2 is no longer supported; Please upgrade to Python 3.6+.
2
3... A new version of repo (2.5) is available.
4... You should upgrade soon:

解决方法:暂时没有更新,这一步可以正常完成,不知后面是否会出错。

正常的日志信息:

 1repo: warning: Python 2 is no longer supported; Please upgrade to Python 3.6+.
 2
 3... A new version of repo (2.5) is available.
 4... You should upgrade soon:
 5    cp /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/.repo/repo/repo /sbin/repo
 6
 7remote: Enumerating objects: 32065, done.
 8remote: Counting objects: 100% (32065/32065), done.
 9remote: Compressing objects: 100% (10586/10586), done.
10remote: Enumerating objects: 472391, done.
11remote: Counting objects: 100% (472391/472391), done.
12remote: Compressing objects: 100% (111604/111604), done.
13remote: Total 472391 (delta 353626), reused 471860 (delta 353241)
14Receiving objects: 100% (472391/472391), 162.69 MiB | 5.49 MiB/s, done.
15Resolving deltas: 100% (353626/353626), done.iB | 53.00 KiB/s   
16remote: Enumerating objects: 3366, done.
17remote: Counting objects: 100% (3366/3366), done.
18remote: Compressing objects: 100% (1617/1617), done.
19remote: Total 6968 (delta 2061), reused 2853 (delta 1642)
20Receiving objects: 100% (6968/6968), 1.95 MiB | 80.00 KiB/s, done.
21Resolving deltas: 100% (3979/3979), done.
22remote: Counting objects: 10691, done.
23remote: Compressing objects: 100% (6660/6660), done.
24remote: Total 10691 (delta 5766), reused 6815 (delta 3444)
25Receiving objects: 100% (10691/10691), 3.05 MiB | 258.00 KiB/s, done.
26Resolving deltas: 100% (5766/5766), done.
27remote: Enumerating objects: 2141, done.
28remote: Counting objects: 100% (2141/2141), done.
29remote: Compressing objects: 100% (1148/1148), done.
30remote: Total 6545 (delta 1012), reused 1871 (delta 831)
31Receiving objects: 100% (6545/6545), 8.15 MiB | 164.00 KiB/s, done.
32Resolving deltas: 100% (3027/3027), done.
33remote: Enumerating objects: 7530, done.
34remote: Counting objects: 100% (7530/7530), done.
35remote: Compressing objects: 100% (2986/2986), done.
36remote: Total 7530 (delta 4478), reused 7217 (delta 4291)
37Receiving objects: 100% (7530/7530), 1.52 MiB | 1.18 MiB/s, done.
38Resolving deltas: 100% (4478/4478), done.
39remote: Enumerating objects: 4984, done.
40remote: Counting objects: 100% (4984/4984), done.
41remote: Compressing objects: 100% (2184/2184), done.
42remote: Total 32065 (delta 18244), reused 31393 (delta 17856)
43Receiving objects: 100% (32065/32065), 42.06 MiB | 25.00 KiB/s, done.
44Resolving deltas: 100% (18244/18244), done.
45remote: Total 4984 (delta 2624), reused 4674 (delta 2472)
46Receiving objects: 100% (4984/4984), 3.75 MiB | 8.00 KiB/s, done.
47Resolving deltas: 100% (2624/2624), done.
48Fetching projects: 100% (8/8), done.
49Checking out projects: 100% (8/8), done.
50repo sync has finished successfully.

缺少realpath与mcopy支持问题: Link to heading

1ERROR: Unable to start bitbake server (None)
2ERROR: Server log for this session (/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/bitbake-cookerdaemon.log):
3--- Starting bitbake server pid 31154 at 2020-04-14 11:39:07.433147 ---
4ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
5realpath mcopy

解决方法:安装realpathmcopy

1sudo apt-get install realpath
2sudo apt-get update
3sudo apt-get upgrade
4sudo apt-get install mcopy
5
6# 上面这个三步不成功,执行下面的安装来安装 mcopy
7sudo apt-get install mtools

源码包fetch失败: Link to heading

可以将单独下载的源码包。

源码包中会有一个.git的文件夹,这个就是我们的git仓库,其中 objects/pack/ 下面有我们需要的代码压缩包,其他的文件都是一些配置信息文件,我们每次 git clone 时间长其实都是这个pack的下载慢导致的;

内核源码: Link to heading

sources/meta-alb/recipes-kernel/linux/linux-s32_4.19.bb

1SRC_URI = "git://source.codeaurora.org/external/autobsps32/linux;protocol=https;branch=alb/master"
2SRCREV = "9e4aaf669f3a9eff0073587f817b66e8ad4d5fbc"
3
4git clone https://source.codeaurora.org/external/autobsps32/linux -b alb/master
uboot源码: Link to heading

sources/meta-alb/recipes-bsp/u-boot/u-boot-s32_2018.07.bb

1SRC_URI_prepend = "git://source.codeaurora.org/external/autobsps32/u-boot;protocol=https;bran
2SRCREV = "f4d904327e7d7f807bfcbfe5312eea92875c37cc"
3
4git clone https://source.codeaurora.org/external/autobsps32/u-boot -b v2018.07_bsp19.0
1ubuntu@ubuntu:~/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/downloads/git2/source.codeaurora.org.external.autobsps32.linux$ ls objects/pack/ -lh
2total 1.6G
3-r--r--r-- 1 ubuntu ubuntu 227M Apr 28 15:37 pack-da29e05dac61b8215c6be653907ed1d07cda7a66.idx
4-r--r--r-- 1 ubuntu ubuntu 1.4G Apr 28 15:36 pack-da29e05dac61b8215c6be653907ed1d07cda7a66.pack
5
6ubuntu@ubuntu:~/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/downloads/git2/source.codeaurora.org.external.autobsps32.u-boot$ ls objects/pack/ -lh
7total 132M
8-r--r--r-- 1 ubuntu ubuntu  19M Apr 28 15:51 pack-ccc1bc02bd43c962d4b46588e3289633ea6a0b94.idx
9-r--r--r-- 1 ubuntu ubuntu 114M Apr 28 15:51 pack-ccc1bc02bd43c962d4b46588e3289633ea6a0b94.pack

直接将下载的pack压缩包放到yocto的对应目录里。

其他需要下载的源码包: Link to heading
 1# file
 2git://github.com/file/file.git
 3
 4# icu、mesa
 5http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz
 6https://mesa.freedesktop.org/archive/mesa-19.1.6.tar.xz
 7
 8# libical、libnl、libidn
 9https://github.com/libical/libical/releases/download/v3.0.6/libical-3.0.6.tar.gz
10https://github.com/thom311/libnl/releases/download/libnl3_5_0/libnl-3.5.0.tar.gz
11https://ftp.gnu.org/gnu/libidn/libidn2-2.2.0.tar.gz
12
13# rpm-software-management、ImageMagick
14http://downloads.yoctoproject.org/mirror/sources/git2_github.com.rpm-software-management.createrepo_c.tar.gz
15http://downloads.yoctoproject.org/mirror/sources/git2_github.com.rpm-software-management.dnf.git.tar.gz
16http://downloads.yoctoproject.org/mirror/sources/git2_git.denx.de.u-boot.git.tar.gz
17http://downloads.yoctoproject.org/mirror/sources/git2_github.com.ImageMagick.ImageMagick.git.tar.gz

下载上面的源代码,放到 /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/download 目录;如果后面执行do_fetch如果还在下载的话,将压缩包解压到 fsl-auto-yocto-bsp/download/git2/相应的目录,并新建pack*.done的文件。

配置bind问题: Link to heading

 1Sstate summary: Wanted 12 Found 0 Missed 12 Current 1447 (0% match, 99% complete)
 2NOTE: Executing Tasks
 3NOTE: Setscene tasks completed
 4ERROR: bind-9.11.5-P4-r0 do_configure: QA Issue: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
 5Rerun configure task after fixing this. [configure-unsafe]
 6ERROR: bind-9.11.5-P4-r0 do_configure: Fatal QA errors found, failing task.
 7ERROR: Logfile of failure stored in: /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/tmp/work/aarch64-fsl-linux/bind/9.11.5-P4-r0/temp/log.do_configure.16682
 8ERROR: Task (/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb:do_configure) failed with exit code '1'
 9NOTE: Tasks Summary: Attempted 4007 tasks of which 4006 didn't need to be rerun and 1 failed.
10
11Summary: 1 task failed:
12  /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb:do_configure
13Summary: There was 1 WARNING message shown.
14Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

修改bind-9.11.5-P4-r0 为BSP23版本里面的 bind-9.10.6;bind可以编译过去;但是dhcp编译出错。

配置dhcp问题: Link to heading

 1 checking for struct msghdr.msg_control... yes
 2| checking for struct tpacket_auxdata.tp_vlan_tci... yes
 3| configure: error: Cannot find bind libraries at /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/tmp/work/aarch64-fsl-linux/dhcp/4.4.1-r0/recipe-sysroot//usr/lib
 4| WARNING: exit code 1 from a shell command.
 5| 
 6ERROR: Task (/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb:do_configure) failed with exit code '1'
 7NOTE: Tasks Summary: Attempted 4017 tasks of which 4000 didn't need to be rerun and 1 failed.
 8
 9Summary: 1 task failed:
10  /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb:do_configure
11Summary: There was 1 WARNING message shown.
12Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

解决办法:同上,将dhcp的bb包换成BSP23版本里面的包,重新编译dhcp。

编译GPU问题: Link to heading

1ERROR: gpu-viv-bin-s32v2xx-1_6.2.4-r0 do_fetch: Fetcher failure for URL: 'file:///home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/downloads/Vivante_userspace_libraries_and_demos/Vivante_userspace_libraries_and_demos/gpu-viv-bin-s32v234-6.2.4.p4-hardfp.run;fsl-eula=true'. Unable to fetch URL from any source.
2ERROR: Logfile of failure stored in: /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/tmp/work/aarch64-fsl-linux/gpu-viv-bin-s32v2xx/1_6.2.4-r0/temp/log.do_fetch.21238
3ERROR: Task (/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/meta-alb/recipes-graphics/gpu-viv-bin-s32v2xx/gpu-viv-bin-s32v2xx_6.2.4.bb:do_fetch) failed with exit code '1'
4NOTE: Tasks Summary: Attempted 2350 tasks of which 2346 didn't need to be rerun and 1 failed.
5
6Summary: 1 task failed:
7  /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/meta-alb/recipes-graphics/gpu-viv-bin-s32v2xx/gpu-viv-bin-s32v2xx_6.2.4.bb:do_fetch

配置文件:sources/meta-alb/recipes-graphics/gpu-viv-bin-s32v2xxgpu-viv-bin-s32v2xx.inc

1FSL_LOCAL_MIRROR ?= "file://."
2
3SRC_URI = "${FSL_LOCAL_MIRROR}/Vivante_userspace_libraries_and_demos/gpu-viv-bin-s32v234-${PV}${PVS}-hardfp.run;fsl-eula=true \
4           file://egl.pc \
5           file://glesv2.pc \
6           file://vg.pc \
7           file://gpu_set_multi_buffer.sh \
8           file://gpu_disable_prefetch.sh \
9          "

如果这个链接没有此源码,可以在S32V的BSP下载资料里下载源码。

BSP21以上的版本为gpu-viv-bin-s32v234-6.2.4.p4-hardfp.run

编译glmark2问题: Link to heading

1NOTE: Setscene tasks completed
2ERROR: glmark2-20190205+AUTOINC+c17fd14505-r0 do_fetch: No checksum specified for /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/downloads/compatibility_with_fbdev.patch, please add at least one to the recipe:
3SRC_URI[md5sum] = "9eb57fc55489b6c6aafb63d0001493e1"
4SRC_URI[sha256sum] = "7ceb87231d0d3f05a9479f687e13227340ed4a0d63661f4ed911e3fea596c5f5"
5ERROR: glmark2-20190205+AUTOINC+c17fd14505-r0 do_fetch: Fetcher failure for URL: 'https://portland.source.codeaurora.org/patches/external/autobsps32/misc/glmark2/glmark2-2017.07/compatibility_with_fbdev.patch'. Missing SRC_URI checksum
6ERROR: Logfile of failure stored in: /home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/build_s32v234evb/tmp/work/aarch64-fsl-linux/glmark2/20190205+AUTOINC+c17fd14505-r0/temp/log.do_fetch.27574
7ERROR: Task (/home/ubuntu/nxp-release-bsp-s32v234_evb19.0/fsl-auto-yocto-bsp/sources/meta-openembedded/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb:do_fetch) failed with exit code '1'
8NOTE: Tasks Summary: Attempted 2556 tasks of which 2555 didn't need to be rerun and 1 failed.

解决办法:手动下载放到Dowloads目录下去。

再次编译又会提示没有指定checksum,在glmark2_git.bbappend文件最后加上即可,如下:

1SRC_URI[md5sum] = "9eb57fc55489b6c6aafb63d0001493e1"

下载gcc失败: Link to heading

 1WARNING: gcc-source-linaro-6.3-linaro-6.3-r2017.05 do_fetch: Failed to fetch URL git://git.linaro.org/toolchain/gcc;protocol=https;nobranch=1, attempting MIRRORS if available
 2ERROR: gcc-source-linaro-6.3-linaro-6.3-r2017.05 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH=".../bitbake/bin:/home/ubuntu/nxp-release-bsp-s32v234_evb22.0/fsl-auto-yocto-bsp/build_s32v234evb28899/tmp/hosttools"; export HOME="/home/ubuntu"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://git.linaro.org/toolchain/gcc /home/ubuntu/nxp-release-bsp-s32v234_evb22.0/fsl-auto-yocto-bsp/downloads/git2/git.linaro.org.toolchain.gcc --progress failed with exit code 128, output:
 3Cloning into bare repository '/home/ubuntu/nxp-release-bsp-s32v234_evb22.0/fsl-auto-yocto-bsp/downloads/git2/git.linaro.org.toolchain.gcc'...
 4remote: Enumerating objects: 9066, done.
 5remote: Counting objects: 100% (9066/9066), done.
 6remote: Compressing objects: 100% (6212/6212), done.
 7error: RPC failed; result=56, HTTP code = 200.61 MiB | 28.00 KiB/s    
 8fatal: The remote end hung up unexpectedly
 9fatal: early EOF
10fatal: index-pack failed
11
12ERROR: gcc-source-linaro-6.3-linaro-6.3-r2017.05 do_fetch: Fetcher failure for URL: 'git://git.linaro.org/toolchain/gcc;protocol=https;nobranch=1'. Unable to fetch URL from any source.
13ERROR: gcc-source-linaro-6.3-linaro-6.3-r2017.05 do_fetch: Function failed: base_do_fetch
14ERROR: Logfile of failure stored in: /home/ubuntu/nxp-release-bsp-s32v234_evb22.0/fsl-auto-yocto-bsp/build_s32v234evb28899/tmp/work-shared/gcc-linaro-6.3-r2017.05/temp/log.do_fetch.21989
15ERROR: Task (/home/ubuntu/nxp-release-bsp-s32v234_evb22.0/fsl-auto-yocto-bsp/sources/meta-linaro/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-6.3.bb:do_fetch) failed with exit code '1'

解决方法:参考链接,修改提交缓存大小为500M,或者更大的数字,还报错的话就继续增大。

1git config --global http.postBuffer 524288000
2git config --global http.postBuffer 1024288000

git clone 问题 Link to heading

1error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
2fatal: the remote end hung up unexpectedly
3fatal: early EOF
4fatal: index-pack failed

git clone较大的工程产生如上报错,查资料应该是由于git默认缓存大小不足导致的。

解决办法:增大缓存空间。

1apt-get install gnutls-bin
2git config --global http.sslVerify false
3git config --global http.postBuffer 1048576000

证书问题: Link to heading

1server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

解决方法:在环境变量中加入export GIT_SSL_NO_VERIFY=1

上面的不好用试试下面的:(直接使用下面的测试OK)

1git config --global http.sslverify false

bitbake执行失败问题: Link to heading

 1ERROR: Unable to start bitbake server
 2ERROR: Last 10 lines of server log for this session (/home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/build_s32v234evb/bitbake-cookerdaemon.log):
 3  File "/home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/parse/__init__.py", line 117, in handle
 4    return h['handle'](fn, data, include)
 5  File "/home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 134, in handle
 6    abs_fn = resolve_file(fn, data)
 7  File "/home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/parse/__init__.py", line 141, in resolve_file
 8    raise IOError(errno.ENOENT, "file %s not found" % fn)
 9FileNotFoundError: [Errno 2] file /home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/meta-freescale/conf/layer.conf not found
10
11ERROR: Unable to parse /home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/meta-freescale/conf/layer.conf: [Errno 2] file /home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/meta-freescale/conf/layer.conf not found
12ERROR: Unable to parse /home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/meta-freescale/conf/layer.conf: [Errno 2] file /home/ubuntu/nxp-release-bsp-s32v234_evb23.0/fsl-auto-yocto-bsp/sources/meta-freescale/conf/layer.conf not found

解决方法:sources/meta-freescale/这个目录为空,删除该目录再重新执行 repo sync,执行之后这个目录就有文件了。

See also in yocto Link to heading