[ASK] Basic L4Re

Matthias Lange matthias.lange at kernkonzept.com
Mon Dec 1 10:21:40 CET 2014


Hi,

I'm posting this on l4-hackers also, as it might be of interest for
other people as well.

On 11/27/2014 04:27 PM, Erry Pradana Darajati wrote:
> Greeting Mr. Matthias,
> Thank you for the help in my last email. I have already solve some of my
> problem thanks to your help.
> But i still have some problem and question :
> 
> 1. About the IO server you mentioned before. I still cannot fully
> comprehend about the OMAP3 driver you said earlier. As i study in
> OMAP4460 TRM, i have know the memory that directly accessed to make GPIO
> of OMAP4460 (Pandaboard) works. And i already make it works with a
> hardcoding (code without L4Re API) by assign directly the memory address
> of GPIO. Can you help me to short explain or gave me a reference about
> IO server and how to use it to access the memory address of GPIO ?

I am not exactly sure what you mean. Instances of the GPIO driver are
created through Lua configuration files. You can see an example in
io/config/plat-rpi_b/hw_devices.io. There you can also specify the
memory base address of the GPIO chip. An example for Omap3 looks like this:

GPIO = Hw.Device(function()
    GPIO1 = Hw.Gpio_omap35x_chip(function()
      hid = "gpio-omap35x-GPIO1";
      compatible = {"ti,omap3-gpio"};
      regs = Res.mmio(0x48310000, 0x48310fff);
      irq = Res.irq(29);
      scm_table = 0;
    end);
end);

> 2. I still studied the basic of L4Re, and try to run an hello-cfg entry
> in modules.list. But when i run using make qemu, it gave an error like
> this.
> "make[1]: Entering directory `/media/chiqiVstorage/l4resnap/src/l4'
> Could not find 'hello.cfg' with path
> '/home/erry/l4resnap/src/kernel/fiasco/build86/:/media/chiqiVstorage/l4resnap/src/l4/build86/bin/x86_core2:/media/chiqiVstorage/l4resnap/src/l4/build86/bin/x86_core2/l4f:/media/chiqiVstorage/l4resnap/src/l4/build86/lib/x86_core2:/media/chiqiVstorage/l4resnap/src/l4/build86/lib/x86_core2/l4f'
> make[1]: *** [qemu] Error 1
> make[1]: Leaving directory `/media/chiqiVstorage/l4resnap/src/l4'
> make: *** [qemu] Error 2"
> 
> where did i go wrong ?

You need to add /media/chiqiVstorage/l4resnap/src/l4/conf/examples to
your MODULE_SEARCH_PATH.

Best,
Matthias.

> Sorry for the basic question. Any answer and response is really helping
> me understand this research and project better, and i really appreciate
> that.
> 
> 2014-10-13 15:23 GMT+07:00 Matthias Lange
> <matthias.lange at kernkonzept.com <mailto:matthias.lange at kernkonzept.com>>:
> 
>     Hi,
> 
>     On Sat, Oct 11, 2014 at 01:21:11AM +0700, Erry Pradana Darajati wrote:
>     > Hello L4 Hackers
>     >
>     > I am working on a project with L4Re in Pandaboard for my College Final
>     > Project. And right now i am in a stuck.
>     >
>     > So far, i have already know how to boot, print and read from the serial
>     > port (UART3) of pandaboard. But i can't understand the fundamental / basic
>     > of L4Re itself.
> 
>     A good starting point is the L4Re documentation [0]. This should get you
>     started.
> 
>     > Like how to make a new program outside the main program of "hello" (i am
>     > using hello code all of this time to experimenting). And also how to access
>     > the memory of the host computer using L4Re code.
> 
>     Just create a new directory within you pkg directory. From there you
>     can call
>     '../../mk/tmpl/inst' which installs the default directory hierarchy and
>     Makefiles.
> 
>     > Because the main goal of the project i am working on is be able to access
>     > the GPIO of Pandaboard.
> 
>     The io server already provides infrastructure and the API for GPIO
>     drivers.
>     Please have a look at the existing BCM2835 and OMAP3 drivers.
> 
>     > And also, is there is any way to recompile L4Re without recompiling all of
>     > the module it use. Because in my computer it took a time to recompile even
>     > the change is only a line of code
> 
>     You have multiple possibilities. Change into your pkg's directory
>     and call
>     'make -jX O=/path/to/obj/dir' or from your build directory you can
>     call 'make
>     -jX S=YOUR_PKG_NAME'. Note that the latter will not check and
>     rebuild the pkg's
>     dependencies.
> 
>     Matthias.
> 
>     [0] http://os.inf.tu-dresden.de/L4Re/doc/
> 
> 
>     --
>     Matthias Lange, matthias.lange at kernkonzept.com
>     <mailto:matthias.lange at kernkonzept.com>, +49 - 351 - 41 88 86 14
> 
>     Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
>     Geschäftsführer: Dr.-Ing. Michael Hohmuth
> 
> 
> 
> 
> -- 
> /Regards,/
> /Erry Pradana Darajati | *Student of Computer Engineering*/
> /*Politeknik Elektronika Negeri Surabaya / EEPIS, Indonesia*/




More information about the l4-hackers mailing list