Re: Run an executable script on the yocto image
Konrad Weihmann <kweihmann@...>
If you're sure you only use standard python libs it's fairly easy.
make a recipe (name it how ever you like)
SCR_URI = "file://<your script>.py"
do_install() {
install -m 0755 <your script>.py ${bindir}/<your script>.py
}
RDEPENDS:${PN} += "python3-core"
in the image
IMAGE_INSTALL += "<your recipe name>"
---
if your script needs further libraries, reference them in the recipe with
RDEPENDS:${PN} += "python3-core dependency1 dependency2 dependency3..."
Then you call the result on your device with <your script>.py from any console
Maybe add a "#!/usr/bin/env python3" shebang as a first line to your script
toggle quoted message
Show quoted text
make a recipe (name it how ever you like)
SCR_URI = "file://<your script>.py"
do_install() {
install -m 0755 <your script>.py ${bindir}/<your script>.py
}
RDEPENDS:${PN} += "python3-core"
in the image
IMAGE_INSTALL += "<your recipe name>"
---
if your script needs further libraries, reference them in the recipe with
RDEPENDS:${PN} += "python3-core dependency1 dependency2 dependency3..."
Then you call the result on your device with <your script>.py from any console
Maybe add a "#!/usr/bin/env python3" shebang as a first line to your script
On 26.08.21 17:14, yasminebenghozzi6@... wrote:
Hello,
Can anyone suggest how to make a python script executable on the yocto image? I 've been trying with the pyinstaller but didn't work, I made it executable on my laptop and transfer it to yocto image but didn't work also,
Has any one tried it before? are there other alternatives?