Litmus-RT on UDOO

Discussion in 'Kernels' started by Flygbussarna, Mar 30, 2015.

  1. Flygbussarna

    Flygbussarna New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Likes Received:
    0
    Hey everyone,

    I'm a student at the university of Antwerp and I'm currently working on my master's project.
    My thesis is about real-time scheduling algorithms on embedded systems and what I
    basically need is an embedded system with an RTOS to perform some tests on.
    My university provided me with a UDOO-quad board as the embedded system.

    Some important features the RTOS I'm looking for must have are:

    - it should be compatible with the UDOO board
    - it shouldn't cost too much
    - it is preferably open source or there's at least the possibility to implement my own scheduling algorithms

    After doing a little bit of research on what's on the market
    I decided that the litmus-rt kernel mod might be interesting.
    More information can be found on the following website: http://www.litmus-rt.org/.
    This is a mod that alers the linux kernel in a way that real-time behaviour is made possible and is also
    specifically created to perform tests on. It is built on Linux kernel version 3.10.41.

    I tried to install both the unmodded kernel and the modded kernel several times,
    but when I boot up the device again the screen just remains blank and nothing really seems to happen.

    Right now I'm wondering what's actually going wrong all the time.
    Is it the kernel that's not compatible, could it be the drivers or did I do
    something wrong during the configuration/installation procedure?

    I must admit that I'm completely new to the subject of kernels and that I'm not really savvy about them yet :(.
    So far I didn't really find a guide or anything about how to install an alternate kernel on the UDOO board,
    but I did find this guide to recompile the Udoobuntu kernel:
    http://osp.uniparthenope.it/?q=udoo-kernel-how-recompile-udoobuntu-kernel.
    I tried the procedure as described in the guide above, but with kernel version 3.10.41 instead of the kernel used in the guide.
    Of course the command "sudo make ARCH=arm UDOO_defconfig" didn't work, so I tried it without the "UDOO_defconfig".
    I didn't actually expect it to work like that anyways, but at least it was worth a try.

    I'm really stuck in here. Any tips or other useful information are much appreciated! :)
    Thanks in advance!

    Kind regards,
    Joeri
     
  2. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    You can use few different kernels: official 3.0.35, semi official 3.10.9, unofficial 3.14.xy and unofficial 3.18.
    You need kernel which actually supports udoo.
     
  3. Flygbussarna

    Flygbussarna New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Likes Received:
    0
    vpeter,

    Many thanks for your reply. Do you mean that the only kernels compatible with the UDOO board are the ones
    you've listed in your post? The problem is that the Litmus-rt kernel is built for kernel version 3.10.41.
    I'm not enterely sure yet, but I'm afraid this kernel is inot supported by the UDOO board indeed.

    Kind regards,
    Joeri
     
  4. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    If not supported then try to merge changes anyway. It's part of your thesis :)
     
  5. Flygbussarna

    Flygbussarna New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Likes Received:
    0
    All right I'll try to do that :)
     
  6. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    As you've noticed, stock kernels are missing important drivers and initialization code needed by the Udoo board. I think much of this necessary code originates from Freescale (formerly Motorola semiconductor), makers of the i.MX6 chip that serves as Udoo's main CPU.

    Getting both the Udoo patches as your RTOS patches to coexist should be possible, but will be a lot of work, sort of a crash course in kernel development :) As a first step, I'd recomend compiling and booting the "semi-official 3.10.9" Udoo kernel mentioned by vpeter, without any RT or other patches, since this is the closest one available to the 3.10.41 your RTOS expects. Once this is working, make a copy of the source tree for safekeeping (to revert back to after any subsequent failed changes).

    I'm not familiar with Litmus-RT at all, but assuming it's available as a patch set rather than a self-contained kernel, you could try applying those patches to the 3.10.9 tree, hoping the versions are close enough to work. Due to this mismatch, there will almost certainly be some failed patches, though (".rej" files) that will need to be manually applied, perhaps after slight code changes. Sometimes, if you're lucky, the failure is just due to line numbers being too far away from what the patch file specifies.

    Another way to go would be to grab all the official patches after 3.10.9 from ftp.kernel.org (ftp://ftp.kernel.org/pub/linux/kernel/v3.x/, download patch-3.10.??.bz2) , applying each of them in turn to bring your Udoo-enabled kernel up to 3.10.10, then 3.10.11, 3.10.12... then (after, again making a safe back-out copy of the updated tree) try applying the RT patch as a final step.

    For some reason I'm only seeing kernel versions up through 3.10.25 on that official site, though, so I don't know where .26 through .41 might be hiding.. maybe in some separate "testing" or "experimental" directory? I haven't had any need to try these bleeding-edge releases myself.

    If all this seems like too much, you might be better off testing your RT code on a normal PC (for which the stock, unpatched kernels are intended), saving the Udoo for some other project. Due to assorted hardware differences, just about all Linux-capable embedded ARM boards are going to require some customizations to the stock kernels... you'd be in the same position with, say a Raspberry Pi, Wandboard, Technologic TS-7xxx or Beaglebone Black.
     
  7. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    I notice there's an earlier version of Litmux-RT based on kernel 3.10.5, rather than 3.10.41 -- this one should have s a better chance of applying cleanly to the Udoo-compatible (albeit "unofficial") 3.10.9, once you have that kernel working.

    See https://wiki.litmus-rt.org/litmus/Releases and scroll down to "Previous Releases"
     
  8. Flygbussarna

    Flygbussarna New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Likes Received:
    0
    fetcher,

    Thanks a lot for your reply.
    I'll try out your proposals and see if any of them works :)

    Kind regards,
    Joeri
     
  9. Flygbussarna

    Flygbussarna New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Likes Received:
    0
  10. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    Flygbussarna, yes, this is the correct link.
     
  11. mohamed_fawzy

    mohamed_fawzy New Member

    Joined:
    Jul 13, 2015
    Messages:
    11
    Likes Received:
    1
    did you successfully use RTOS on UDOO ?
    i also need to use RTOS on UDOO , can you help me ?

     
  12. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240

Share This Page