Difference between revisions of "Yocto build system FAQs"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "{{InfoBoxTop}} {{Applies To Yocto}} {{InfoBoxBottom}} ==Introduction== TBD ==FAQs== ===Q: TBD?===")
 
(FAQs)
 
(7 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
 
==Introduction==
 
==Introduction==
TBD
+
This page provides includes a list of general FAQs related to the use of Yocto on the DAVE Embedded System's products.
 +
 
 
==FAQs==
 
==FAQs==
===Q: TBD?===
+
 
 +
===Q: Why does smart return error: Failed acquiring release file for '<channel_name>': when used over https ?===
 +
Although smart is capable of handling https connections, this error is caused by the SSL_CERTIFICATE issue that is affecting yocto build system. For more information, you can refer to this [https://lists.yoctoproject.org/pipermail/yocto/2015-July/025774.html discussion]. <br>
 +
 
 +
At the moment we are still working on this issue in the attempt to find a permanent solution. Unfortunately, the SSL_CERTIFICATE problem also affects other tools for which a temporary workaround is provided.
 +
 
 +
===Q:<span id="Q2"></span> Why does pip return There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skipping ?===
 +
 
 +
In order to solve this problem, a possible workaround consist of disabling the SSL CERTIFICATE checking as suggested in the following example:<br>
 +
''pip install pyserial --trusted-host pypi.python.org --index-url=<nowiki>http://pypi.python.org/simple/</nowiki>'' <br>
 +
Other similar solutions can be found at this [https://stackoverflow.com/questions/34615693/can-i-turn-off-python-pip-ssl-cert-validation-with-an-env-variable page ]
 +
 
 +
'''Note:''' In the case that the time on your system is out of sync, please adjust the date and time and make another attempt to install the package. A wrong system date/time may cause the verification process to fail.
 +
 
 +
===Q:<span id="Q3"></span> How can I turn off git SSL verification? ===
 +
 
 +
Since the SSL_CERTIFICATE problem affects also 'git', it is suggested to turn off the SSL CERTIFICATE checking in the case you are trying to work with a repository over https. In order to achieve this, from the local folder export the GIT_SSL_NO_VERIFY variable, in this way:
 +
''export GIT_SSL_NO_VERIFY=1''
 +
 
 +
===Q: How to graphically visualize the dependencies of an image?===
 +
 
 +
During the implementation of the production root file system image, it is convenient to graphically visualize the dependencies of the packages used in the development image (see also [[Working_with_the_Yocto_build_system#Introduction|this section]]).
 +
 
 +
To do that, issue the following command:
 +
 
 +
<pre class="board-terminal">
 +
bitbake -g <image_name>
 +
</pre>
 +
 
 +
This command produces a <code>recipe-depends.dot</code> file which can be visualized with the [http://www.graphviz.org/ <code>graphviz</code> tool].
 +
 
 +
===Q:How to solve <code>fatal: the '--set-upstream' option is no longer supported</code> bitbake error? ===
 +
 
 +
Using recent <code>git</code> versions (>2.14.1) with old Yocto releases (e.g. <code>krogoth</code> and older) lead to the following error during <code>do_unpack</code> task of packages downloading sources with git:
 +
 
 +
<pre class="board-terminal">
 +
ERROR: PACKAGE do_unpack: Fetcher failure: ...;
 +
git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master failed with exit code 128, output:
 +
fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.
 +
 
 +
ERROR: PACKAGE do_unpack: Function failed: base_do_unpack
 +
</pre>
 +
 
 +
This is a known bitbake issue (see [https://www.yoctoproject.org/pipermail/yocto/2017-October/038472.html this Yocto mailing list message]) which has been solved in more recent bitbake releases
 +
 
 +
Due the fact that DAVE cannot patch bitbake on its own BSP (unless providing a mirror of the whole poky repository with this patch included), we suggest to add the follwing patch manually, after setting up Yocto repositories (in other word, after <code>repo sync</code> command)
 +
 
 +
 
 +
[[File:0001-bitbake-Replace-deprecated-git-branch-parameter-set-.patch]]
 +
 
 +
With the following command:
 +
 
 +
<pre class="board-terminal">
 +
cd sources/poky
 +
wget https://wiki.dave.eu/images/c/cf/0001-bitbake-Replace-deprecated-git-branch-parameter-set-.patch
 +
git am 0001-bitbake-Replace-deprecated-git-branch-parameter-set-.patch
 +
</pre>

Latest revision as of 14:17, 27 February 2020

Info Box
Yocto-logo.png Applies to Yocto

Introduction[edit | edit source]

This page provides includes a list of general FAQs related to the use of Yocto on the DAVE Embedded System's products.

FAQs[edit | edit source]

Q: Why does smart return error: Failed acquiring release file for '<channel_name>': when used over https ?[edit | edit source]

Although smart is capable of handling https connections, this error is caused by the SSL_CERTIFICATE issue that is affecting yocto build system. For more information, you can refer to this discussion.

At the moment we are still working on this issue in the attempt to find a permanent solution. Unfortunately, the SSL_CERTIFICATE problem also affects other tools for which a temporary workaround is provided.

Q: Why does pip return There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skipping ?[edit | edit source]

In order to solve this problem, a possible workaround consist of disabling the SSL CERTIFICATE checking as suggested in the following example:
pip install pyserial --trusted-host pypi.python.org --index-url=http://pypi.python.org/simple/
Other similar solutions can be found at this page

Note: In the case that the time on your system is out of sync, please adjust the date and time and make another attempt to install the package. A wrong system date/time may cause the verification process to fail.

Q: How can I turn off git SSL verification?[edit | edit source]

Since the SSL_CERTIFICATE problem affects also 'git', it is suggested to turn off the SSL CERTIFICATE checking in the case you are trying to work with a repository over https. In order to achieve this, from the local folder export the GIT_SSL_NO_VERIFY variable, in this way: export GIT_SSL_NO_VERIFY=1

Q: How to graphically visualize the dependencies of an image?[edit | edit source]

During the implementation of the production root file system image, it is convenient to graphically visualize the dependencies of the packages used in the development image (see also this section).

To do that, issue the following command:

bitbake -g <image_name>

This command produces a recipe-depends.dot file which can be visualized with the graphviz tool.

Q:How to solve fatal: the '--set-upstream' option is no longer supported bitbake error?[edit | edit source]

Using recent git versions (>2.14.1) with old Yocto releases (e.g. krogoth and older) lead to the following error during do_unpack task of packages downloading sources with git:

ERROR: PACKAGE do_unpack: Fetcher failure: ...;
git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master failed with exit code 128, output:
fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.

ERROR: PACKAGE do_unpack: Function failed: base_do_unpack

This is a known bitbake issue (see this Yocto mailing list message) which has been solved in more recent bitbake releases

Due the fact that DAVE cannot patch bitbake on its own BSP (unless providing a mirror of the whole poky repository with this patch included), we suggest to add the follwing patch manually, after setting up Yocto repositories (in other word, after repo sync command)


File:0001-bitbake-Replace-deprecated-git-branch-parameter-set-.patch

With the following command:

cd sources/poky
wget https://wiki.dave.eu/images/c/cf/0001-bitbake-Replace-deprecated-git-branch-parameter-set-.patch
git am 0001-bitbake-Replace-deprecated-git-branch-parameter-set-.patch