porting python in tz_vmm demo

Abhay Amala amalaabhay at ...9...
Fri Aug 12 00:05:00 CEST 2016


Hi,

I could manage to enable python modules for my python project. I put the
directory containing the project file (python modules) and the python
standard libraries into a tar archive to be accessed by the tz_vmm (see the
configuration below). The project runs successfully, but I get the
following message when os module is imported. This message is repeated for
each python module imported in the project. Anyone has any idea to fix
this? Thank you in advance for your answers.


[init -> tar_fs] Could not find record for /Lib/os
[init -> tar_fs] Could not find record for /Lib/os.so
[init -> tar_fs] Could not find record for /Lib/osmodule.so
[init -> tar_fs] Could not find record for /Lib/os.pyc
[init -> tar_fs] Could not find record for /Lib/os.pyc
[init -> tz_vmm] plugin()->open("./Lib/os.pyc") failed


Here is the configuration.

<start name="tar_fs">
        <resource name="RAM" quantum="50M"/>
        <provides> <service name="File_system"/> </provides>
        <config>
            <archive name="pyproject.tar" />
            <policy root="/" />
        </config>
    </start>

    <start name="tz_vmm">
        <resource name="RAM" quantum="100M"/>
        <config>
             <fstab> <tar name="pyproject.tar" /> </fstab>
             <libc stdout="/dev/log" stderr="/dev/log" >
                 <vfs>
                       <dir name="dev"> <log/> </dir>
                       <fs/>
                 </vfs>
             </libc>
         </config>
    </start>


Thanks,

On Wed, Aug 3, 2016 at 9:14 PM, Sebastian Sumpf <
Sebastian.Sumpf at ...1...> wrote:

> Hey Abhay,
>
> On 08/03/2016 11:10 AM, Abhay Amala wrote:
> > Hi Alexander and Stefan,
> >
> > Thank you for your responses.
> >
> > I have another issue now. I couldn't import python built-in modules such
> > as math, time, itertools, etc. I got "*No module named* " ImportError.
> > However, I need this modules to run my python project. Does anyone have
> > any idea to fix this issue? I will be grateful for any help you can
> provide.
> >
>
> I ported the Python interpreter to Genode back in 2010 and omitted any
> module support at the time. My line of thinking was, if someone wants to
> use Python on Genode, this lack will get noticed. Congratulations you
> are the first one! So, basically it should not be that hard to enable
> module support. One has to look at the "import" side of Python, which
> should somehow provide the "to be interpreted" code to the interpreter,
> while also handling the C-code side of some modules. Since our resources
> are very limited, I invite you to fill in this gap and will gladly
> answer questions if you chose to proceed in this direction.
>
> Cheers,
>
> Sebastian
>
> --
> Sebastian Sumpf
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
>
>
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20160812/cf9e4790/attachment.html>


More information about the users mailing list