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)

  Reply
#2
Once the consumer models are released, will we be able to switch between OS/distros the developers have created?
  Reply
#3
(11-03-2019, 01:19 PM)Hikari_Tadashi Wrote: Once the consumer models are released, will we be able to switch between OS/distros the developers have created?

In theory, yes. It may be a bit more difficult than other P64 products as you can't just "pop the SD card out" from a IP67 sealed watch. To physically get access inside the watch, you'll have to break the seal and damage the casing.

There are plans for how to implement an OTA (over the air -- wireless -- upgrade) mechanism, but nothing confirmed yet.
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)

  Reply
#4
I had emailed [email protected] with no response, trying one last time here. I’d really like to snag a dev kit and bring up PineTime on TockOS. Tock is an embedded OS written in Rust. It’s already targeting the Time’s Nordic chipset Smile
  Reply
#5
(11-04-2019, 03:29 PM)patchedsoul Wrote: I had emailed [email protected] with no response, trying one last time here. I’d really like to snag a dev kit and bring up PineTime on TockOS. Tock is an embedded OS written in Rust. It’s already targeting the Time’s Nordic chipset Smile

You can PM your email address that contacts with info team, I will check why they miss your email.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  PineTime dev kits in the store Luke 2 91 Today, 03:38 AM
Last Post: Jeeves
  PineTime kill switch ivanB1975 2 350 Yesterday, 03:56 PM
Last Post: tigerclaw989
  PineTime case VMMainFrame 2 119 11-25-2019, 07:11 PM
Last Post: VMMainFrame
  PineTime display soyrunner 1 251 10-28-2019, 08:41 AM
Last Post: ayke
  PineTime smartwatch - a Linux Phone companion Luke 31 4,716 10-26-2019, 01:34 PM
Last Post: larzuk

Forum Jump:


Users browsing this thread: 1 Guest(s)