YOCTO SETUP Préparer votre distro linux (en root !) apt install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 libegl1-mesa liblz4-tool libsdl1.2-dev locales mesa-common-dev python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat sudo texinfo unzip wget xz-utils zstd Préparer votre environnement de build (en vous !) ATTENTION : si umask restrictif $ umask 000 Préparer un dossier global dans votre dossier perso $ mkdir yocto $ cd yocto Créer un dossier commun pour les download (sources) et le cache d'état $ mkdir bitbake.downloads $ mkdir bitbake.sstate $ ls vous devez voir bitbake.downloads bitbake.sstate Preparer le premier projet Créer et rentrer dans votre projet $ mkdir 2025-le-votrenom $ cd 2025-le-votrenom Vérif : $ tree .. . ├── 2025-le-votrenom ├── bitbake.downloads └── bitbake.sstate $ pwd /home/mfacerias/yocto/2025-le-leprof Initialiser git (si besoin, oui pour le dossier "officiel") $ git init $ git status répond : rien à valider Récupérer la toolchain $ git submodule add https://git.yoctoproject.org/poky poky $ ls vous devez voir : poky Initialiser yocto $ cd poky $ source oe-init-build-env (construction dite "out of tree") $ pwd vous devez voir : .../yocto/2025-le-leprof $ git status vous devez voir : Fichiers non suivis ... conf/ Configurer votre first_build $ codium ./ & Vous devez voir : Source control : 5 pending change (5 fichiers dans /conf) Editer local.conf et modifier : MACHINE ?= "beaglebone-yocto" (décommenter la ligne) DL_DIR ?= "${TOPDIR}/../bitbake.downloads" (décommenter et adapter) SSTATE_DIR ?= "${TOPDIR}/../bitbake.sstate" (décommenter et adapter) Procéder au commit git $ git add conf $ git status vous devez voir : suivi : les 7 fichiers dans conf $ git commit -m "ADD conf directory" dans codium, vous devez voir : Source control => rien en attente Faites votre premier build Le build va durer longtemps, à lancer de chez vous, la nuit ... $ bitbake core-image-minimal L'opération peut être interrompue : CTRL + C plusieurs fois L'opération peut être relancée : $ cd ..../yocto/poky $ source oe-init-build-env first_build ../ $ bitbake core-image-minimal ***************** Lancer votre premier build Lancement : $ runqemu slirp vous devez voir : une nouvelle fenêtre qui s'ouvre (l'émulateur) un promt de login : login : root password : RIEN ! Résultat => Dans la fenêtre de l'émulateur : # uname -a vous devez voir : Linux beaglebone-yocto 6.6.21-yocto-standard #1 PREEMPT ... Cette console est graphique, impossible d'y utiliser la souris, le copier/coller... Arrêt : Depuis la fenêtre d'où a été lancé 'runqemu' CTRL + C vous devez voir : La fénêtre de l'émulateur se ferme Le promt revient sur la fenêtre de lancement. ************************************************************ Finalisation : Dans codium : Source control => plus de 10000 fichiers en état "pending" Création d'un fichier ".../first_build/.gitignore" qui contient : cache/ tmp/ bitbake* .vscode Raffaichir le Source control de codium Il reste 1 fichier Rajoutez le Ajouter un message de commit : "ADD .gitignore" Cliquer sur commit Source control => rien en attente Depuis la CLI (fenêtre de lancement) $ git log commit 00265f19446ea7d77b1dfbe35da6369139d070ae (HEAD -> main) Author: Michel FACERIAS Date: Sat Dec 14 21:30:22 2024 +0100 ADD .gitignore commit 5b8089cb3cd456ed17747d7df991ea98a27514a1 Author: Michel FACERIAS Date: Sat Dec 14 19:55:29 2024 +0100 ADD conf directory Conclusion : git peut être piloté en CLI git peut être piloté à travers codium Pousser vos résultats dans le gitlab de Polytech Vérifier la configuration de votre client git $ git config --list vous devez voir: user.email=michel@facerias.org user.name=Michel FACERIAS init.defaultbranch=main ... Poussez votre travail : $ git remote add origin git@gitlab.polytech.umontpellier.fr:se4linuxemb/votre-nom-de-projet $ git push -u origin main Add ssh: vi build/conf/local.conf EXTRA_IMAGE_FEATURES ?= "allow-empty-password empty-root-password allow-root-login ssh-server-openssh" Nouveau build bitbake core-image-minimal nouveau run (need sudo !) runqemu slirp accès ssh depuis le pc dev ssh root@localhost -p 2222 construction "out of tree" git clone... cd poky source oe-init-build-env ../build/ bitbake core-image-minimal