[LITMUS^RT] Starting Liblitmus

Glenn Elliott gelliott at cs.unc.edu
Sun May 31 10:36:02 CEST 2015


> On Fri, May 29, 2015 at 6:23 PM, Björn Brandenburg <bbb at mpi-sws.org <mailto:bbb at mpi-sws.org>> wrote:
> 
> > On 29 May 2015, at 13:13, Dhanny R <dhanker2626 at gmail.com <mailto:dhanker2626 at gmail.com>> wrote:
> >
> > Hello Sir Björn
> >
> > i have many question about LITMUS,
> > i'm interested because for my tesis research...
> > and i'm newbie for this
> >
> > my question are :
> > 1. i have many task for testing in liblitmus, it's right if i edit from base_mt_task (multicore)
> > or base_task (single core) or i must create a new file from liblitmus directory?
> >
> > 2. how can i compile the code that i build? if any tools must be installed like gcc or something else, in which directory i must installed? in liblitmus or any?
> >
> > 3. if my step wrong, could you give me reference how step by step using this tools?
> >
> > glad to know for the fast response
> 
> 
> Dhany, I’m glad that you are interested in using LITMUS^RT for your thesis research, but the questions that you are now asking pertain to issues that are not LITMUS^RT specific and not appropriate for this mailing list. Some experience working with moderately complex C code bases and Linux is required to make use of LITMUS^RT.
> 
> To answer your questions:
> 
> 1) You may organize your code any way you like. The two dummy skeletons exist to make starting up easier, but their use is entirely optional.
> 
> 2) Like most C libraries, liblitmus comes with a makefile. Of course a working gcc toolchain is required.
> 
> 3) I suggest you first learn how to build regular C programs on Linux, and how to use make. Once you know how to do that LITMUS^RT is fairly straightforward to use.
> 
> Best regards,
> Björn
> 
> On May 31, 2015, at 1:02 AM, Dhanny R <dhanker2626 at gmail.com> wrote:
> 
> hello again, 
> when i want to compile my program with gcc, the error message fatal error: litmus.h: No such file or directory, after i found the directory and compile again, error message shown fatal error: asm/cycles.h  No such file or directory, 
> 
> my question, which directory i can find litmus.h, asm/cycles.h?
> 
> thanks
> 
> regards


Hi Dhanny,

The makefile for liblitmus automatically copies header files that from litmus-rt.  Some of these headers are created/generated when you compile the litmus kernel.

This means:
	(1) Litmus must be compiled before liblitmus in order to create the required generated files.
	(2) litmus-rt and liblitmus directories must share the same parent directory.*  (Please see https://github.com/LITMUS-RT/liblitmus/blob/master/Makefile#L151 <https://github.com/LITMUS-RT/liblitmus/blob/master/Makefile#L151>)

Let’s say that you have cloned the litmus-rt and liblitmus git repositories in your home directory (~/ or $HOME).  You would follow these general steps:

1) cd $HOME
2) Run “ls” in your home directory.  Confirm that you see “litmus-rt/“ and “liblitmus/“ directories.
3) compile litmus-rt
	a) cd litmus-rt
	b) (set up your .config file for the kernel)
	c) make
4) cd $HOME
5) compile liblitmus
	a) cd liblitmus
	b) make
	c) Run “ls”.  You should see compiled liblitmus tools such as executables “rt_spin”, “rt_launch”, “base_task”, and “base_mt_task".

Hope this helps.

-Glenn

* This is actually a half-truth.  You may configure liblitmus to look for the litmus-rt files in a different location by setting the LITMUS_KERNEL makefile variable.  By default, this variable is set to “LITMUS_KERNEL ?= ../litmus-rt”.  Please see https://github.com/LITMUS-RT/liblitmus/blob/master/Makefile#L15 <https://github.com/LITMUS-RT/liblitmus/blob/master/Makefile#L15>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20150531/45c91e87/attachment.html>


More information about the litmus-dev mailing list