ok, sorry about the number of messages, i'm going rapidly through things, trying to get python and other stuff started. i've had to create a one-by-one "add the library, get the error, go on to next error" modules.list file, and when i get to libm_support.so i get "rom/libm_support.so is not an ELF file" so i did nm on it as you can see below. not sure what it means though.
anyway here's the list of modules so far, there _must_ be a better way to do this - any clues?
modaddr 0x002000000 kernel fiasco -serial_esc roottask moe rom/hello.lua module l4re module ned module hello.lua module hello module x86-fb.cfg module x86-fb.io module x86-legacy.devs module l4re module io module fbterminal module fb-drv module mag module python module libld-l4.so module libc_be_file_stdin.so module libc_be_sig.so module libevent.so module libsupc++.so module libm_support.so module lib4re-util.so module libdl.so
lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr lib/amd64_K8/l4f/libm_support.solrwxrwxrwx 1 lkcl lkcl 92 2010-11-26 05:09 lib/amd64_K8/l4f/libm_support.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so ls: cannot access home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so: No such file or directory lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr /home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so -rwxr-xr-x 1 lkcl lkcl 11163 2010-11-26 05:09 /home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so lkcl@teenymac:~/src/l4ka/build-x86_64$ nm !$ nm /home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so 00000000002009a0 a _DYNAMIC 0000000000200b00 a _GLOBAL_OFFSET_TABLE_ w _Jv_RegisterClasses 0000000000200980 d __CTOR_END__ 0000000000200978 d __CTOR_LIST__ 0000000000200990 d __DTOR_END__ 0000000000200988 d __DTOR_LIST__ 0000000000000970 r __FRAME_END__ 0000000000200998 d __JCR_END__ 0000000000200998 d __JCR_LIST__ 000000006ffff000 A __L4_KIP_ADDR__ 0000000070000000 A __L4_STACK_ADDR__ 0000000000200b68 A __bss_start w __cxa_finalize 0000000000000830 t __do_global_ctors_aux 0000000000000690 t __do_global_dtors_aux 0000000000200b60 d __dso_handle 0000000000200b68 A _edata 0000000000200b78 A _end 0000000000000868 T _fini 00000000000005d0 T _init 0000000000000820 T _sin 0000000000000810 T _sinf 0000000000200b68 b completed.6341 U cos U cosf 0000000000200b70 b dtor_idx.6343 U exp2 00000000000007f0 T exp2f 0000000000000710 t frame_dummy 00000000000007e0 T log2f U sin 0000000000000790 T sincos 0000000000000740 T sincosf U sinf lkcl@teenymac:~/src/l4ka/build-x86_64$ ldd !$ ldd /home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so linux-vdso.so.1 => (0x00007fff445d4000) libuc_c.so => not found lkcl@teenymac:~/src/l4ka/build-x86_64$
belay that - i found how to do it.
entry x86-fb modaddr 0x002000000 kernel fiasco -serial_esc roottask moe rom/hello.lua module l4re module ned module hello.lua module hello module x86-fb.cfg module x86-fb.io module x86-legacy.devs module l4re module io module fbterminal module fb-drv module mag module python module libld-l4.so module libc_be_file_stdin.so module libc_be_socket_noop.so module libc_be_sig.so module libc_be_l4refile.so module libc_be_l4re.so module lib4re.so module libl4util.so module libl4sys.so module r/libpthread.so module libevent.so module r/libsupc++.so module r/libstdc++.so module r/libuc_c.so module libc_support_misc.so module libm_support.so module lib4re-util.so module libdl.so
and then copied the example x86-fb.cfg (called it hello.lua, don't ask, but it matches above...) and added:
function start_with_terminal(e, res, p) local c = { fb = mag_caps.svc:create(L4.Proto.Goos, res), term = l:new_channel():svr(), }; l:start({ caps = c }, "rom/fbterminal"); e.log = c.term:m("ro"); l:start(e, p); end
start_with_terminal({}, "400x300", "rom/ned -i"); start_with_terminal({}, "400x300", "rom/python");
ok the rom/ned -i isn't needed but the rom/python is :)
so... yah, that was a pain, but i got there, yaay! :) ok. rrrright. files. how the heck do i get files in (e.g. some python modules). i see there's some here:
lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr lib/amd64_K8/l4f/python-mod/ total 20 lrwxrwxrwx 1 lkcl lkcl 92 2010-11-26 05:10 operator.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/python/lib/objs/OBJ-amd64_K8-l4f/python-mod/operator.so lrwxrwxrwx 1 lkcl lkcl 94 2010-11-26 05:10 _functools.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/python/lib/objs/OBJ-amd64_K8-l4f/python-mod/_functools.so lrwxrwxrwx 1 lkcl lkcl 96 2010-11-26 05:10 _collections.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/python/lib/objs/OBJ-amd64_K8-l4f/python-mod/_collections.s drwxr-xr-x 2 lkcl lkcl 4096 2010-11-26 05:10 . drwxr-xr-x 4 lkcl lkcl 4096 2010-11-26 05:10 .. lkcl@teenymac:~/src/l4ka/build-x86_64$
is that... basically it? then include the file e.g. site.py as a module? there must be a "good" way to do this, surely.
tia,
l.
On Thu Nov 25, 2010 at 21:55:19 -0800, lkcl wrote:
and then copied the example x86-fb.cfg (called it hello.lua, don't ask, but it matches above...) and added:
You can name it as you like.
so... yah, that was a pain, but i got there, yaay! :) ok. rrrright. files. how the heck do i get files in (e.g. some python modules). i see there's some here:
lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr lib/amd64_K8/l4f/python-mod/ total 20 lrwxrwxrwx 1 lkcl lkcl 92 2010-11-26 05:10 operator.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/python/lib/objs/OBJ-amd64_K8-l4f/python-mod/operator.so lrwxrwxrwx 1 lkcl lkcl 94 2010-11-26 05:10 _functools.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/python/lib/objs/OBJ-amd64_K8-l4f/python-mod/_functools.so lrwxrwxrwx 1 lkcl lkcl 96 2010-11-26 05:10 _collections.so -> /home/lkcl/src/l4ka/build-x86_64/pkg/python/lib/objs/OBJ-amd64_K8-l4f/python-mod/_collections.s drwxr-xr-x 2 lkcl lkcl 4096 2010-11-26 05:10 . drwxr-xr-x 4 lkcl lkcl 4096 2010-11-26 05:10 .. lkcl@teenymac:~/src/l4ka/build-x86_64$
is that... basically it? then include the file e.g. site.py as a module? there must be a "good" way to do this, surely.
Well, never tried it. When you add the site.py file in modules.list it will appear as rom/site.py in python. Can you load it?
Adam
Adam Lackorzynski wrote:
is that... basically it? then include the file e.g. site.py as a module? there must be a "good" way to do this, surely.
Well, never tried it. When you add the site.py file in modules.list it will appear as rom/site.py in python. Can you load it?
well, luckily i'm a python expert :)
*adds site.py to modules.list* *builds a qemu iso* *fires up qemu* *watches python go "splat" on importing site.py* *goes "hmmmm"...*
import site
ImportError: module site not found
import sys dir(sys)
{usual stuff}
print sys.path
['', '']
ah ha! clue!
sys.path.append('rom') import sys
ImportError: module os not found
so, yaay! yes it's possible to add python modules directly to modules.list, and as long as sys.path is modified to look in 'rom' as one of the subdirectories (that'll need hard-coding into the python source code) it should all be hunky-dory.
now, here's the thing that would help enormously. python's import mechanism doesn't _just_ have to be a filesystem. you _can_ create overrides of __import__. i've done this before to actually override to load modules from a SQL database! (don't ask...) - of course that first "bootstrap" module has to be on a filesystem, or otherwise you have to write it in c and hard-code its existence into the python binary, which i believe is completely unnecessary in this case.
one example to follow is ".egg" files. .egg files are zip'd archives which can be inserted into the sys.path and python will then look for the modules *inside* that sys.path.
basically what i'm saying is that site.py, os.py and pretty much everything under-the-sun in the standard python libs could be dumped into a zip'd archive - a single file - out of which the python binary could extract whatever it requires. the only down-side of that is that a) it's a single file b) looking for a particular module and then uncompressing it is going to involve CPU cycles.
but it would be bloody sight easier than having to add everything to modules.list.
there _must_ be a convenient way to add a ROM-based filesystem to L4, surely. or any kind of filesystem.
l.
No need to apologize. I am not working on the technology level (counseling actually), but I am following the list, and I have perceived a surge in posts. I suppose the "solution" is to create specifically focused lists --- but I hardly see that as a problem; it is really good news.
My personal hope is to see L4 as drop-in replacement for Linux, and distributed in a format something like Ubuntu uses, with driver and porting kits supplied to peripheral and hardware manufacturers so that we can finally kiss off M$, and possibly the entire proprietary structure.
From there, I suppose, it would be a fairly quick segue to a native L4
platform. My hope is for interest in data-centricity that is "appless" and works within the OS through open VMs and with dynamic desktop windows ( http://thinman.com).
Genuine regards, John
On Fri, Nov 26, 2010 at 1:44 AM, lkcl luke.leighton@gmail.com wrote:
ok, sorry about the number of messages, i'm going rapidly through things, trying to get python and other stuff started. i've had to create a one-by-one "add the library, get the error, go on to next error" modules.list file, and when i get to libm_support.so i get "rom/libm_support.so is not an ELF file" so i did nm on it as you can see below. not sure what it means though.
anyway here's the list of modules so far, there _must_ be a better way to do this - any clues?
modaddr 0x002000000 kernel fiasco -serial_esc roottask moe rom/hello.lua module l4re module ned module hello.lua module hello module x86-fb.cfg module x86-fb.io module x86-legacy.devs module l4re module io module fbterminal module fb-drv module mag module python module libld-l4.so module libc_be_file_stdin.so module libc_be_sig.so module libevent.so module libsupc++.so module libm_support.so module lib4re-util.so module libdl.so
lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr lib/amd64_K8/l4f/libm_support.solrwxrwxrwx 1 lkcl lkcl 92 2010-11-26 05:09 lib/amd64_K8/l4f/libm_support.so ->
/home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr
home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so ls: cannot access
home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so: No such file or directory lkcl@teenymac:~/src/l4ka/build-x86_64$ ls -altr
/home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so -rwxr-xr-x 1 lkcl lkcl 11163 2010-11-26 05:09
/home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so lkcl@teenymac:~/src/l4ka/build-x86_64$ nm !$ nm
/home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so 00000000002009a0 a _DYNAMIC 0000000000200b00 a _GLOBAL_OFFSET_TABLE_ w _Jv_RegisterClasses 0000000000200980 d __CTOR_END__ 0000000000200978 d __CTOR_LIST__ 0000000000200990 d __DTOR_END__ 0000000000200988 d __DTOR_LIST__ 0000000000000970 r __FRAME_END__ 0000000000200998 d __JCR_END__ 0000000000200998 d __JCR_LIST__ 000000006ffff000 A __L4_KIP_ADDR__ 0000000070000000 A __L4_STACK_ADDR__ 0000000000200b68 A __bss_start w __cxa_finalize 0000000000000830 t __do_global_ctors_aux 0000000000000690 t __do_global_dtors_aux 0000000000200b60 d __dso_handle 0000000000200b68 A _edata 0000000000200b78 A _end 0000000000000868 T _fini 00000000000005d0 T _init 0000000000000820 T _sin 0000000000000810 T _sinf 0000000000200b68 b completed.6341 U cos U cosf 0000000000200b70 b dtor_idx.6343 U exp2 00000000000007f0 T exp2f 0000000000000710 t frame_dummy 00000000000007e0 T log2f U sin 0000000000000790 T sincos 0000000000000740 T sincosf U sinf lkcl@teenymac:~/src/l4ka/build-x86_64$ ldd !$ ldd
/home/lkcl/src/l4ka/build-x86_64/pkg/libc_backends/lib/math/OBJ-amd64_K8-l4f/libm_support.so linux-vdso.so.1 => (0x00007fff445d4000) libuc_c.so => not found lkcl@teenymac:~/src/l4ka/build-x86_64$ -- View this message in context: http://old.nabble.com/errors-getting-python-up-and-running-tp30308895p303088... Sent from the L4 mailing list archive at Nabble.com.
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
John van V.-2 wrote:
No need to apologize. I am not working on the technology level (counseling actually), but I am following the list, and I have perceived a surge in posts. I suppose the "solution" is to create specifically focused lists
but I hardly see that as a problem; it is really good news.
My personal hope is to see L4 as drop-in replacement for Linux, and distributed in a format something like Ubuntu uses, with driver and porting kits supplied to peripheral and hardware manufacturers so that we can finally kiss off M$, and possibly the entire proprietary structure.
From there, I suppose, it would be a fairly quick segue to a native L4 platform. My hope is for interest in data-centricity that is "appless" and works within the OS through open VMs and with dynamic desktop windows ( http://thinman.com).
Genuine regards, John
john, hi, replied to you earlier but i thought it was a private message, so here's a rehash.
it's very ironic that, far from trying to "beat m$", the competition is now actually linux :)
L4 has great potential in the embedded arena, i hope to be able to demonstrate that by porting an entire web browser to it: already i've shown that WebkitDFB can start up in one second on only a 400mhz ARM926EJS. if linux is cut from the equation then i believe that using e.g. L4 a startup target time of 1.5 seconds would be perfectly reasonable.
for L4 to be a viable alternative to linux it's imperative to not confuse linux with gnu/linux. i.e. it's important to drum into people the difference between an OS and a kernel. L4 and Linux are kernels, not OSes.
with that in mind, L4RE modules must be available that are a drop-in replacement for the linux _kernel_, thus making it feasible for people to simply run the OS that they are *ALREADY* running. once that has been proven and demonstrated, packaging it is actually very straightforward: it's already been done for BSD (kfreebsd) so yeah hell why not L4RE as well.
just to reiterate: that's correct, i did state that you can run a BSD kernel on debian. no linux kernel is involved:
$ apt-cache search kfreebsd kfreebsd-source-6.3 - source code for kernel of FreeBSD 6.3 with Debian patches kfreebsd-source-7.0 - source code for kernel of FreeBSD 7.0 with Debian patches freebsd-buildutils - Utilities for building FreeBSD sources freebsd-manpages - Manual pages for a GNU/kFreeBSD system kfreebsd-source-8.1 - source code for kernel of FreeBSD 8.1 with Debian patches
so, actually, l4linux+L4RE actually qualifies as being a drop-in replacement, but i don't believe that's what you meant: i believe you meant that you'd like to see a complete alternative to linux entirely.
the problem with that is: device drivers. the expertise and state-of-play is encoded and enshrined in the device driver tree, _not_ the actual core "linux scheduler" which is what.. only 100,000 lines of code (vs millions for the device drivers). thus, you still need OSKit, really, which is "linux minus the linux scheduler" as you're no doubt already aware. to do anything else but make use of OSKit would be... a massive undertaking beyond sensible resources at the present time.
ok looking into this further, oskit was already done with fiasco, but it was 1999 (!). but you get the point i am sure.
ok enough :)
l.
Hi,
L4 has great potential in the embedded arena, i hope to be able to demonstrate that by porting an entire web browser to it: already
I'm just wanting to let you know that we have done this already. You may have a look at the Live CD that we just released last week:
http://genode.org/download/live-cds
The browser is based on Arora, which uses WebKit. For the Live CD, we decided for using the OKL4 kernel but the browser runs also on L4/Fiasco (albeit no Fiasco.OC yet), L4ka::Pistachio, and Linux (running directly on top of the kernel - w/o GNU userland or glibc).
Cheers Norman
Norman Feske-2 wrote:
Hi,
L4 has great potential in the embedded arena, i hope to be able to demonstrate that by porting an entire web browser to it: already
I'm just wanting to let you know that we have done this already. You may have a look at the Live CD that we just released last week:
http://genode.org/download/live-cds
The browser is based on Arora, which uses WebKit. For the Live CD, we decided for using the OKL4 kernel but the browser runs also on L4/Fiasco (albeit no Fiasco.OC yet), L4ka::Pistachio, and Linux (running directly on top of the kernel - w/o GNU userland or glibc).
REALLY?? that's... fantastic news for me! it's exactly what i need. where's the source code - bugger the live cd, i want to try out something radical straight away :)
ok, to explain: i'm doing an embedded project, using python bindings to webkit: full DOM, not just "throw up a QtWebView" - actually have the entire set of DOM functions that you normally think "this is only available from javascript", and i'm finding that WebkitDFB with python bindings is vastly quicker than any other (qt4, gtk2 etc.)
the startling speed of that sort-of got me thinking: what's the other large startup time that could be eliminated, where this embedded project could benefit? i know: it's called "linux" - let's see if it can be cut out :) and what you're telling me is, yes, it most definitely can, but better than that you've already blazed most of the trail.
so, what i want to do is very very weird, i know: run python and a whopping 25mb webkit-browser-based python module under L4RE. so, strictly speaking i don't need even a traditional filesystem (but some sort of file-based store is going to be painful to do without...)
ahh... i found the source code: https://genode.svn.sourceforge.net/svnroot/genode/trunk/
ah hell. qt4. that's a 170mb download, isn't it? over svn, it's more than that. yukkk! i'm using 3G dialup (expensive).
... can i ask you a massive favour? could you do a patch for me (a diff -Naur probably) against "vanilla" qtwebkit so i can see what you've done? basically i'll need to port that to webkit-directfb, i _really_ don't like qt4webkit after discovering it ate 200mb on an ARM926 system and took 30 seconds and above to start up...
if you were using git, and had cloned the standard nokia qt4 git repository, i would simply be able to point the local copy i have of that at your one, and git would grab me _only_ the objects needed. but... you're not :) that's a subtle hint, btw: svn is reallly serrriously conceptually out-of-date...
also, could i ask you: were any modifications made to dependent libraries you used, in libports? as part of the embedded work i've already downloaded tons of libraries, in particular the dependencies already for webkit-dfb: it would be neat just to be able to use those tarballs.
lots of little gems on your site, btw... i particularly like this:
https://genode.svn.sourceforge.net/svnroot/genode/trunk/base-codezero/doc/co...
all best,
l.
Hello,
ahh... i found the source code: https://genode.svn.sourceforge.net/svnroot/genode/trunk/
ah hell. qt4. that's a 170mb download, isn't it? over svn, it's more than that. yukkk! i'm using 3G dialup (expensive).
except for some bits (such as libc), we do not store contrib code in the SVN. So don't be afraid to check it out. In some subdirectories (which we call repositories - more on that in 'doc/getting_started.txt'), in particular 'qt4', 'libports', and 'ports', you will find a 'Makefile', which downloads and prepares 3rd-party source codes.
... can i ask you a massive favour? could you do a patch for me (a diff -Naur probably) against "vanilla" qtwebkit so i can see what you've done? basically i'll need to port that to webkit-directfb, i _really_ don't like qt4webkit after discovering it ate 200mb on an ARM926 system and took 30 seconds and above to start up...
Please have a closer look at the 'qt4' subdirectory. I think, it is exactly what you describe, several patches plus the custom glue code to adapt qt4 to our userland.
if you were using git, and had cloned the standard nokia qt4 git repository, i would simply be able to point the local copy i have of that at your one, and git would grab me _only_ the objects needed. but... you're not :) that's a subtle hint, btw: svn is reallly serrriously conceptually out-of-date...
We use the SVN merely for distributing the code. It is updated every three months when a new Genode release arrives. In between, only small fixes are committed.
also, could i ask you: were any modifications made to dependent libraries you used, in libports? as part of the embedded work i've already downloaded tons of libraries, in particular the dependencies already for webkit-dfb: it would be neat just to be able to use those tarballs.
It's the same concept as for our 'qt4' port. Downloading and patching the 3rd-party sources is done by the Makefile in the 'libports' repository. For the versions of the individual packages, please have a look at the respective Makefile snippets 'libports/ports/'.
Good luck
Norman
Norman Feske-2 wrote:
Hello,
... can i ask you a massive favour? could you do a patch for me (a diff -Naur probably) against "vanilla" qtwebkit so i can see what you've done? basically i'll need to port that to webkit-directfb, i _really_ don't like qt4webkit after discovering it ate 200mb on an ARM926 system and took 30 seconds and above to start up...
Please have a closer look at the 'qt4' subdirectory. I think, it is exactly what you describe, several patches plus the custom glue code to adapt qt4 to our userland.
ahh goood, that's very foresighted of you. thank you.
l4-hackers@os.inf.tu-dresden.de