I want to develop a web app for an embedded system. It is very easy to do so in python or java. However, I have two major problems:

  • I have a very limited space available on my embedded device
  • I cannot figure out how to include a python interpreter in the openembedded
    framework.

Does anyone know how to cross compile python with openembedded?

有帮助吗?

解决方案

If you have already got an openembedded project running, in arago-oe-dev project, the arago-oe-dev/recipes/ directory includes python.

Then you need to include python into your own dependency tree of recipes. Normally on the top level of dependency tree is the "Images" recipe in which you define what are included into you embedded firmware image to be running on your embedded device.

In the .bb file of "Images" recipe, you normally find a variable of IMAGE_INSTALL. You can add your app recipe into IMAGE_INSTALL.

Then in your recipe of you app, in its .bb file, you should add python to something like "RDEPENDS_${PN}" to add it to run-level dependency. Don't forget to inherit the pkgconfig bbclass so that the runtime linking is properly managed. Then the python library (.h and .so or .a files) will be built into your firmware image in something link /usr/lib and /urs/incluce and be linked by the embedded apps you develope.

其他提示

You need to edit the image recipe to include python and any needed modules in the image. python is the package name for the python interpreter.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top