[yocto] Web frameworks on embedded linux

Edward Wingate edwingate8 at gmail.com
Fri Nov 14 12:43:36 PST 2014


> From: Gary Thomas <gary at mlbassoc.com>
> To: yocto at yoctoproject.org
> Date: Fri, 14 Nov 2014 12:04:23 -0700
>
> On 2014-11-14 11:52, Edward Wingate wrote:
>>
>> On Fri, Nov 14, 2014 at 9:39 AM, <yocto-request at yoctoproject.org <mailto:yocto-request at yoctoproject.org>> wrote:
>>
>>     From: Gary Thomas <gary at mlbassoc.com <mailto:gary at mlbassoc.com>>
>>
>>     You can always just bring in the packages you need (python-modules is a
>>     pretty heavy hammer!)  Python is split into ~90 separate packages, each
>>     with a [small] set of modules/functionality.
>>
>> I would really like to try this. How do I find out what the various python packages are and what's in each package?  I tried
>> http://layers.openembedded.org/layerindex/branch/master/recipes/, but don't find what I'm looking for (right now, Python's built-in logging and codecs modules).
>
> Try looking in your build tree.  Depending on your target configuration,
> you'll have either RPM or IPK packages and the python modules end up in
> the architecture dependent collection.
>
> It can get a bit tricky to decide which package contains the module(s) you need
> as many of them are grouped together.  If you know the name of the module, you
> can typically find it via a quick search, e.g. to find the package that contains
> the htmllib module:
>   $ find tmp/work/cortexa7hf-vfp-neon-amltd-linux-gnueabi/python/2.7.3-r0.3/packages-split/ -name htmllib.py
>   tmp/work/cortexa7hf-vfp-neon-amltd-linux-gnueabi/python/2.7.3-r0.3/packages-split/python-html/usr/lib/python2.7/htmllib.py
> so, in this case I'm looking for the 'python-html' package.
>
> Once you determine the package name, just add that to your image (or if you
> have things set up for package updates, you can just add the packages directly
> on your board).

Thanks so much Gary!  I pulled in just logging and codecs modules and
my image went from 22 MB down to 9MB, and the app is still working.
I'm hopeful I can keep the ramdisk image under 16MB now.

Moving on to install and configure flask and uwsgi to serve the app
now.  Speaking of which, how do you assign static IP instead
defaulting to DHCP, and get ssh keys into the rootfs instead of
Drpbear generating them every bootup?  Can this be accomplished
through Yocto or do you have to mount and modify the rootfs manually?



More information about the yocto mailing list