1 -- vim:set ft=lua: 2 3 local L4 = require("L4"); 4 5 local l = L4.default_loader; 6 7 local io_buses = 8 { 9 common = l:new_channel(); 10 }; 11 12 l:start({ 13 caps = { 14 common = io_buses.common:svr(), 15 icu = L4.Env.icu, 16 sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), 17 }, 18 log = { "IO", "y" }, 19 l4re_dbg = L4.Dbg.Warn, 20 }, 21 "rom/io rom/hw_devices.io rom/mips-x1600-msc-block.io"); 22 23 local block_server = l:new_channel(); 24 25 l:startv({ 26 caps = { 27 fsserver = block_server:svr(), 28 jdb = L4.Env.jdb, -- to set the server name 29 icu = L4.Env.icu, 30 vbus = io_buses.common, 31 }, 32 log = { "server", "r" }, 33 }, 34 -- arguments: machine, MSC channel/device, DMA channel, card index, memory pages 35 "rom/msc_block_server", "x1600", "0", "0", "0", "20"); 36 37 local pipe_server = l:new_channel(); 38 39 l:startv({ 40 caps = { 41 pipeserver = pipe_server:svr(), 42 jdb = L4.Env.jdb, -- to set the server name 43 }, 44 log = { "pipes", "r" }, 45 }, 46 "rom/pipe_server", "10"); 47 48 local ext2server = l:new_channel(); 49 50 l:startv({ 51 caps = { 52 blockserver = block_server, 53 pipeserver = pipe_server, 54 fsserver = ext2server:svr(), 55 jdb = L4.Env.jdb, -- to set the server name 56 }, 57 log = { "ext2svr", "y" }, 58 }, 59 "rom/ext2_server", "blockserver", "1", "40", "fsserver"); 60 61 -- Obtain user filesystems with umask 0022 (18). 62 63 local open_for_user = 6; 64 local ext2server_paulb = L4.cast(L4.Proto.Factory, ext2server):create(open_for_user, 1000, 1000, 18); 65 66 local process_server = l:new_channel(); 67 68 l:startv({ 69 caps = { 70 fsserver = ext2server_paulb, 71 prserver = process_server:svr(), 72 jdb = L4.Env.jdb, -- to set the server name 73 }, 74 log = { "process", "y" }, 75 }, 76 "rom/process_server", "l4/exec_region_mapper"); 77 78 l:startv({ 79 log = L4.Env.log, 80 caps = { 81 fsserver = ext2server_paulb, 82 pipeserver = pipe_server, 83 prserver = process_server, 84 }, 85 }, 86 -- program, options, operation involving a script file 87 "rom/fsaccess", "-m", "0022", "script", "-");