Riot + Linux

Hello everyone,

  I have been playing on some nodes with Cortex-A8 running Linux. I was wondering if you guys have thought about the general idea of running Linux in parallel or on top of Riot ?   This had been done some time ago on RTLinux for instance ( http://en.wikipedia.org/wiki/RTLinux ). Compared to the native port, it could be a nice alternative way to bring real-time capabilities to Linux.   Of course, this could be lot of work, but maybe it is possible to have some limited functionality, to get Linux running along with Riot-OS (e.g. each OS addressing different peripherals + necessary modified management of timers/memory/interrupts/...) ?   Do you think it is possible or just a dream :slight_smile: ?

Best regards, -- Cedric

Hi C�dric,

sorry for the late reply.

The Idea of running RIOT alongside Linux is definately possible. I've been thinking of this for a while. IMHO the best way would be to somehow get RIOT running in Linux as a kernel module, completely taking over one of the cores so Linux's scheduling doesn't get in the way (which is the whole point of this).

Unfortunately, in order to make this useful (e.g., interacting with the hardware), this will always be very CPU/hardware dependent.

We'll have to put in some serious research on how to do this properly.

But this is definately not a dream, but something we should keep on our roadmap. :wink:

Cheers, Kaspar

Hello,

I'm David from Sydney (but working in Tokyo at the moment) and I'd be best described as an Applications developer interested in Riot. I'm interested in cross-platform IoT operating-systems and I think Riot will fill a gap.

Lately I have been working on an Event-Framework that gives application layer support on a few different platforms. Namely the Attiny85 and Linux: https://github.com/clixx-io/clixx.io/tree/master/eventframework

What I'd suggest is just cloning your API so that it works under Linux. So that a User can compile and run "Riot" programs within Linux just by using the native Linux libraries and so forth. In other words, Riot emulation in Linux.

The reason I say this, is by asking the question "What do you want to achieve?"

To me, it's just use Linux as a development/test platform. It allows me to run and test my Attiny85 programs on my notebook/desktop whenever I want.

I'm doing this with my framework at the moment where I can compile and run [to-a-growing-degree] the same C++ program on the Attiny85 and Linux. Just by changing the makefile.

I suggest "don't" try to duplicate Riot under Linux, just use everything in Linux that's already there that does the same sort of thing. Linux is probably (guessing) just bigger, bloatier and has a super-set of everything you actually want.

I'm interested in how Riot progresses and porting my Event-Framework to run on it if all goes well.

Regards

David

Hi David,

Hi David,

Hi David,

What I'd suggest is just cloning your API so that it works under Linux. So that a User can compile and run "Riot" programs within Linux just by using the native Linux libraries and so forth. In other words, Riot emulation in Linux.

We actually already have that. We call it the 'native port' and it's very stable and tremendously for debugging and getting started with RIOT in general.

The reason I say this, is by asking the question "What do you want to achieve?"

Linux is a lot heavier for usage as real-time OS. It could be useful to make the two kernels run alongside and use RIOT for the real-time specific parts.

I.e., the udoo guys have a very powerful ARM quad-code and a second ARM MCU just for connecting / running Arduino shields. If RIOT could somwhow run on the main core but closer to the hardware, the second MCU could be saved.

I'm interested in how Riot progresses and porting my Event-Framework to run on it if all goes well.

Awesome! Looking forward to see your port! :wink:

Cheers, Kaspar

Hi Ludwig and everybody,

I'm not 100% sure if that's what you mean, but I think we've already got that. It's called the native port which you can compile by specifying native as the board.

Yes, excellent. That is what I meant.

One point, you just can't run a RTOS (Riot) under a non-RTOS (Linux) by definition for timing specific checks. It will never be right, because the non-rtos has cooperative scheduling which never assures realtime operation which I'm assuming Riot provides.

It's great work you already have a Native-Port as you call it.

I will try it out.

Regards

David

Hi David,

Just to make this clear: Yes, the process will not be able to fulfill realtime guarantees with regard to hardware events. This is inherited from the host OS. And no: the native port does not rely on cooperative scheduling.

Cheers, Ludwig