Tuesday, June 22, 2021

Yocto Build issue solution for building mali libraries

I was trying my hands at Yocto and was having some success. Then one day I got stuck building the mali libs and it turned out there's a non-working URL behind this.

The error was like below:

**************************************

ERROR: libmali-xlnx-r7p0-00rel0-r0 do_fetch: Fetcher failure for URL: 'git://gitenterprise.xilinx.com/Graphics/mali400-xlnx-userspace.git;protocol=https;branch=master'. Unable to fetch URL from any source.

From a linux prompt, I try:  git clone https://gitenterprise.xilinx.com/Graphics/mali400-xlnx-userspace.git/


Cloning into 'mali400-xlnx-userspace'...
fatal: unable to access 'https://gitenterprise.xilinx.com/Graphics/mali400-xlnx-userspace.git/': Could not resolve host: gitenterprise.xilinx.com

**************************************

I googled some and found that there are some solutions. Further search led me to this solution at:

https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-Yocto-rel-v2019-1-build-fails-due-to-mali400-xlnx/td-p/985157

The solution is as below:

$ mkdir <yocto-project-directory>
$ cd <yocto-project-directory>
$ repo init -u git://github.com/Xilinx/yocto-manifests -b rel-v2019.1$ repo sync$ repo start rel-v2019.1 --all
$ source setupsdk
# Note: Download the mali libraries from https://www.xilinx.com/products/design-tools/embedded-software/petalinux-sdk/arm-mali-400-software-download.html
$ cd <path-to>/mali-400-userspace.tar$ tar -xvf mali-400-userspace.tar
$ tar -xvf mali/rel-v2019.1/downloads-mali.tar$ ls mali/rel-v2019.1/downloads-mali/git2_gitenterprise.xilinx.com.Graphics.mali400-xlnx-userspace.git.tar.gz$ mkdir -p <yocto-project-directory>/mali-downloads$ cp mali/rel-v2019.1/downloads-mali/git2_gitenterprise.xilinx.com.Graphics.mali400-xlnx-userspace.git.tar.gz <yocto-project-directory>/mali-downloads
$ echo 'SOURCE_MIRROR_URL ?= "file:///<yocto-project-directory>/mali-downloads"' >> conf/local.conf $ echo 'INHERIT += "own-mirrors"' >> conf/local.conf
$ bitbake libmali-xlnx -c cleansstateLoading cache: 100% |########################################################################################################################################################################| Time: 0:00:00Loaded 3808 entries from dependency cache.Parsing recipes: 100% |######################################################################################################################################################################| Time: 0:00:03Parsing of 2774 .bb files complete (2772 cached, 2 parsed). 3809 targets, 149 skipped, 0 masked, 0 errors.NOTE: Resolving any missing task queue dependenciesBuild Configuration:BB_VERSION = "1.40.0"BUILD_SYS = "x86_64-linux"NATIVELSBSTRING = "universal"TARGET_SYS = "aarch64-xilinx-linux"MACHINE = "zcu106-zynqmp"DISTRO = "petalinux"DISTRO_VERSION = "2019.1"TUNE_FEATURES = "aarch64"TARGET_FPU = ""meta meta-poky = "rel-v2019.1:7499683610483cdb05ed35f2173cd96b6dd5852f"meta-perl meta-python meta-filesystems meta-gnome meta-multimedia meta-networking meta-webserver meta-xfce meta-initramfs meta-oe = "rel-v2019.1:d2e6a2d13cfe30cb729c1089030f57fb3f3e45ad"meta-browser = "rel-v2019.1:d7e5fab5ec331edede71da7829d4b0d9bfc80ba4"meta-qt5 = "rel-v2019.1:fb4ef4dd7bccfb53a5186c031105ea29320420ce"meta-xilinx-bsp meta-xilinx-contrib = "rel-v2019.1:f4c53cc332397b5e5ee17f42169f7c87808c9dc7"meta-xilinx-tools = "rel-v2019.1:881132b62dc01e57b8d9ace458a0005528179e14"meta-petalinux = "rel-v2019.1:5d9a1b621c8198e7b5b87b18dc124877787bb309"meta-virtualization = "rel-v2019.1:6743df6e68c8fa145a6472bac81a87b57f19f84d"meta-openamp = "rel-v2019.1:e27cba5e58a4022a7c37a94bc6f9900cef4c717c"Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:00NOTE: Executing RunQueue TasksNOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.NOTE: Writing buildhistory$
$ bitbake libmali-xlnx -c unpackParsing recipes: 100% |######################################################################################################################################################################| Time: 0:01:49Parsing of 2774 .bb files complete (0 cached, 2774 parsed). 3809 targets, 149 skipped, 0 masked, 0 errors.NOTE: Resolving any missing task queue dependenciesBuild Configuration:BB_VERSION = "1.40.0"BUILD_SYS = "x86_64-linux"NATIVELSBSTRING = "universal"TARGET_SYS = "aarch64-xilinx-linux"MACHINE = "zcu106-zynqmp"DISTRO = "petalinux"DISTRO_VERSION = "2019.1"TUNE_FEATURES = "aarch64"TARGET_FPU = ""meta meta-poky = "rel-v2019.1:7499683610483cdb05ed35f2173cd96b6dd5852f"meta-perl meta-python meta-filesystems meta-gnome meta-multimedia meta-networking meta-webserver meta-xfce meta-initramfs meta-oe = "rel-v2019.1:d2e6a2d13cfe30cb729c1089030f57fb3f3e45ad"meta-browser = "rel-v2019.1:d7e5fab5ec331edede71da7829d4b0d9bfc80ba4"meta-qt5 = "rel-v2019.1:fb4ef4dd7bccfb53a5186c031105ea29320420ce"meta-xilinx-bsp meta-xilinx-contrib = "rel-v2019.1:f4c53cc332397b5e5ee17f42169f7c87808c9dc7"meta-xilinx-tools = "rel-v2019.1:881132b62dc01e57b8d9ace458a0005528179e14"meta-petalinux = "rel-v2019.1:5d9a1b621c8198e7b5b87b18dc124877787bb309"meta-virtualization = "rel-v2019.1:6743df6e68c8fa145a6472bac81a87b57f19f84d"meta-openamp = "rel-v2019.1:e27cba5e58a4022a7c37a94bc6f9900cef4c717c"Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:00NOTE: Executing RunQueue TasksNOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.NOTE: Writing buildhistory$


Last some tweaks:
[06/20/2019 15:44:51] sandeepg@WTSUBUNTU40:~/yocto/2019.1/yp-workspace/build-zcu106$ tail -n 3 conf/local.conf
CONF_VERSION = "1"

PREMIRRORS_prepend = " git://.*/.* file:///home/sandeepg/yocto/2019.1/mali-downloads \n"
[06/20/2019 15:48:50] sandeepg@WTSUBUNTU40:~/yocto/2019.1/yp-workspace/build-zcu106$
[06/20/2019 15:48:56] sandeepg@WTSUBUNTU40:~/yocto/2019.1/yp-workspace/build-zcu106$ bitbake libmali-xlnx -c cleansstate
[06/20/2019 15:51:22] sandeepg@WTSUBUNTU40:~/yocto/2019.1/yp-workspace/build-zcu106$ bitbake libmali-xlnx -c unpack

With this solution I could build the mali lib.


No comments:

Post a Comment