Guten Tag,
I've got the Hello app runing with fiasco and l4re in qemu, how do I get
the graphical UI and console running that I see on the screen shots page?
Do I need to use l4con and mag? I don't see an entry with l4con in
modules.list.
danke
* <http://german.about.com/library/media/Audio/gutentag.wav>*
Hello,
yesterday I came across a very interesting paper titled "Porting FUSE to L4Re", accessible here: http://os.inf.tu-dresden.de/papers_ps/pester-beleg.pdf
For porting FUSE, the author uses a library called "libfs" which provides filesystem request forwarding and processing, if I understood correctly. It reads as if libfs is already included in L4Re.
However, I couldn't find neither FUSE nor libfs in the current L4Re snapshot. Are they by any chance publicly available somewhere else, or are …
[View More]both not to be published?
Cheers,
Josef
[View Less]
Hello hackers,
I'm trying to run Fiasco.OC in secure world and Linux in non-secure
world on i.MX6Q. For this I'm using the TrustZone example
(pkg/examples/sys/vm-tz). To secure world I have given 128MB RAM
starting from 0x10000000 and I modified the example to give NS world
256MB starting from 0x20000000. I've replaced atags with dtb of my board
and it is copied to NS side like kernel and initrd.
At first I encountered runtime exception, which I fixed by implementing
following to …
[View More]arm_em_tz builds
Thread::arch_ext_vcpu_enabled() { return true; }
Now I'm having problems at early stages of NS boot, where Linux kernel
is checking for the dtb magic. The code loads the dtb magic from the
address I'm giving in r2 register (0x21000000), but the magic value
usually have one byte or all of them incorrect.
I've used JDB to dump the area of dtb after hitting that error and it
shows the dtb magic properly. So for some reason the NS-world gets
mangled value. Any idea what might be causing this?
Thanks,
Markku
[View Less]
Hello all,
for a project, I want to be able to load (elf-)binaries not only from the filesystem, but also from the network (receive binary, then start it.) For this, I will write a L4 app (let's call it "manager" for now) which handles the network part and then tells ned to start the received binary via a special "filename". I already modified ned so that its LUA-interface is exposed to other apps via a capability.
But here comes the first problem: Normally you specify the capability table …
[View More]of a task and an IPC channel in the lua-config file, which ned reads. Ned then prepares the channel and the caps table and starts the task, which then can register the capability. Otherwise, registering fails (the example would do a printf("Could not register my service, is there a 'calc_server' in the caps table?\n");)
So... how do I specify which capabilities ned itself can have/register? Currently, I need to have a lua-config which tells ned to start another instance of ned with the required permission to register the capability. But is there any way to avoid having two ned instances and making the first (and only) instance able to register the cap?
Second problem: I found out, that ned (also moe) doesn't start the desired app directly but instead starts the l4re binary (source located in src/l4/pkg/l4re_kernel), passing it the filename of the desired binary. l4re, once started, gets the dataspace of this file and then ultimately starts the app. For my purpose, I would modify l4re_kernel so that if it detects the special "filename" mentioned above, it does not read the file from the filesystem but loads the binary that the "manager" received over the network. To get the data from the manager to the l4re_kernel instance, I thought that a shared dataspace or a shared memory area l4shmc_area_t like in prdocons.c example would be suitable. However, again, both of these things normally require special parameters in the lua config file (as can be seen in the examples), but I have no clue how to do this to l4re_kernel since it is not loaded from such a file, but loaded implicitly each time a new task is started. (so I guess this makes it even harder than the problem with ned since ned is only started once.)
Does anyone have ideas on how to solve these?
If someone finds that I phrased this too opaque, please let me know.
Best regards,
Josef Stark
[View Less]
Hi
I'm testing Fiasco.OC+L4re on YSE5250 (Exynos 5250) Board. I have
compiled and tested some examples. I'm testing a GPS Driver for the
board. The GPS is conected over UART3 at 9600 baudrate, first I'm
testing UART3 port comunicating the UART1 serial output with UART3. I'm
following as example the serial-drv package on L4re.
I have adapted the source code to my uart driver
>>> gps_drv.cc
#include <l4/drivers/uart_s3c2410.h>
#include <l4/io/io.h>
#include …
[View More]<l4/re/env>
#include <l4/re/error_helper>
#include <l4/re/namespace>
#include <l4/re/util/cap_alloc>
#include <l4/re/util/object_registry>
#include <l4/re/util/icu_svr>
#include <l4/re/util/vcon_svr>
#include <l4/sys/irq>
#include <l4/util/util.h>
#include <cstdlib>
#include <cstdio>
#define IRQ_NUM 86
#define UART_BASE 0x12C30000
static L4::Cap<void> srv_rcv_cap;
class Loop_hooks :
public L4::Ipc_svr::Ignore_errors,
public L4::Ipc_svr::Default_timeout,
public L4::Ipc_svr::Compound_reply
{
public:
void setup_wait(L4::Ipc::Istream &istr, bool)
{
istr.reset();
istr << L4::Ipc::Small_buf(srv_rcv_cap.cap(),
L4_RCV_ITEM_LOCAL_ID);
l4_utcb_br_u(istr.utcb())->bdr = 0;
}
};
using L4Re::Env;
using L4Re::Util::Registry_server;
static Registry_server<Loop_hooks> server(l4_utcb(),
Env::env()->main_thread(),
Env::env()->factory());
using L4Re::Util::Vcon_svr;
using L4Re::Util::Icu_cap_array_svr;
class GPS_server :
public Vcon_svr<GPS_server>,
public Icu_cap_array_svr<GPS_server>,
public L4::Server_object
{
public:
GPS_server();
virtual ~GPS_server() throw() {}
bool running() const { return _running; }
int vcon_write(const char *buffer, unsigned size);
unsigned vcon_read(char *buffer, unsigned size);
L4::Cap<void> rcv_cap() { return srv_rcv_cap; }
int handle_irq();
bool init();
int dispatch(l4_umword_t obj, L4::Ipc::Iostream &ios);
private:
bool _running;
L4::Uart *_uart;
L4::Cap<L4::Irq> _uart_irq;
Icu_cap_array_svr<GPS_server>::Irq _irq;
};
GPS_server::GPS_server()
: Icu_cap_array_svr<GPS_server>(1, &_irq),
_running(false), _uart(0), _uart_irq(L4_INVALID_CAP),
_irq()
{
if (init())
_running = true;
}
int GPS_server::vcon_write(const char *buffer, unsigned size)
{
_uart->write(buffer, size);
return -L4_EOK;
}
unsigned GPS_server::vcon_read(char *buffer, unsigned size)
{
unsigned i = 0;
while (_uart->char_avail() && size)
{
int c = _uart->get_char(false);
if (c >= 0)
{
buffer[i++] = (char)c;
size--;
}
else
break;
}
// if there still some data available send this info to the client
if (_uart->char_avail())
i++;
else
_uart_irq->unmask();
return i;
}
int GPS_server::handle_irq()
{
if (_irq.cap().is_valid())
_irq.cap()->trigger();
return L4_EOK;
}
bool GPS_server::init()
{
l4_addr_t virt_base = 0;
// Mapeando memoria de registros del UART
if (l4io_request_iomem((l4_addr_t)UART_BASE, 0x1000,
L4IO_MEM_NONCACHED, &virt_base))
{
printf("gps-drv: request io-memory from l4io failed.\n");
return false;
}
printf("gps-drv: virtual base at:%lx\n", virt_base);
// Inicializando memoria de los registros del UART
L4::Io_register_block_mmio *regs = new
L4::Io_register_block_mmio(virt_base);
// Inicializando UART
_uart = new (malloc(sizeof(L4::Uart_s5pv210))) L4::Uart_s5pv210;
_uart->startup(regs);
/**
* FIX - Ajustando el BaudRate del UART
* Valores calculados experimentalmente a través del UART1
* SCLK_UART = 100 MHz
* TODO - Hacer el ajuste del BaudRate en el propio UART
*/
regs->write<unsigned int>(0x28,0x28a);
regs->write<unsigned int>(0x2C,0x0);
_uart_irq = L4Re::Util::cap_alloc.alloc<L4::Irq>();
if (!_uart_irq.is_valid())
{
printf("gps-drv: Alloc capability for uart-irq failed.\n");
return false;
}
if (l4io_request_irq(IRQ_NUM, _uart_irq.cap()))
{
printf("gps-drv: request uart-irq from l4io failed\n");
return false;
}
/* setting IRQ type to L4_IRQ_F_POS_EDGE seems to be wrong place */
if
(l4_error(_uart_irq->attach((l4_umword_t)static_cast<L4::Server_object
*>(this),
L4Re::Env::env()->main_thread())))
{
printf("gps-drv: attach to uart-irq failed.\n");
return false;
}
if ((l4_ipc_error(_uart_irq->unmask(), l4_utcb())))
{
printf("gps-drv: unmask uart-irq failed.\n");
return false;
}
_uart->enable_rx_irq(true);
srv_rcv_cap = L4Re::Util::cap_alloc.alloc<void>();
if (!srv_rcv_cap.is_valid())
{
printf("serial-drv: Alloc capability for rcv-cap failed.\\n");
return false;
}
return true;
}
int
GPS_server::dispatch(l4_umword_t obj, L4::Ipc::Iostream &ios)
{
l4_msgtag_t tag;
ios >> tag;
switch (tag.label())
{
case L4_PROTO_IRQ:
if (!L4Re::Util::Icu_svr<GPS_server>::dispatch(obj, ios))
return handle_irq();
case L4_PROTO_LOG:
return L4Re::Util::Vcon_svr<GPS_server>::dispatch(obj, ios);
default:
return -L4_EBADPROTO;
}
}
int main()
{
char buffer[100];
int tmp;
static GPS_server gps_srv;
// Register calculation server
if (!server.registry()->register_obj(&gps_srv, "gps_srv").is_valid())
{
printf("Could not register GPS service, is there a 'gps_srv' in
the caps table?\n");
return 1;
}
if (!gps_srv.running())
{
printf("Failed to initialize serial driver; Aborting.\n");
return 1;
}
gps_srv.vcon_write("Hola Mundo\n",11);
while(1){
tmp = gps_srv.vcon_read(buffer,11);
if(tmp>0)
printf("Readed data: %s\n",buffer);
}
// Wait for client requests
server.loop();
return 0;
}
I have created my run config file
>>> gps-drv.cfg
require("L4");
-- Shortcuts
local ld = L4.default_loader;
local vbus_uart03 = ld:new_channel();
local platform_ctl = ld:new_channel();
local gps_srv = ld:new_channel();
-- Start the IO Server
ld:start(
{
caps = {
sigma0 = L4.cast(L4.Proto.Factory,
L4.Env.sigma0):create(L4.Proto.Sigma0);
icu = L4.Env.icu;
platform_ctl = platform_ctl:svr();
uart03 = vbus_uart03:svr();
},
log = { "IO Server", "green" },
l4re_dbg = L4.Dbg.Warn,
}, "rom/io rom/yse5250.devs rom/yse5250.io");
-- Start the GPS Driver Server conected to UART3
ld:start(
{
caps = {
gps_srv = gps_srv:svr();
vbus = vbus_uart03;
},
log = {"GPS Driver","blue"}
}, "rom/gps_drv");
And have created the yse5250.devs and yse5250.io to put the UART3 on a
virtual BUS
>>> yse5250.devs
local Hw = Io.Hw
local Res = Io.Res
Io.hw_add_devices
{
UART3 = Hw.Device
{
hid = "UART3";
Res.irq(86);
Res.mmio(0x12C30000, 0x12C3ffff);
}
}
>>> yse5250.io
Io.add_vbusses
{
-- Create a virtual bus for a client and give access to UART3
uart03 = Io.Vi.System_bus(function ()
dev = wrap(Io.system_bus():match("UART3"));
end);
}
On modules.list have added an entry for my example
entry GPS-Driver
kernel fiasco -serial_esc
roottask moe rom/gps-drv.cfg
module l4re
module ned
module gps-drv.cfg
module gps_drv
module io
module yse5250.devs
module yse5250.io
After that i have compiled and uploaded the example to the board. At
runtime, i got the "Hola Mundo" over UART3 but when I write in the UART3
I never read the written information.
Something is wrong with my code?
--
Lic. Reinier Millo Sánchez
Centro de Estudios de Informática
Universidad Central "Marta Abreu" de Las Villas
"antes de discutir ... respira;
antes de hablar ... escucha;
antes de escribir ... piensa;
antes de herir ... siente;
antes de rendirte ... intenta;
antes de morir ... vive"
[View Less]
On 02/26/2015 02:11 PM, Harini Balachandran wrote:
> For getting ethernet on l4linux, what are the packages and network
> elements I should copy to ramdisk?
> As of now, my ramdisk has only the basic programs.I got this from l4re
> snapshot ie ramdisk-x86.rd.I have copied my target application
> program(compiled statically) alone to this ramdisk additionally.
> I tired copying /proc,/sys and /etc from ubuntu but the size goes
> beyond 1.5 GB.What are the essential …
[View More]packages for getting ethernet on
> l4linux?
> Thank you.
>
Files in /proc and /sys aren't general files.
They are a virtual filesystem provided by Linux.
sysfs is http://en.wikipedia.org/wiki/Sysfs
procfs is http://en.wikipedia.org/wiki/Procfs
So, it isn't needed that you copy them to ramdisk.
But if procfs isn't mounted , you can manually mount procfs.
For example
$ mount -t proc proc proc/
$ mount -t sysfs sys sys/
And the ramdisk already has enough packages and files to connect network.
Important thing is to successfully load ethernet driver on L4/L4linux
environment.
If you succeed in working ethernet driver, you can use commands 'ifup'
and 'ifdown','ifconfig' to connect network.
And you can check whether ethernet driver is loaded or not if you do
'dmesg | grep ethernet'.
Thanks,
Taeung
>
> Regards,
> Harini
[View Less]
I am getting an ERROR : NETWORK IS UNREACHABLE, when i run socket program
in l4linux.
I am using 64-bit host, upon that - virtual machine which is 32-bit, upon
that - ubuntu, upon that - fiasco+l4re+l4re+l4linux
*//l4linux_socket.io <http://l4linux_socket.io> file*
l4linux => new System_bus()
{
NIC => wrap(hw-root.NIC);
}
*//l4linux_socket.cfg*
-- vim:set ft=lua:
local lxname = "vmlinuz";
if L4.Info.arch() == "arm" then
lxname = "vmlinuz.arm";
end
loader = L4.…
[View More]default_loader;
vbus_l4linux = loader:new_channel();
loader:start(
{
caps={
sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0);
icu = L4.Env.icu;
l4linux = vbus_l4linux:svr();
},
},"rom/io -vv rom/l4linux_socket.io");
loader:start(
{ caps = {
log = L4.Env.log:m("rws"),
vbus = vbus_l4linux;
},
l4re_dbg = L4.Dbg.Warn,
log = { "l4linux", "yellow" },
},
"rom/" .. lxname .. " mem=64M console=ttyLv0 l4x_rd=rom/new_ramdisk
root=0:0 ramdisk_size=8400 init=/bin/sh");
*//l4linux_socket.list*
modaddr 0x01100000
entry l4linux_socket
kernel fiasco -serial_esc
roottask moe rom/l4linux_socket.cfg
module l4re
module ned
module l4linux_socket.cfg
module io
module l4linux_socket.io
module vmlinuz
module new_ramdisk
Please help us in resolving the error
Thank you
[View Less]
> On Feb 18, 2015, at 1:58 PM, Harini Balachandran <harinisbcn(a)gmail.com> wrote:
>
> Sir,
>
> I referred the document you suggested. I have set up my environment like this
> Base - windows 8 , 64- bit
> upon this, virtual machine , then UBUNTU, then l4re+fiasco+l4linux
>
> Procr = intel core i5 ,
> x86 board
What is your x86 board ?
What is your ethernet tranceiver ?
(I used ARM board which has Atheros AR8031 for gigabit ethernet )
>
> The …
[View More]document you sent was with respect to ARM procr.
> Can I use the same .io and .cfg files?
Yes, whichever procr you use you should use .io and .cfg to enable ethernet driver and network device on L4Linux.
But should change addresses in .io file like 'new-res Mmio(0x02188000 .. 0x0218BFFF);’.
You can find mmio addresses in data sheet for your CPU.
And refer to URL http://os.inf.tu-dresden.de/L4Re/doc/io.html <http://os.inf.tu-dresden.de/L4Re/doc/io.html>
Also should change information of architecture such as ‘if L4.Info.arch() == "arm” then’ in .cfg file
> If not, I dont know how to modify according to my set up.
> Also how to modify the l4linux source code as it has been done for ARM in the document ie mach_setup.c
>
What is the ethernet driver you’ll use ?
Where is source codes for the ethernet driver ?
(I used ‘FEC ethernet driver’)
If mach_setup.c hasn’t registering 'platform device’ for your ethernet driver, should add it to mach_setup.c source code.
Thanks,
Taeung
>
> Kindly help
>
>
> Regards,
> Harini
>
> On Mon, Feb 16, 2015 at 12:29 PM, taeung <treeze.taeung(a)gmail.com <mailto:treeze.taeung@gmail.com>> wrote:
>
> On 02/16/2015 03:19 PM, Harini Balachandran wrote:
>> Hello sir,
>> We saw your question related to networking being posted on l4re mailing list.We request you to assist us.
>>
>> I have copied my binaries of socket program compiled statically to ramdisk for executing on l4linux.
>> When I execute,
>>
>> //server side
>> /tmp # ./server1
>> Socket created
>> bind done
>> Waiting for incoming connections....
>>
>>
>> //client side
>> /tmp # ./client1
>> connect failed. Error: Network is unreachable
>>
>> Please list us the network support drivers that are to be enabled in l4linux configuration.Is there any other changes that have to be made apart from enabling the networking support in l4linux?
>> Thank You.
>>
>
> 1. It is important that what is your boad and what is cpu on your board
> 2. You should register a network device in IO server
> 3. To access network device on L4 Linux, you need to configure ‘.io’ file
>
> 4. I don't know if this is of any help but I do hope so
> The link has a document about porting and enabling ethernet on L4Linux.
> http://developerpostit.blogspot.kr/search/label/l4%20device%20driver <http://developerpostit.blogspot.kr/search/label/l4%20device%20driver>
>
> Thanks,
> Taeung
>
>>
>> Regards,
>> Harini
>
>
[View Less]
On 02/16/2015 03:19 PM, Harini Balachandran wrote:
> Hello sir,
> We saw your question related to networking being posted on l4re
> mailing list.We request you to assist us.
> I have copied my binaries of socket program compiled statically to
> ramdisk for executing on l4linux.
> When I execute,
>
> //server side
> /tmp # ./server1
> Socket created
> bind done
> Waiting for incoming connections....
>
>
> //client side
> /tmp # ./client1
> …
[View More]connect failed. Error: Network is unreachable
>
> Please list us the network support drivers that are to be enabled in
> l4linux configuration.Is there any other changes that have to be made
> apart from enabling the networking support in l4linux?
> Thank You.
>
1. It is important that what is your boad and what is cpu on your board
2. You should register a network device in IO server
3. To access network device on L4 Linux, you need to configure ‘.io’ file
4. I don't know if this is of any help but I do hope so
The link has a document about porting and enabling ethernet on L4Linux.
http://developerpostit.blogspot.kr/search/label/l4%20device%20driver
Thanks,
Taeung
>
> Regards,
> Harini
[View Less]