| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
| francois:yocto [2018/04/08 16:00] – francois | francois:yocto [2018/04/08 16:30] (Version actuelle) – francois |
|---|
| ====== Yocto tips and tricks ====== | ====== Yocto tips and tricks ====== |
| | |
| | ===== resources ===== |
| | |
| | Un doc donnant les usages habituels de yocto : {{ :francois:boulot:l-813e_1.pdf |Working with Poky and Bitbake}} |
| | |
| | ===== Bitbake ===== |
| | |
| ^ Command ^ Description ^ | ^ Command ^ Description ^ |
| |''hob'' | bitbake frontend/GUI.| | |''hob'' | bitbake frontend/GUI.| |
| |''bitbake <image>'' | Bake an image (add -k to continue building even errors are found in the tasks execution)| | |''bitbake <image>'' | Bake an image (add -k to continue building even errors are found in the tasks execution)| |
| |''bitbake <image > -g -u depexp'' | Show the package dependency for image.| | |''bitbake <image > -g -u depexp'' | Show the package dependency for image.| |
| |''<nowiki>bitbake -s | grep <pkg></nowiki>''| Check if certain package is present on current Yocto Setup| | |''%%bitbake -s | grep <pkg>%%''| Check if certain package is present on current Yocto Setup| |
| |''<nowiki>bitbake -g <pkg> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq</nowiki>''|Show package's dependencies| | |''%%bitbake -g <pkg> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq%%''|Show package's dependencies| |
| |bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq| Show image's packages| | |''%%bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq%%''|Show image's packages| |
| |
| **Example:** To show all packages included on fsl-image-gui | **Example:** To show all packages included on fsl-image-gui |
| $ bitbake fsl-image-gui -g -u depexp | $ bitbake fsl-image-gui -g -u depexp |
| | |
| > NOTE: This command will open a UI window, so it must be execute on a console inside the host machine (either virtual or native). | > Note: This command will open a UI window, so it must be execute on a console inside the host machine (either virtual or native). |
| |
| **Example:** To (force) compiling a kernel and then build, type: | **Example:** To (force) compiling a kernel and then build, type: |
| $ bitbake linux-imx -f -c compile | $ bitbake linux-imx -f -c compile |
| $ bitbake linux-imx | $ bitbake linux-imx |
| | |
| | ===== Création du SDK ===== |
| | |
| | bitbake <image> ‐c populate_sdk |