Fuzix Unix-like operating system ported to Raspberry Pi Pico and ESP8266

Fuzix Raspberry Pi Pico ESP8266

The Raspberry Pi Pico is not compatible with Linux, but now supports another Unix-like operating system known as Fuzix. Alan Cox’s Fuzix is a Unix-like operating system for older devices with less performance capacity. David Given’s two recent posts have brought to the attention about the operating system’s compatibility with ESP8266 MCU and Raspberry Pi Pico.

Fuzix operating system has a kernel which is the central core of the system. Also, it has a C compiler and a set of core applications similar to the UNIX filesystem. The Raspberry Pi Pico port comes with many benefits like a well-structured Unix filesystem with its compatibility for SD cards through the SPI interface. Hence, supporting the Fuzix operating system. The full set of Fuzix binaries is available through a serial console to UART0. 

Porting Fuzix to ESP8266

The post on “Porting Fuzix to the ESP8266” addresses the MCU’s support for the Fuzix OS. The absence of a memory management unit on the ESP8266 limits the scope of swapping processes in and out, due to address relocation issues. Thus for operating Fuzix on the MCU only one process is taken care of at an instance. ESP8266 MCU’s quicker SD card fixes this issue by reducing the time and makes the overall system efficient to use. David Given says“ the boot time is four seconds. Running a program from the shell takes about 500ms, most of the time spent swapping out the current process.”

The option of using a quick SD card opened up the possibilities of porting Fuzix on Raspberry Pi Pico as well, as it does not have multitasking functionality and NAND flash support. As there is no support for flash memory hence memory is dependent on the SD card. Although the code is sufficient to work with, an improper file system can crash the dhara FTL library. 

Fuzix on Raspberry Pi Pico

The Raspberry Pi Pico comes with dual-core Cortex M0+ working at a frequency up to 130MHz, 269kB of RAM; and two fast IO coprocessors. The Fuzix port for Pico only operates on a single core. Compared to the ESP8266, RP Pico is a bit slower, but there could be some improvements if overclocking is explored for the RP Pico. “Performance is still completely adequate for an interactive Unix.”

Some highlights of Fuzix on Raspberrry Pi Pico:

  • It provides user binaries using up to 64kB of storage for code and data. This limit can be increased due to the availability of RAM
  • The system supports up to 15 processes on the Raspberry Pi Pico
  • It has a proper well-structured Unix filesystem.
  • SD card support is used for both the filesystem and swap space
  • It supports a serial console on UART0

According to David Given “the documentation of Raspberry Pi Pico is excellent, as is the C SDK. The SDK provides a set of libraries that are thin wrappers around the underlying hardware, making most features utter simplicity to use. Unlike the ESP8266 libraries, the Pico SDK is unopinionated. It doesn’t require you to use any of its features if you want to talk directly to the hardware.” 

For detailed information on both, visit David Given’s posts on porting Fuzix to the ESP8266 MCU and Raspberry Pi Pico here and there.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

9 Replies to “Fuzix Unix-like operating system ported to Raspberry Pi Pico and ESP8266”

    1. Current MCUs are much more powerful than the good old PDP11! That’s why I’m pretty certain it’s possible to have a good and usable UNIX-like system on current devices. A year ago I was interested in trying to port 2.11BSD to ESP32 but had little time to work on the design, but since then we’ve seen equivalent solutions now (such as the PDP11 emulator). I still think that having a native UNIX-like OS for such machines would be extremely useful, but without networking it’s pointless nowadays. I also think that ESP32 would be a much better target than ESP8266 because it has 6 times more memory for almost the same price (ESP32S dev boards start at less than 2 EUR). This is important considering that the RTOS and WiFi stack on the device do use quite a bit of this memory.

        1. This is the one I was speaking about above 🙂 At least all of these projects confirm the demand for a unix-like OS for those super-powerful, network-connected MCUs.

      1. There is actually that guy who managed to implement a complete BSD on the PIC32: retrobsd on MX and litebsd on MZ series. Other than that he relied quite a bit on microchip libraries, I suppose that should be able to pretty much serve as a basis for a port.

      2. >I still think that having a native UNIX-like
        >OS for such machines would be extremely
        >useful, but without networking it’s pointless nowadays.

        Networking without memory protection is like going to a destruction derby in a Sinclair C5.

        1. Not really in fact. It’s exactly the same as running a single-process application connected to the network. Any bug in that application can result in any part of the memory being overwritten. An operating system running on an MPU-less machine is just in the exact same situation. The real benefit of MPU is to isolate processes (and the system) from each other, i.e. contain intrusions and limit privilege escalation. And most of the time, single-process applications already have all privileges to do everything, so once they’re networked you know you lose the whole machine if it’s broken into. Thus it’s not different here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC