Frequently Asked Questions

Yocto - How to import files from a git repository ?

To add sources using git, you need to:

  1. Get the url of your repo and remove the https part.

  2. 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"

  3. 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): i

  • to undo: u

  • to save: :w

  • to 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/directory

  • Copy file to the remote host: scp myfile.txt user@remote:/remote/directory

  • can use the option -r fo recursive copy and -P for 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 ?

  1. Create a virtual environment: python3 -m venv .venv

  2. Launch the virtual environnement with source .venv/bin/activate

  3. Install your package: pip install --editable .

You can also uninstall your package with: pip uninstall <mypackage>.

How to manage services in Linux ?

  • List of services: systemctl

  • List of failed services: systemctl list-units --failed

  • To see the log of a service: journalctl -u <mywonderful.service>

  • Restart a service: systemctl daemon-reload

  • Start a service: systemctl start <mywonderful.service>

Yocto - How to create a new layer ?

  1. Start bitbake: source sources/poky/oe...-env

  2. Create layer: bitbake-layers create-layer meta-sdltest

  3. Move the repo in sources: mv meta-sdltest ../sources/

  4. Add the new layer inside the config file: nano confi/bblayers.conf and add at the end BBLAYERS += "${BSPDIR}/sources/meta-sdltest "

  5. 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).

Check the Configuration object in the Kivy documentation.