The Internet Of Linux Things

The Linux Foundation is a non-profit organization that sponsors the work of Linus Torvalds. Supporting companies include HP, IBM, Intel, and a host of other large corporations. The foundation hosts several Linux-related projects. This month they announced Zephyr, an RTOS aimed at the Internet of Things.

The project stresses modularity, security, and the smallest possible footprint. Initial support includes:

  • Arduino 101
  • Arduino Due
  • Intel Galileo Gen 2
  • NXP FRDM-K64F Freedom

The project (hosted on its own Website) has downloads for the kernel and documentation. Unlike a “normal” Linux kernel, Zephyr builds the kernel with your code to create a monolithic image that runs in a single shared address space. The build system allows you to select what features you want and exclude those you don’t. You can also customize resource utilization of what you do include, and you define resources at compile time.

By default, there is minimal run-time error checking to keep the executable lean. However, there is an optional error-checking infrastructure you can include for debugging.

The API contains the things you expect from an RTOS like fibers (lightweight non-preemptive threads), tasks (preemptively scheduled), semaphores, mutexes, and plenty of messaging primitives. Also, there are common I/O calls for PWM, UARTs, general I/O, and more. The API is consistent across all platforms.

You can find out more about Zephyr in the video below. We’ve seen RTOS systems before, of course. There’s even some for robots. However, having a Linux-heritage RTOS that can target small boards like an Arduino Due and a Freedom board could be a real game changer for sophisticated projects that need an RTOS.

43 thoughts on “The Internet Of Linux Things

    1. Hmmm, Zephyr supports Linux as the Cloud in an IoT system. So, Zephyr seems to build a custom RTOS for the “IoT thing” that is then able to SECURELY connect the Zephyr generated RTOS to the Linux cloud. (Am I right or am I right?)
      Very well managed site with code review and a sandbox built out. This is the best thing to happen to embedded development since sliced bread.

      1. I’d struggle to call any ring-0 RTOS (which this appears to be) secure, at least at the local execution level. Your system would go down from one failing process, and malicious code could dump all stored memory.

        That said, I really like the idea.

    1. I admit that I haven’t looked into the documentation but the press release says that there is support for the NXP FRDM-K64F Freedom board which uses an ARM Cortex M4. Besides, what does the target processor architecture have to do with the types of application that the system is optimized for? To me IoT OS should have solid networking support built in. Ethernet stack, Bluetooth stack, WiFi drivers, and support for other channels of communication that enable an IoT device to talk to the rest of the world.

  1. Hopefully this will put working with the internet of things into the hands of hackers who will help it reach its potential, because as it stands this whole concept of everything linked looks to me like a solution in search of a problem.

  2. When talking about RTOS there’s a link to a page talking about ROS (Robot Operating System), but ROS isn’t a real time operating system. It is a collection of software frameworks that run on top of an operating system. It is usually ran on Ubuntu which is not real-time. I think I’ve heard the future ROS 2.0 will have some real-time support though.

  3. No impressions of the RTOS itself yet, but I have to say setting up the development environment *on Linux* is ironically pretty ugly here. Downloads of massive binary blob installers full of toolchains, etc. which then spew themselves about your filesystem, defaults and the guide only covering system-wide installation, environment variables everywhere.

    The mbedOS system is much more impressive and Linux-friendly in this respect, shoving all that spaghetti into docker containers, and a single “git command”-style entrypoint (with a single host-side shell script to make calling the “docker run” command more streamlined). That not only “contains” all the mess, but also makes the initial install and future upgrades easy, one-command affairs (docker pull mbed/yotta).

    mbedos comes across as being much more aware of how Linux is used in 2016 than this 1990s-esque view. The weird part is I can see how Zephyr’s system would make it easier to port the environment to Windows, yet mbedos is the only one that supports Windows at the moment. OTOH, I can see how the Zephyr approach of everything being in the host’s filesystem could be easier to use with the standard Makefile-style build process, vs. mbedos’s custom build system, and I can see the appeal of that.

    1. Yeah, it is disappoint to always see them referred to as a “non-profit organization” in the press, which might be technically correct but I think most people read that (incorrectly) as a “charitable organization”. Which is probably why so many people were surprised to see them acting in that way. A more accurate description of The Linux Foundation, of course, is “an industry trade group”.

    1. Seems a bit premature to me – the only comms stack appears to be Bluetooth which would make connecting a thing to the Internet somewhat trickier than it needs to be.

      Given I can run a bang up to date Linux Kernel with all the popular network protocols and hardware support on 5 bucks worth of ARM SoC, I’ll be sticking with that and separate bare-metal for any real time requirements for now.

  4. Talking about RTOS for embedded systems, what ever happened to QNX?

    It was the future for everything when Neutrino was released for free to developers, but then they changed the policy or something…

    I used to run it as a desktop OS on a spare computer, I had some issues and joined their supportchat on IRC to ask some questions and got to talk to a lot of nice people from the company (and a lot of other users/developers)

    It turned out to be the computer my kids used, and they also chatted with the people in the IRC, one was involved in Robotwars, and my kids loved that show on TV…

    They were a bit suprised that some kid, not natively speaking english was chatting with them about robotwars :D

  5. I don’t get it. The controllers supported seem to all have MMU’s. So why bother with this quasi-RTOS thing? Just use an OS with a real multi-tasking scheduler, like a lean version of Linux or xBSD.

    1. This supports cortex M4 parts (like the Freescale K64) which has no MMU. It does, however, have a Memory Protection Unit (MPU) which is similar but doesn’t manage virtual memory. Zephyr, to by knowledge, doesn’t actually use the MPU anyway.

  6. Completely WRONG!!!

    “However, having a Linux-heritage RTOS that can target small boards like an Arduino Due and a Freedom board could be a real game changer for sophisticated projects that need an RTOS.”

    Zephyr is based on Wind River RTOS kernel and Linux Foundation is releasing it just for pressure from Intel because it run on Intel hardware.

    If you want a RTOS with “Linux-heritage” then use NuttX

  7. heh. “Zephyr” is apparently also a “test managment system/company”; it took me a few minutes to figure out that the youtube video I get chained to was talking about something completely different!
    I need to look at this more carefully; I’ve been thinking that “we” need something heavier that freeRTOS/etc, but lighter than linux…

    1. “real time” linux flavors are definitively not an option as RTOS on microcontrolers (CORTEX-M and all the small 8-16-32-bits µC).
      There are a bunch of RTOS for these devices, among them FreeRTOS.
      What do you mean by heavier that FreeRTOS ?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.