Recently, there’s been a lot of buzz and speculation about a newly discovered operating system (OS) project on Google Code (mirrored also at GitHub): Fuschia. Upon inspection, and as noted in several articles, Fushcia’s core kernel services appear to be based on Magenta, which in turn sits on top of Little Kernel (LK) – a small, opensource, lightweight kernel providing basic real time OS (RTOS) services that is similar to ThreadX.
My first response when I read about Fuschia was deep concern. Then I let things simmer a bit, and I have to say, as an embedded developer supporting various System on Chip (SOC) platforms, this is really great news.
Don’t get me wrong. I really like linux. The code-base that it supports and sheer number of contributors for it gives you a plethora of capability once you have a working kernel and relevant device drivers for your device. But, any embedded developer will tell you, linux is far from free (as in “free lunch”), especially if you are trying to hammer it into some of the more complex SOC’s appearing on the market today.
Trying to sort out what capabilities of a SOC peripheral an introduced linux device driver supports, how it has been tested, patching it to support your platform configuration (which is never the same as the devkit chip manufacturers promote), and pushing such patches back to the mainline can be an arduous and daunting task. Squeezing performance out of SOC’s running linux can be a nightmare. Most linux drivers aren’t written with zero-copy or low latency notifications to user / application space in mind. They can’t be while complying with the intrinsic architecture linux provides. It’s not an RTOS.
A lot of times, the device driver you need doesn’t even make it into the mainline for months or even years after basic platform support is added. Sure, you can write a new device / kernel module to do what you need. But that means spending a lot of time understanding the inner workings of the linux kernel (e.g., dealing with device tree and the device model, the linux config/make system, kernel vs. userspace memory allocation, DMA memory mapping, the basics of linux memory page tables, and interrupt registration) as well as the initialization subsystem (bootloading, then launching systemd or initv startup scripts). There is a large class of embedded C / C++ application developers that still can’t do that, and they work for companies that don’t believe they can afford to train them.
Enter Fuschia. If Google really throws its weight behind it and keeps it opensource, it’s a win for embedded device developers. It’s an option for folks looking for a stable, full featured RTOS that doesn’t present the barrier to entry of licensing costs, which can be significant for smaller companies that would rather invest sweat equity than cold hard cash developing their first products. It’s another “free” choice that opens the door to a large community of coders that prefer living a little closer to the bare metal environment but desperate to use modern SOCs rolling out from chip manufacturers.
How could that be anything but good news?