Is L4Linux can use its existed Linux driver to access hardware device?

Zhe Zhao zhe.alex.zhao at gmail.com
Fri Sep 9 11:49:12 CEST 2016


Hi,

Majorly I'd like to run a Android M with L4Linux on my ODROID-XU4, board,
but I'm not sure is that possible, seems there is a L4Android already, but
it is running
on a qemu with strange two androids run together.

Is there similiar project in your side, and is that a good idea to run
Android on L4Linux, if I understand it correct, I just need to port needed
linux driver to L4Linux, and
build a native google android, then it should work?

I want to achieve Android together with a subsystem can achieve hard real
time, instead of using weird VM solutions.


Thanks
Br
Alex


2016-09-09 14:27 GMT+08:00 Matthias Lange <matthias.lange at kernkonzept.com>:

> Hi,
>
> On 09/07/2016 09:00 AM, Zhe Zhao wrote:
> > Hi,
> >
> > Thanks for you answers.
> >
> > Does Fiasco use the scheduler that follow the priority? I mean like if
> > there is high priority task, it will always have CPU?
>
> I would like to point you to this recent thread on the mailing list
> which discusses details about L4Re's scheduling [1].
>
> > Does Fiasco already support tickless kernel? or it will use a fixed 1000
> > HZ as the tick?
>
> There is some support for tickless/oneshot mode in the L4Re microkernel
> but it is not tested.
>
> > I'd like to run L4Linux on a Droid-xu4 or raspberry is there any easy
> > start guide for it?
>
> Unfortunately no. But it is not complicated either. You can take the
> L4Linux basic example as a starting point. You need to build the L4Re
> microkernel for the right platform. The userland needs to be compiled
> for the right ARM architecture (Rasperry Pi is ARM6k whereas the Droid
> is ARMv7). Then you create an uImage which you can e.g. boot via tftp.
>
> > When I tried the L4Linux with ramdisk which in the L4Re snapshot, it
> > seems the it just like running a Linux. I don't know if below
> > understanding is correct, if not please correct me
> >
> > The syscall fork "int 80" will be redirect to L4Linux from Fiasco by IPC
> > (how Fiasco knows to redirect int 80 through IPC to L4Linux?), and fork
> > will be executed inside L4Linux, then L4Linux will create Fiasco task?
> >  (so here we have two task proc combined to identify one linux process),
> > and L4Linux will create vmspace for the process ? then how the memory
> > space be handled to Fiasco?
>
> L4-like systems have the concept of an exception handler per thread. For
> L4Linux this means that all exceptions triggered by a Linux user process
> are send to the L4Linux kernel.
>
> In the case of fork() the L4Linux kernel eventually creates a new L4
> task (l4_factory_create_task). Memory gets mapped from the L4Linux task
> into the new task e.g. upon pagefaults.
>
> > From the above assumption, it means I can just build a rootfs with
> > native Linux apps, and use IO manager to pass the harddisk/emmc to
> > L4Linux, then I can run whatever apps I like?
>
> Basically yes. On ARM platforms there are some stumbling blocks for sure
> as device pass-through can be tricky at times.
>
> > I'd like to start read codes related to Fiasco, L4Re, any suggestions
> > about the start point?
>
> That's a very generic question and the generic answer for the L4Re
> microkernel is: fiasco/src/kern. Do you have any specific mechanisms in
> mind you want to understand?
>
> Matthias.
>
>
> [1] http://os.inf.tu-dresden.de/pipermail/l4-hackers/2016/007907.html
>
> >
> > Br
> > Alex
> >
> >
> > 2016-09-06 23:37 GMT+08:00 Matthias Lange
> > <matthias.lange at kernkonzept.com <mailto:matthias.lange at kernkonzept.com
> >>:
> >
> >     Hi,
> >
> >     On 09/05/2016 11:36 AM, Zhe Zhao wrote:
> >     > Hi,
> >     >
> >     > Thanks for your answers, I really appreciate it.
> >     >
> >     > I tried to run L4Linux and L4Re in a qemu environment, is it
> support SMP
> >     > already? I found I only have a single core L4Linux running. and
> Fiasco
> >     > report only one scheduler instance.
> >
> >     Yes, SMP is supported. Have you configured the L4Re microkernel with
> >     multiprocessing support? Did you start qemu with multiple CPUs? To
> >     enable more CPUs in L4Linux you need to pass the 'l4x_cpus=<VALUE>'
> >     parameter on the cmdline.
> >
> >     > And is it possible to direct reuse the L4Linux's driver instead of
> >     > rewrite them in L4Re? is that IO manager used to mapping all needed
> >     > device physical address to L4Linux's memory space? Is that mean I
> can map
> >     > all device direct to L4Linux through IO manager?
> >
> >     Yes, but there might be work involved. First you should make yourself
> >     familiar with the concepts of Io [0].
> >
> >     > Is there any work ongoing to support ARM64 on L4Re and L4Linux? It
> will
> >     > be quite interesting consider most of the ARM device are moving to
> be 64
> >     > bit arch.
> >
> >     We are looking at it but there is nothing to announce publicly right
> now
> >
> >     > Do you have some recommend documents for the newbie like me to get
> a
> >     > quick start up?
> >
> >     The L4Re documentation [1].
> >
> >
> >     Matthias.
> >
> >     [0] http://l4re.org/doc/io.html
> >     [1] http://l4re.org/doc/
> >
> >     > Br
> >     > Alex
> >     >
> >     > 2016-09-02 14:24 GMT+08:00 Matthias Lange
> >     > <matthias.lange at kernkonzept.com
> >     <mailto:matthias.lange at kernkonzept.com>
> >     <mailto:matthias.lange at kernkonzept.com
> >     <mailto:matthias.lange at kernkonzept.com>>>:
> >     >
> >     >     Hi,
> >     >
> >     >     On 08/31/2016 02:35 PM, Zhe Zhao wrote:
> >     >     > Hi,
> >     >     >
> >     >     > After read the basic ideas of L4Linux I have some questions
> >     related to it.
> >     >     >
> >     >     > Is L4Linux run as a paravirtualization VM on L4Re? Then the
> >     traditional
> >     >     > Linux Process just still compiled against Linux system and
> >     put them
> >     >     > together with L4Linux disk image?
> >     >     > so it means L4Re works like qemu and Linuxl?
> >     >
> >     >     No, L4Re does not work like qemu.
> >     >
> >     >     > or L4Re works as a micro kernel operating system, and
> >     L4Linux run as a
> >     >     > process on it, all devices handled to L4Linux to reuse the
> >     drivers of
> >     >     > L4Linux? and the previous Linux process
> >     >     > compiled with Linux, but run direct on L4Re as L4 processes
> >     which
> >     >     > communicate with L4Linux through IPC?
> >     >
> >     >     L4Linux is a modified version of the Linux kernel with the
> >     hardware
> >     >     abstraction layer (HAL) implemented using L4Re primitives.
> >     Technically
> >     >     L4Re appears to be "just" another hardware architecture for
> >     the Linux
> >     >     kernel, just like ARM or MIPS.
> >     >
> >     >     L4Linux runs as a user space task on top of the L4Re
> >     microkernel and at
> >     >     the (Linux) kernel ABI is unmodified which allows to run
> >     existing Linux
> >     >     programs. That means, you can compile "normal" Linux programs
> >     with your
> >     >     standard tool chain, put the binary onto a ramdisk or disk
> >     image and run
> >     >     it with L4Linux.
> >     >
> >     >     > it is quite confused after read a little of the codes, in
> >     L4Linux, seems
> >     >     > there is some injection of L4 task stuffs inside
> >     thread_struct of Linux,
> >     >     > but also have some vCPU related stuffs,
> >     >     > can you help me about what is the real behavior of L4Linux?
> >     >
> >     >     Each (Linux) process is actually an L4Re task with the
> >     exception and
> >     >     page fault handler set to the L4Linux task. That's why some
> >     L4-specific
> >     >     additions are required to Linux kernel data structures.
> >     >
> >     >     Matthias.
> >     >
> >     >     > I'm sorry to ask this basic questions, but after some
> >     digging I feel
> >     >     > quite confused about how it works.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20160909/e994f0b0/attachment.htm>


More information about the l4-hackers mailing list