Frequently Asked Questions
Yocto - How to import files from a git repository ?
To add sources using git, you need to:
Get the url of your repo and remove the https part.
Add the new source to your recipe (you can precise the protocol and the branch):
SRC_URI = "git://github.com/MarineVovard/kivy-demo;protocol=https;branch=main"Add SRCREV with the commit number you want to use:
SRCREV = "a1d631d82f761ce78bfb4bdaeed9f673f4a3bed4"
Bake your recipe and voilà !
Now, you just need to update the SRCREV to have the commit you want !
For more information check the Yocto Manual.
WARNING The repo needs to be public
How to use Vim (and vi) commands ?
Each time you want to use a command, do first ESC.
to exit:
:q!to modify (insert):
ito undo:
uto save:
:wto save and exit:
:wq
If you want to learn more commands check An introduction to the vi editor made by RedHat.
How to use scp command ?
Scp stand for secure copy protocol. It enables you to copy a file to or from an other machine.
Here are some useful commands:
Copy file from remote host:
scp user@remotehost:myfile.txt /my/local/directoryCopy file to the remote host:
scp myfile.txt user@remote:/remote/directorycan use the option
-rfo recursive copy and-Pfor the port
If you want to learn more, you can check Example syntax for Secure Copy or check the man.
How to test your Python package on your computer ?
Create a virtual environment:
python3 -m venv .venvLaunch the virtual environnement with
source .venv/bin/activateInstall your package:
pip install --editable .
You can also uninstall your package with: pip uninstall <mypackage>.
How to manage services in Linux ?
List of services:
systemctlList of failed services:
systemctl list-units --failedTo see the log of a service:
journalctl -u <mywonderful.service>Restart a service:
systemctl daemon-reloadStart a service:
systemctl start <mywonderful.service>
Yocto - How to create a new layer ?
Start bitbake:
source sources/poky/oe...-envCreate layer:
bitbake-layers create-layer meta-sdltestMove the repo in sources:
mv meta-sdltest ../sources/Add the new layer inside the config file:
nano confi/bblayers.confand add at the endBBLAYERS += "${BSPDIR}/sources/meta-sdltest "Check if the layer is added:
bitbake-layers show-layers
For more information, check How to add a new layer and a new recipe in Yocto.
How to add a tactile keyboard to your kivy app ?
To add the keyboard with kivy: systemanddock or systemandmulti
(KCFG_KIVY_KEYBOARD_MODE env variable).