Why PineTime can't run Linux, and why this is OK
#1
Hello everyone, and welcome to the new PineTime subforum!

I'd like to give an answer to a set of questions that has come up again and again in social media and our chat network:

"Will it run Linux?"
"Does it run Linux?"
"Why doesn't it run Linux?"


In short, the answer is no. But it's not because we're turning our backs on the open-source community or any horrible reason like that. Smile 

As you have noticed if you've paid attention to our announcements, the PineTime is rather small and very affordable. This requires some compromises in hardware. The chips that we use in our existing platforms (Allwinner A64, Rockchip RK33xx) are far too large dimensionally and consume too much power to be practical. "Big-name" smartwatches such as the Apple Watch and Samsung Gear use cut-down and low-power relatives of normal smartphone SoCs, which could run Linux (and do, if you count Android). However, these chips would heavily increase the price point and tend to not be very open-source friendly.

So in this case, the solution is to step down from large (Cortex-A) SoCs into the world of small low-power (Cortex-M) microcontrollers. That is what has been done for the PineTime -- it is using a chip from the nRF52 family from Nordic Semiconductor. In particular, we are currently looking at the nRF52832. I guess I ought to lay out the relevant specs real quick:

  • 64MHz ARM Cortex-M4F
  • 64KB RAM
  • 512KB Flash

Before anyone gets too fearful, this chip isn't much like the Arduino Uno you may think of when you hear the term "microcontroller". It's still using a fairly quick processor core at it's heart -- a 64MHz ARM Cortex-M4F. This won't exactly be running AAA games, but for a small and efficiently-programmed smartwatch it should be more than enough. It's also quite similar to what the Pebble series of smartwatches used. However, it does lead us to the first issue for running Linux:

Linux requires an MMU (memory management unit) to run.

I won't go into deep details of what an MMU is (tl;dr: allows for an OS to segment and protect parts of memory), but needless to say the Cortex-M4F core does not have one. 

Now, those in the know might be currently yelling at me that there is a solution and it's name is uCLinux! Anyone saying that is not wrong, as the point of the uCLinux project is to port Linux to devices which do not have an MMU. However, even if we did try to use uCLinux, there's another problem:

Linux wants a lot of RAM.

Ok, in the modern sense, not actually a lot. In my own research, I've seen that the bare minimum recommended for a uCLinux image on a Cortex-M4 is about 4MB. But when you look back at the specs I listed, we only have 64KB. Now, maybe some very skilled developers could perform magic to make uCLinux boot within this envelope, but it would still be nearly unusable.

So at this point, many of you may be asking what is the point?, thinking that this hardware is useless and nothing can run on it. If you were thinking that, you're actually wrong. Now we get to the happier part of this wall of text:

Linux may not run, but plenty of open-source embedded OSs thrive in this type of hardware!

We are far from the only group to want to make a usable consumer smart-device with microcontrollers. Thus, enter the world of embedded OSs, such as Zephyr, FreeRTOS, and NuttX. Building off one of these, we can actually make an open-source device which will perform smoothly with a cheap microcontroller which sips power. Zephyr is even part of the Linux Foundation umbrella of projects!

As of writing (October 23, 2019), several developers who have already received PineTime devkits are exploring all the options, so that we can find the one which best fits our needs.

Hopefully this clears up a lot of confusion and concerns, while being informative. I definitely ended up putting more information in this post than I originally intended... Wink
Community administrator and sysadmin for PINE64
(Translation: If something breaks on the website, forum, or chat network, I'm a good person to yell at about it)



Messages In This Thread
Why PineTime can't run Linux, and why this is OK - by fire219 - 10-23-2019, 09:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PineTime at FOSDEM jmlich 5 626 02-07-2024, 11:48 PM
Last Post: tllim
  PineTime turns off when removed from cradle tynstar 0 183 01-31-2024, 11:57 AM
Last Post: tynstar
  PineTime and Amazfish on Ubuntu Touch jmlich 1 646 10-14-2023, 04:12 PM
Last Post: tllim
  PineTime is dead!! Markdanni123 12 13,508 09-18-2023, 10:17 PM
Last Post: ccchan234
  PineTime Sleep Tracking any_mouse 12 12,016 07-10-2023, 05:41 PM
Last Post: davidair
  PineTime Dead out of box? henkery 1 1,152 03-12-2023, 04:34 PM
Last Post: henkery
  Pinetime almost dead... only shows Infinitime logo. lightweight 8 6,514 02-11-2023, 09:30 AM
Last Post: alexmitroff
  PineTime beginner MV1791 2 2,089 01-09-2023, 11:52 PM
Last Post: Canyonless
  Struggling to detect Pinetime over bluetooth John45595 0 1,121 11-20-2022, 11:06 PM
Last Post: John45595
  PineTime Dev Kit for sale igor.bljahhin 2 3,132 10-19-2022, 05:34 AM
Last Post: peatord

Forum Jump:


Users browsing this thread: 1 Guest(s)