On 05.10.2011 15:05, Ivan Loskutov wrote:
> Hello, Hackers!
> 
> How can I start ankh examples?
> I think I need use src/l4/pkg/ankh/doc/ankh.lua.

You can use it, but right now I feel it's a bit over-engineered for an
example.

> But what is "require ("Aw");"

That's a Lua library containing startup code for instance for the IO
server. It can be found in l4/pkg/ned/doc

> and what must I write to files ankh.vbus and modules.list for
> x86 qemu? I use l4re-snapshot-2011081207.

Here's my modules list for the lwip_test example:

entry lwip
kernel fiasco -jdb_cmd=JS -serial_esc
roottask moe rom/lwip.lua
module l4re
module ned
module io
module ankh
module ankh.vbus
module lwip.lua
module Aw.lua
module lwip_test


Attached is ankh.vbus (I also added it to l4/pkg/ankh/doc in our SVN)
and lwip.lua (also added to the SVN now).

Cheers,
Bjoern

ankh => new System_bus()
{
        PCI0 => new PCI_bus()
        {
                nic[] => wrap(hw-root.match("PCI/CC_02"));
        }
}
-- this is a configuration to start 'lwip_test'

package.path = "rom/?.lua";

require("L4");
require("Aw");

local ldr = L4.default_loader;

-- channel used for the virtual PCI bus containing NICs
local ankh_vbus = ldr:new_channel();
-- channel for the client to obtain Ankh session
local ankh_clnt = ldr:new_channel();
-- shm area for the Ankh ring buffers
local ankh_shm  = ldr:create_namespace({});

-- start IO server
Aw.io( {ankh = ankh_vbus}, "-vv", "rom/ankh.vbus");

-- start ankh
ldr:startv( {caps = {ankh_service = ankh_clnt:svr(); -- session server
                     vbus = ankh_vbus,               -- the virtual bus
                     shm = ankh_shm:m("rws")},       -- shm namespace read/writable
             log  = {"ankh", "g"},
             l4re_dbg = L4.Dbg.Warn
            },
            "rom/ankh" );

ldr:start(
          { caps = {
                     shm = ankh_shm:m("rws");         -- also r/w the shm namespace
                     -- and this creates the ankh session with some parameters
                     ankh = ankh_clnt:create(0, "debug,phys_mac,shm=shm,bufsize=16384");
                   },
            log = {"lwip", "c"},
            l4re_dbg = L4.Dbg.Boot },
            "rom/lwip_test --shm shm --bufsize 16384");
_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Reply via email to